{"info":{"version":"0.1.0","description":"Clinical ground-truth APIs gated by x402 V2 payments (USDC on Base). HTTP 402 is unpaid; HTTP 503 means retry the same PAYMENT-SIGNATURE. Human docs at https://magentlab.com/docs. MCP hosts use the stdio client @magentlab/mcp (https://magentlab.com/docs/mcp). See /llms.txt for agent onboarding and /v1/catalog for parameters and prices. Not a medical device.","title":"magent API","contact":{"name":"Magent","url":"https://magentlab.com","email":"michael@magentlab.com"},"x-guidance":"Pay each call with x402 V2 USDC on Base. Unpaid requests return HTTP 402 with PAYMENT-REQUIRED; sign PAYMENT-SIGNATURE and retry. HTTP 400 is invalid input and is not charged. HTTP 503 means retry the same PAYMENT-SIGNATURE. Paths, prices, and parameters: GET /v1/catalog. Not a medical device."},"components":{"securitySchemes":{"x402":{"description":"x402 V2 PAYMENT-SIGNATURE (base64 JSON). HTTP 503: retry this same header. HTTP 402: decode PAYMENT-REQUIRED and sign a new authorization.","in":"header","name":"PAYMENT-SIGNATURE","type":"apiKey"}},"x-x402":{"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","assetTransferMethod":"eip3009","maxTimeoutSeconds":600,"network":"eip155:8453","notOffered":["upto"],"offered":["exact","batch-settlement"],"paymentFlow":"upfront","scheme":"exact","version":2}},"paths":{"/api/calc/duval-aml":{"get":{"description":"Sum the Duval 2010 AML Table 5 points and return risk_group 0, 1, 2, or ge_3 (scores ≥3 share one group).\n\nWhen an agent needs the published Duval 2010 AML (not ALL) Table 5 point total from caller-assigned categories and must not invent a transplant listing, karyotype parse, or ALL score.\n\nNot a medical device and not a diagnosis. Not a transplant listing. magent does not examine the patient.\n\nThis is Duval 2010 Table 5 for AML only. It does not implement the ALL table in the same paper.\n\nmagent does not read a karyotype string or HLA type. The caller assigns disease_group, ECOG/SWOG cytogenetics (poor vs good/intermediate), and the Table 5 three-level hla_match.\n\nmagent does not collect numeric Karnofsky or Lansky. kps_lt_90 is a caller-assigned flag.\n\nTable 5 groups scores ≥3 together. Published 3-year overall survival in the derivation cohort was 42% at score 0 and 6% at score ≥3. Those figures are not returned on the JSON 200. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"disease_group","description":"Duval 2010 AML Table 5 disease status as assigned by the caller. pif_or_cr1_gt_6mo is primary induction failure or duration of first CR >6 months and scores 0. cr1_lt_6mo is duration of first CR <6 months and scores 1. magent does not date remissions.","required":true,"schema":{"type":"string","enum":["pif_or_cr1_gt_6mo","cr1_lt_6mo"]},"example":"pif_or_cr1_gt_6mo"},{"in":"query","name":"cytogenetics","description":"ECOG/SWOG cytogenetic risk as assigned by the caller (Duval 2010). poor is −5/del(5q), −7/del(7q), inv(3q), abn11q, 20q or 21q, del(9q), t(6;9), t(9;22), abn17p, or complex (≥3 abnormalities) and scores 1. good_or_intermediate is everything else in that classification and scores 0. magent does not read a karyotype string.","required":true,"schema":{"type":"string","enum":["good_or_intermediate","poor"]},"example":"good_or_intermediate"},{"in":"query","name":"hla_match","description":"Duval 2010 AML Table 5 donor HLA match as assigned by the caller (not a flattened 0/1 donor flag). sibling_or_matched_unrelated is HLA-identical sibling or well matched or partially matched unrelated and scores 0. mismatched_unrelated scores 1. related_other is related other than HLA-identical sibling and scores 2. magent does not HLA-type.","required":true,"schema":{"type":"string","enum":["sibling_or_matched_unrelated","mismatched_unrelated","related_other"]},"example":"sibling_or_matched_unrelated"},{"in":"query","name":"circulating_blasts","description":"Circulating blasts present as assigned by the caller (Duval 2010 AML Table 5). true scores 1. magent does not count blasts.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"kps_lt_90","description":"Karnofsky or Lansky <90 as assigned by the caller (Duval 2010 AML Table 5). true scores 1. magent does not collect numeric KPS or Lansky.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Duval AML","operationId":"get_api_calc_duval_aml","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk_group, disease_group, cytogenetics, hla_match, circulating_blasts, kps_lt_90, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_duval: each Duval 2010 AML item must be a published Table 5 category. Returned before settlement; you are not charged.; invalid_hla_match: hla_match must be sibling_or_matched_unrelated, mismatched_unrelated, or related_other (Duval 2010). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/duval-aml"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Duval AML (bulk)","operationId":"post_api_calc_duval_aml","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_duval: each Duval 2010 AML item must be a published Table 5 category. Returned before settlement; you are not charged.; invalid_hla_match: hla_match must be sibling_or_matched_unrelated, mismatched_unrelated, or related_other (Duval 2010). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/duval-aml"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"circulating_blasts":"false","cytogenetics":"good_or_intermediate","disease_group":"pif_or_cr1_gt_6mo","hla_match":"sibling_or_matched_unrelated","kps_lt_90":"false"},{"circulating_blasts":"false","cytogenetics":"good_or_intermediate","disease_group":"pif_or_cr1_gt_6mo","hla_match":"sibling_or_matched_unrelated","kps_lt_90":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/igan-predict":{"get":{"description":"Compute 5-year risk of a 50% decline in eGFR or ESKD after kidney biopsy from the Barbour 2019 full International IgAN prediction model that does not use race or ethnicity.\n\nWhen an agent already has age at biopsy, a caller-supplied eGFR, MAP, proteinuria in g/day, Oxford MEST scores, and whether RAS blockade and immunosuppression were in use at biopsy, and needs that paper's race-free 5-year risk. Not a biopsy diagnosis, not KFRE, and not the race/ethnicity model.\n\nNot a medical device. Not a biopsy diagnosis, immunosuppression order, or RAS-blockade order. magent does not assay creatinine or urine protein and does not compute CKD-EPI eGFR.\n\nBarbour 2019 full model without race/ethnicity only (eTable 3). Does not ship the full model that includes Chinese, Japanese, White, or other race coefficients.\n\nNot KFRE and not a 50% eGFR-decline or ESKD diagnosis. Emits a 5-year percent, not a named risk class. Table 3 percentile bands are cohort-specific and are not returned.\n\nDerivation was adults 18 years or older with biopsy-proven idiopathic IgAN and without ESKD at biopsy. Age 18-120 is a magent adult clamp. Caller supplies eGFR.\n\nPredictors are at the time of biopsy, including RAS blockade and immunosuppression already in use. The model is not a treatment-response predictor for drugs started after biopsy. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_years","description":"Age at biopsy in years (integer 18-120). Barbour 2019 derivation was adults 18 years or older. Enters the linear predictor as age_years - 38.","required":true,"schema":{"type":"integer"},"example":38},{"in":"query","name":"egfr_ml_min_1_73m2","description":"Caller-supplied eGFR in mL/min/1.73 m2 (5-200). Enters as sqrt(eGFR) centered at 8.8. Derivation used CKD-EPI and excluded ESKD at biopsy. magent does not compute CKD-EPI and does not assay creatinine.","required":true,"schema":{"type":"number"},"example":77},{"in":"query","name":"map_mm_hg","description":"Mean arterial pressure at biopsy in mm Hg (30-180). Enters centered at 97 and in the proteinuria×MAP interaction.","required":true,"schema":{"type":"number"},"example":97},{"in":"query","name":"proteinuria_g_day","description":"Proteinuria at biopsy in g/day (0.01-20). Enters as natural log, centered at 0.09, plus interactions with MAP, T, and RASB. magent does not assay urine protein.","required":true,"schema":{"type":"number"},"example":1.1},{"in":"query","name":"mest_m","description":"Oxford MEST mesangial hypercellularity at biopsy. 0 = M0, 1 = M1. magent does not score the biopsy.","required":true,"schema":{"type":"integer","enum":[0,1]},"example":1},{"in":"query","name":"mest_e","description":"Oxford MEST endocapillary hypercellularity at biopsy. 0 = E0, 1 = E1. magent does not score the biopsy.","required":true,"schema":{"type":"integer","enum":[0,1]},"example":0},{"in":"query","name":"mest_s","description":"Oxford MEST segmental sclerosis at biopsy. 0 = S0, 1 = S1. magent does not score the biopsy.","required":true,"schema":{"type":"integer","enum":[0,1]},"example":1},{"in":"query","name":"mest_t","description":"Oxford MEST tubular atrophy/interstitial fibrosis at biopsy. 0 = T0, 1 = T1, 2 = T2. T1 and T2 have main-effect and proteinuria-interaction terms. magent does not score the biopsy.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":0},{"in":"query","name":"rasb_at_biopsy","description":"true if renin-angiotensin system blockade (ACE inhibitor or ARB) was in use at biopsy. Enters as 1 or 0 plus a RASB×proteinuria term. magent does not prescribe RAS blockade.","required":true,"schema":{"type":"boolean"},"example":true},{"in":"query","name":"immunosuppression_at_biopsy","description":"true if immunosuppression was in use at biopsy. Enters as 1 or 0. magent does not prescribe immunosuppression.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"IgAN predict","operationId":"get_api_calc_igan_predict","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, egfr_ml_min_1_73m2, map_mm_hg, proteinuria_g_day, mest_m, mest_e, mest_s, mest_t, rasb_at_biopsy, immunosuppression_at_biopsy, linear_predictor, five_year_risk_percent, s0_5_year, horizon_months, citation, disclaimer."},"400":{"description":"invalid_igan: IgAN prediction needs eGFR, MAP, proteinuria, age, MEST, RASB, and immunosuppression as in Barbour 2019 without race. Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_egfr: egfr_ml_min_1_73m2 must be a number from 5 to 200 (caller-assigned eGFR; magent does not compute MDRD or CKD-EPI). Returned before settlement; you are not charged.; invalid_map_mm_hg: map_mm_hg must be a number from 30 to 180. Returned before settlement; you are not charged.; invalid_proteinuria_g_day: proteinuria_g_day must be a positive number in g/day. Returned before settlement; you are not charged.; invalid_mest: Oxford MEST M/E/S must be 0 or 1 and T must be 0, 1, or 2. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/igan-predict"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"IgAN predict (bulk)","operationId":"post_api_calc_igan_predict","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_igan: IgAN prediction needs eGFR, MAP, proteinuria, age, MEST, RASB, and immunosuppression as in Barbour 2019 without race. Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_egfr: egfr_ml_min_1_73m2 must be a number from 5 to 200 (caller-assigned eGFR; magent does not compute MDRD or CKD-EPI). Returned before settlement; you are not charged.; invalid_map_mm_hg: map_mm_hg must be a number from 30 to 180. Returned before settlement; you are not charged.; invalid_proteinuria_g_day: proteinuria_g_day must be a positive number in g/day. Returned before settlement; you are not charged.; invalid_mest: Oxford MEST M/E/S must be 0 or 1 and T must be 0, 1, or 2. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/igan-predict"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_years":"38","egfr_ml_min_1_73m2":"77","immunosuppression_at_biopsy":"false","map_mm_hg":"97","mest_e":"0","mest_m":"1","mest_s":"1","mest_t":"0","proteinuria_g_day":"1.1","rasb_at_biopsy":"true"},{"age_years":"38","egfr_ml_min_1_73m2":"77","immunosuppression_at_biopsy":"false","map_mm_hg":"97","mest_e":"0","mest_m":"1","mest_s":"1","mest_t":"0","proteinuria_g_day":"1.1","rasb_at_biopsy":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/bmv":{"get":{"description":"Compute Farris 2017 brain metastasis velocity as new_brain_metastases / years_since_first_srs and report the published low, intermediate, or high group plus that group's median overall survival after initial distant brain failure.\n\nWhen an agent already has the cumulative number of new brain metastases since first SRS and the years since first SRS, and must not floor BMV, use time since last SRS, or treat velocity as a diagnosis.\n\nNot a medical device. magent does not count metastases on imaging or diagnose distant brain failure.\n\nFarris 2017 BMV is new_brain_metastases / years_since_first_srs, rounded to 1 decimal. magent does not floor or round down BMV (that is NRG-BN009, not Farris).\n\nYears since first SRS only. This tool does not use time since last SRS.\n\nNot a diagnosis. Median OS is the published Farris 2017 group median after initial distant brain failure (low 12.4, intermediate 8.2, high 4.3 months). magent does not return confidence intervals or hazard ratios as scored outputs. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"new_brain_metastases","description":"Cumulative number of new brain metastases since first SRS (integer 0-200). Caller-assigned; magent does not count metastases on imaging.","required":true,"schema":{"type":"integer"},"example":"3"},{"in":"query","name":"years_since_first_srs","description":"Years since first SRS (0.01-30; must be > 0). Farris 2017 uses time since first SRS, not time since last SRS.","required":true,"schema":{"type":"number"},"example":"1"}],"summary":"Brain metastasis velocity","operationId":"get_api_calc_bmv","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, new_brain_metastases, years_since_first_srs, bmv, risk_group, median_os_months, citation, disclaimer."},"400":{"description":"invalid_new_brain_metastases: new_brain_metastases must be an integer from 0 to 200 (Farris 2017 cumulative new metastases since first SRS). Returned before settlement; you are not charged.; invalid_years_since_srs: years_since_first_srs must be a number from 0.01 to 30 (Farris 2017 years since first SRS; must be > 0). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bmv"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Brain metastasis velocity (bulk)","operationId":"post_api_calc_bmv","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_new_brain_metastases: new_brain_metastases must be an integer from 0 to 200 (Farris 2017 cumulative new metastases since first SRS). Returned before settlement; you are not charged.; invalid_years_since_srs: years_since_first_srs must be a number from 0.01 to 30 (Farris 2017 years since first SRS; must be > 0). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bmv"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"new_brain_metastases":"3","years_since_first_srs":"1"},{"new_brain_metastases":"3","years_since_first_srs":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/herdoo2":{"get":{"description":"Compute the Rodger 2008 HERDOO2 score (hyperpigmentation, edema, or redness in either leg; D-dimer ≥250 μg/L while on anticoagulants; BMI ≥30; age ≥65) and return whether the derivation classified the patient as low risk (women with score ≤1 only).\n\nWhen an agent needs the published Rodger 2008 HERDOO2 arithmetic after unprovoked VTE and must not invent a duration-of-anticoagulation decision.\n\nNot a medical device. magent does not diagnose recurrent VTE or assay D-dimer.\n\nNot a duration-of-anticoagulation order and not a stop-or-continue anticoagulation protocol. low_risk is the Rodger 2008 derivation subgroup, not a treatment instruction.\n\nMen have no low-risk subgroup in the Rodger 2008 derivation. low_risk is false for every male, including score 0.\n\nD-dimer is a caller-assigned ≥250 μg/L flag while on anticoagulants. The derivation used a 250 μg/L cut while on warfarin. magent does not name assay brands.\n\nBMI 30.0 and age 65 each score 1. magent does not compute BMI from height and weight. Recurrence percents are not returned. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sex","description":"female or male. low_risk is true only when female and score ≤1. Men have no low-risk subgroup in Rodger 2008.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"her_signs","description":"Hyperpigmentation, edema, or redness in either leg (Rodger 2008). Caller-assigned. true or false. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"d_dimer_ge_250","description":"D-dimer ≥250 μg/L while on anticoagulants (Rodger 2008). Caller-assigned; magent does not assay D-dimer. true or false. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bmi_kg_m2","description":"Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI from height and weight. Scores 1 when ≥30. Equality at 30.0 meets.","required":true,"schema":{"type":"number"},"example":"22"},{"in":"query","name":"age","description":"Age in years (18-120). Scores 1 when ≥65. Age 65 meets (Rodger 2008).","required":true,"schema":{"type":"integer"},"example":"40"}],"summary":"HERDOO2","operationId":"get_api_calc_herdoo2","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, low_risk, sex, age_years, bmi_kg_m2, components, citation, disclaimer."},"400":{"description":"invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/herdoo2"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HERDOO2 (bulk)","operationId":"post_api_calc_herdoo2","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/herdoo2"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","bmi_kg_m2":"22","d_dimer_ge_250":"false","her_signs":"false","sex":"female"},{"age":"40","bmi_kg_m2":"22","d_dimer_ge_250":"false","her_signs":"false","sex":"female"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/decaf":{"get":{"description":"Sum Steer 2012 DECAF points from extended MRC dyspnoea, eosinophils, chest radiograph consolidation, arterial pH, and atrial fibrillation.\n\nWhen an agent needs the published Steer 2012 DECAF total and band and must not invent an early-discharge or escalation decision or a mortality percent.\n\nNot a medical device. Not an early-discharge or escalation protocol. Bands follow Steer 2012 (0-1 / 2 / 3-6) and do not include mortality percents.\n\neMRCD is the caller-assigned extended MRC grade 1-4, 5a, or 5b. magent does not interview the patient.\n\nConsolidation and atrial fibrillation are caller-assigned flags. magent does not interpret the chest radiograph or ECG. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"emrcd","description":"Steer 2012 extended MRC dyspnoea as assigned by the caller. 1-4 scores 0; 5a scores 1; 5b scores 2. magent does not interview the patient.","required":true,"schema":{"type":"string","enum":["1-4","5a","5b"]},"example":"1-4"},{"in":"query","name":"eosinophils_10e9_l","description":"Blood eosinophil count ×10^9/L (0-5). Steer 2012: <0.05 scores 1; 0.05 does not score.","required":true,"schema":{"type":"number"},"example":"0.10"},{"in":"query","name":"consolidation","description":"Chest radiograph consolidation as assigned by the caller (Steer 2012 C). true or false. 1 point if true. magent does not interpret radiographs.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"arterial_ph","description":"Arterial pH (6.80-7.80). Steer 2012: <7.30 scores 1; 7.30 does not score.","required":true,"schema":{"type":"number"},"example":"7.40"},{"in":"query","name":"atrial_fibrillation","description":"Atrial fibrillation as assigned by the caller (Steer 2012 F). true or false. 1 point if true. magent does not interpret the ECG.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"DECAF","operationId":"get_api_calc_decaf","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, decaf_band, emrcd, eosinophils_10e9_l, consolidation, arterial_ph, atrial_fibrillation, components, citation, disclaimer."},"400":{"description":"invalid_emrcd: emrcd must be 1-4, 5a, or 5b (Steer 2012 extended MRC dyspnoea). Returned before settlement; you are not charged.; invalid_eosinophils: eosinophils_10e9_l must be a number from 0 to 5 (Steer 2012). Returned before settlement; you are not charged.; invalid_arterial_ph: arterial_ph must be a number from 6.80 to 7.80. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/decaf"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"DECAF (bulk)","operationId":"post_api_calc_decaf","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_emrcd: emrcd must be 1-4, 5a, or 5b (Steer 2012 extended MRC dyspnoea). Returned before settlement; you are not charged.; invalid_eosinophils: eosinophils_10e9_l must be a number from 0 to 5 (Steer 2012). Returned before settlement; you are not charged.; invalid_arterial_ph: arterial_ph must be a number from 6.80 to 7.80. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/decaf"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"arterial_ph":"7.40","atrial_fibrillation":"false","consolidation":"false","emrcd":"1-4","eosinophils_10e9_l":"0.10"},{"arterial_ph":"7.40","atrial_fibrillation":"false","consolidation":"false","emrcd":"1-4","eosinophils_10e9_l":"0.10"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ort":{"get":{"description":"Sum Webster 2005 Table 1 Opioid Risk Tool item weights for the assigned sex and return the published low, moderate, or high category.\n\nWhen an agent has already assigned the ten yes/no flags and sex and needs the published 2005 point total, not an interview, not a diagnosis of opioid use disorder, and not the 2019 ORT-OUD revision.\n\nNot a medical device.\n\nNot a diagnosis of opioid use disorder. Not the 2019 ORT-OUD revision.\n\nThe caller assigns each flag. magent does not interview the patient or take free-text abuse history.\n\nFlags are PHI-adjacent. Persist them only encrypted for the allowlisted console.\n\nAge 16-45 is a yes/no flag, not a numeric age. Preadolescent sexual abuse is 3 points for females and 0 for males (Webster 2005 Table 1). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sex","description":"female or male. Webster 2005 Table 1 item weights are sex-specific. Assigned by the caller.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"family_alcohol","description":"Family history of alcohol abuse as assigned by the caller (Webster 2005 Table 1). Female 1, male 3. true or false. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"family_illegal_drugs","description":"Family history of illegal-drug abuse as assigned by the caller (Webster 2005 Table 1). Female 2, male 3. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"family_prescription_drugs","description":"Family history of prescription-drug abuse as assigned by the caller (Webster 2005 Table 1). 4 points. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"personal_alcohol","description":"Personal history of alcohol abuse as assigned by the caller (Webster 2005 Table 1). 3 points. true or false. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"personal_illegal_drugs","description":"Personal history of illegal-drug abuse as assigned by the caller (Webster 2005 Table 1). 4 points. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"personal_prescription_drugs","description":"Personal history of prescription-drug abuse as assigned by the caller (Webster 2005 Table 1). 5 points. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"age_16_to_45","description":"Age 16-45 years as a flag, not a numeric age (Webster 2005 Table 1). true scores 1. Assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"preadolescent_sexual_abuse","description":"History of preadolescent sexual abuse as assigned by the caller (Webster 2005 Table 1). Female 3, male 0. true or false. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"add_ocd_bipolar_schizophrenia","description":"ADD, OCD, bipolar disorder, or schizophrenia as one flag (Webster 2005 Table 1). true scores 2. Assigned by the caller. magent does not diagnose.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"depression","description":"Depression as assigned by the caller (Webster 2005 Table 1). true scores 1. magent does not diagnose.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"ORT","operationId":"get_api_calc_ort","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk, sex, components, citation, disclaimer."},"400":{"description":"invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ort"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ORT (bulk)","operationId":"post_api_calc_ort","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ort"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"add_ocd_bipolar_schizophrenia":"false","age_16_to_45":"false","depression":"false","family_alcohol":"false","family_illegal_drugs":"false","family_prescription_drugs":"false","personal_alcohol":"false","personal_illegal_drugs":"false","personal_prescription_drugs":"false","preadolescent_sexual_abuse":"false","sex":"female"},{"add_ocd_bipolar_schizophrenia":"false","age_16_to_45":"false","depression":"false","family_alcohol":"false","family_illegal_drugs":"false","family_prescription_drugs":"false","personal_alcohol":"false","personal_illegal_drugs":"false","personal_prescription_drugs":"false","preadolescent_sexual_abuse":"false","sex":"female"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-reflux-hypersensitivity":{"get":{"description":"Apply the Aziz 2016 Rome IV reflux hypersensitivity diagnostic criteria and return whether the published reflux hypersensitivity box holds (rome_iv_reflux_hypersensitivity).\n\nWhen an agent already has the six caller-assigned Aziz 2016 Rome IV reflux hypersensitivity flags and needs whether the published box holds. magent does not read pH-impedance or endoscopy.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose reflux hypersensitivity.\n\nThe caller assigns the six flags. magent does not read pH-impedance or endoscopy.\n\nResponse to antisecretory therapy does not exclude the diagnosis (Aziz 2016 footnote). That is not an extra required flag.\n\nThis tool is Aziz 2016 Rome IV reflux hypersensitivity only. Not functional heartburn. Not GERD or NERD as the primary tool. Not globus. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"retrosternal_heartburn_or_chest_pain","description":"Retrosternal symptoms including heartburn and chest pain, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"normal_endoscopy_no_eoe","description":"Normal endoscopy and absence of evidence that eosinophilic esophagitis is the cause, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not read endoscopy.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"no_major_esophageal_motor_disorder","description":"Absence of a major esophageal motor disorder, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not interpret manometry.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"symptoms_triggered_by_reflux_despite_normal_acid_exposure","description":"Evidence that symptoms are triggered by reflux events despite normal acid exposure on pH or pH-impedance, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not parse traces.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"fulfilled_last_3_months","description":"Criteria fulfilled for the last 3 months, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"onset_at_least_6_months","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV Reflux Hypersensitivity","operationId":"get_api_calc_rome_iv_reflux_hypersensitivity","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, rome_iv_reflux_hypersensitivity, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_reflux_hypersensitivity: Rome IV reflux hypersensitivity needs the Aziz 2016 esophageal reflux-hypersensitivity flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-reflux-hypersensitivity"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV Reflux Hypersensitivity (bulk)","operationId":"post_api_calc_rome_iv_reflux_hypersensitivity","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_reflux_hypersensitivity: Rome IV reflux hypersensitivity needs the Aziz 2016 esophageal reflux-hypersensitivity flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-reflux-hypersensitivity"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"fulfilled_last_3_months":"true","no_major_esophageal_motor_disorder":"true","normal_endoscopy_no_eoe":"true","onset_at_least_6_months":"true","retrosternal_heartburn_or_chest_pain":"true","symptoms_triggered_by_reflux_despite_normal_acid_exposure":"true"},{"fulfilled_last_3_months":"true","no_major_esophageal_motor_disorder":"true","normal_endoscopy_no_eoe":"true","onset_at_least_6_months":"true","retrosternal_heartburn_or_chest_pain":"true","symptoms_triggered_by_reflux_despite_normal_acid_exposure":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/anc":{"get":{"description":"Compute absolute neutrophil count from WBC and neutrophil plus band percents, plus a Bodey 1966 granulocyte band.\n\nWhen an agent needs ANC from a CBC differential and must not invent cells/µL.\n\nNot a diagnosis. Bodey bands are granulocyte strata from acute-leukemia hospital days, not a febrile-neutropenia treatment plan.\n\nDoes not convert a three-part differential or an absolute neutrophil count already reported by the lab. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"wbc_k_ul","description":"WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500.","required":false,"schema":{"type":"number"},"example":"6.0"},{"in":"query","name":"wbc_ul","description":"WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000.","required":false,"schema":{"type":"number"},"example":"6000"},{"in":"query","name":"neutrophil_percent","description":"Segmented neutrophils / PMNs as a percent of WBC (0-100).","required":true,"schema":{"type":"number"},"example":"50"},{"in":"query","name":"band_percent","description":"Band neutrophils as a percent of WBC (0-100). Omitted treats bands as 0. segs+bands must be ≤100.","required":false,"schema":{"type":"number"},"example":"3"}],"summary":"ANC","operationId":"get_api_calc_anc","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, wbc_per_ul, neutrophil_percent, band_percent, anc_per_ul, bodey_granulocyte_band, citation, disclaimer."},"400":{"description":"invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_neutrophil_percent: neutrophil_percent must be a number from 0 to 100 Returned before settlement; you are not charged.; invalid_band_percent: band_percent must be a number from 0 to 100 Returned before settlement; you are not charged.; invalid_differential: neutrophil_percent + band_percent must be 0 to 100 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/anc"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ANC (bulk)","operationId":"post_api_calc_anc","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_neutrophil_percent: neutrophil_percent must be a number from 0 to 100 Returned before settlement; you are not charged.; invalid_band_percent: band_percent must be a number from 0 to 100 Returned before settlement; you are not charged.; invalid_differential: neutrophil_percent + band_percent must be 0 to 100 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/anc"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"band_percent":"3","neutrophil_percent":"50","wbc_k_ul":"6.0"},{"band_percent":"3","neutrophil_percent":"50","wbc_k_ul":"6.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/icc-sm":{"get":{"description":"Apply the Arber 2022 International Consensus Classification systemic mastocytosis criteria and return whether the published combination of the major criterion alone, or at least three minors, is met. Tryptase >20 ng/mL does not count when an associated myeloid neoplasm (SM-AMN) is present.\n\nWhen an agent already has caller-assigned ICC 2022 SM major and minor flags and needs the published criteria result. magent does not diagnose systemic mastocytosis, does not read a biopsy, and does not assay tryptase.\n\nNot a medical device.\n\nNot a diagnosis. Criteria met is not a systemic mastocytosis diagnosis without the rest of the ICC 2022 workup.\n\nNot Valent 2016 WHO SM. ICC major infiltrates alone is enough; WHO 2016 required major plus at least one minor, or at least three minors.\n\nNot WHO 5th edition / Khoury 2022 classification.\n\nNot cutaneous mastocytosis only. This tool is ICC 2022 systemic mastocytosis only.\n\nmagent does not read a biopsy or assay tryptase. All flags are caller-assigned.\n\nICC names the associated disease SM-AMN (systemic mastocytosis with an associated myeloid neoplasm). When associated_myeloid_neoplasm is true, tryptase_gt_20 does not count as a minor. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"major_infiltrates","description":"Multifocal dense infiltrates of tryptase- and/or CD117-positive mast cells (≥15 MCs in aggregates) in bone marrow or another extracutaneous organ, as assigned by the caller (Arber 2022 ICC SM major). true or false. magent does not read a biopsy.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"atypical_or_spindle","description":">25% spindle-shaped or atypical immature morphology in bone marrow or extracutaneous sections, as assigned by the caller (Arber 2022 ICC SM minor). true or false. magent does not read slides.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"kit_activating","description":"KIT D816V or other activating KIT mutation in bone marrow, blood, or an extracutaneous organ, as assigned by the caller (Arber 2022 ICC SM minor; not codon-816-only). true or false. magent does not sequence KIT.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cd2_cd25_or_cd30","description":"Mast cells express CD25, CD2, and/or CD30 in addition to mast-cell markers, as assigned by the caller (Arber 2022 ICC SM minor; ICC adds CD30). true or false. magent does not phenotype mast cells.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"tryptase_gt_20","description":"Serum tryptase persistently >20 ng/mL as assigned by the caller (Arber 2022 ICC SM minor). Does not count when associated_myeloid_neoplasm is true (SM-AMN). true or false. magent does not assay tryptase.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"associated_myeloid_neoplasm","description":"Associated myeloid neoplasm (ICC SM-AMN) as assigned by the caller. When true, tryptase_gt_20 does not count as a minor. true or false. magent does not diagnose a myeloid neoplasm.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"ICC 2022 SM criteria","operationId":"get_api_calc_icc_sm","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, diagnosed, major, minor_count, tryptase_counts, major_infiltrates, atypical_or_spindle, kit_activating, cd2_cd25_or_cd30, tryptase_gt_20, associated_myeloid_neoplasm, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/icc-sm"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ICC 2022 SM criteria (bulk)","operationId":"post_api_calc_icc_sm","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/icc-sm"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"associated_myeloid_neoplasm":"false","atypical_or_spindle":"false","cd2_cd25_or_cd30":"false","kit_activating":"false","major_infiltrates":"true","tryptase_gt_20":"false"},{"associated_myeloid_neoplasm":"false","atypical_or_spindle":"false","cd2_cd25_or_cd30":"false","kit_activating":"false","major_infiltrates":"true","tryptase_gt_20":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/gupta-pneumonia":{"get":{"description":"Compute the Gupta 2013 Mayo Clin Proc logistic probability of postoperative pneumonia from age, COPD, ASA class, functional status, preoperative sepsis, smoking in the last year, and surgery type.\n\nWhen an agent needs the published Gupta 2013 Mayo Clin Proc pneumonia probability and must not invent an antibiotic order, a ventilator order, a diagnosis, ARISCAT points, or a low/high cutoff.\n\nNot a medical device. Not a diagnosis, not an antibiotic order, and not a ventilator order.\n\nGupta 2013 Mayo Clin Proc logistic pneumonia model only. This is not ARISCAT and not a surgical clearance.\n\nGupta 2013 does not publish a low or high pneumonia cutoff; magent does not invent one.\n\nGupta 2013 does not use race. magent does not accept a race input.\n\nfunctional_status, sepsis, smoking, COPD, and surgery are caller-assigned published categories. magent does not examine the patient or classify the procedure from a CPT code. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Gupta 2013 Mayo Clin Proc: +0.0144 per year.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"copd","description":"Gupta 2013 COPD causing functional disability or hospitalization, or FEV1 <75%, as assigned by the caller: true (reference, 0) or false (-0.4553). magent does not diagnose COPD.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"functional_status","description":"Gupta 2013 Mayo Clin Proc functional status as assigned by the caller: independent (reference, 0), partially_dependent (+0.7653), or totally_dependent (+0.9400). magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["independent","partially_dependent","totally_dependent"]},"example":"independent"},{"in":"query","name":"asa_class","description":"ASA physical status 1-5 (Gupta 2013 Mayo Clin Proc logistic table; class 5 is the reference). class 1 -3.0225, class 2 -1.6057, class 3 -0.4915, class 4 +0.0123, class 5 adds 0. Caller-assigned integer.","required":true,"schema":{"type":"integer"},"example":"2"},{"in":"query","name":"sepsis","description":"Gupta 2013 Mayo Clin Proc preoperative sepsis category as assigned by the caller: none (-0.7641), sirs (reference, 0), sepsis (-0.0842), or septic_shock (+0.1048). magent does not diagnose sepsis.","required":true,"schema":{"type":"string","enum":["none","sirs","sepsis","septic_shock"]},"example":"none"},{"in":"query","name":"smoking","description":"Gupta 2013 smoking within the last year as assigned by the caller: true (reference, 0) or false (-0.4306).","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"surgery","description":"Gupta 2013 Mayo Clin Proc procedure category as assigned by the caller. hernia (ventral, inguinal, or femoral) is the reference (0). gbaas is gallbladder, appendix, adrenal, or spleen. thoracic is non-esophageal thoracic. orthopedic is orthopedic or non-vascular extremity. ent excludes thyroid/parathyroid (neck). magent does not classify a CPT code.","required":true,"schema":{"type":"string","enum":["hernia","anorectal","aortic","bariatric","brain","breast","cardiac","ent","foregut_hpb","gbaas","intestinal","neck","obstetric_gynecologic","orthopedic","other_abdomen","peripheral_vascular","skin","spine","thoracic","vein","urology"]},"example":"hernia"}],"summary":"Gupta pneumonia","operationId":"get_api_calc_gupta_pneumonia","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, copd, functional_status, asa_class, sepsis, smoking, surgery, logit, estimated_probability_percent, citation, disclaimer."},"400":{"description":"invalid_gupta_pneumonia: Gupta pneumonia needs Gupta 2013 age, COPD, functional status, ASA, sepsis, smoking, and surgery type in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gupta-pneumonia"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Gupta pneumonia (bulk)","operationId":"post_api_calc_gupta_pneumonia","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_gupta_pneumonia: Gupta pneumonia needs Gupta 2013 age, COPD, functional status, ASA, sepsis, smoking, and surgery type in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gupta-pneumonia"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","asa_class":"2","copd":"false","functional_status":"independent","sepsis":"none","smoking":"false","surgery":"hernia"},{"age":"40","asa_class":"2","copd":"false","functional_status":"independent","sepsis":"none","smoking":"false","surgery":"hernia"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mhs":{"get":{"description":"Sum the five Bösner 2010 Marburg Heart Score determinants and return the published positive (3–5) or negative (≤2) cut-off.\n\nWhen an agent needs the published primary-care MHS total and must not invent the four findings or treat the score as an ED ACS rule-out.\n\nNot a medical device.\n\nPrimary-care chest-pain rule only (Bösner 2010). Not an ACS rule-out in the emergency department.\n\nNot a diagnosis or admission order.\n\nThe caller assigns the four clinical flags. magent does not interview the patient. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Combined with sex: female ≥65 or male ≥55 scores 1 (Bösner 2010 Table 3). magent computes this; do not send a precomputed flag.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"sex","description":"female or male. Combined with age: female ≥65 or male ≥55 scores 1 (Bösner 2010 Table 3).","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"known_vascular_disease","description":"Known clinical vascular disease: coronary, cerebrovascular, or peripheral (Bösner 2010). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"assumes_cardiac_origin","description":"Patient assumes the pain is of cardiac origin (Bösner 2010). true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pain_worse_exercise","description":"Pain worse with exercise (Bösner 2010). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pain_not_reproducible","description":"Pain is not reproducible by palpation (Bösner 2010). true when that published finding is present; false if pain is reproducible. Assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"MHS","operationId":"get_api_calc_mhs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, mhs_result, sex, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mhs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"MHS (bulk)","operationId":"post_api_calc_mhs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mhs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","assumes_cardiac_origin":"false","known_vascular_disease":"false","pain_not_reproducible":"false","pain_worse_exercise":"false","sex":"female"},{"age":"40","assumes_cardiac_origin":"false","known_vascular_disease":"false","pain_not_reproducible":"false","pain_worse_exercise":"false","sex":"female"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/baws":{"get":{"description":"Sum the five Rastegar 2017 Brief Alcohol Withdrawal Scale items (tremor, diaphoresis, agitation, orientation, hallucinations; each caller-assigned integer 0-3) and return the published 0-15 total plus whether BAWS >=3, the cut that predicted CIWA-Ar >=8 in that paper.\n\nWhen an agent already has Rastegar 2017 BAWS 0-3 integers for the five signs and needs the published total and the >=3 CIWA-Ar >=8 prediction cut. magent does not examine the patient or order benzodiazepines.\n\nNot a medical device and not a benzodiazepine, symptom-triggered, or treatment order. magent does not examine the patient.\n\nEach of tremor, diaphoresis (sweats), agitation, confusion/orientation, and hallucinations is a caller-assigned integer 0-3. magent does not observe the patient.\n\nRastegar 2017: BAWS >=3 predicted CIWA-Ar >=8 (sensitivity 85.3%, specificity 65.8% in that paper). That is a published operating characteristic, not a diagnosis.\n\nDoes not emit later ICU papers' dose bands or website diazepam protocols (3-5 / 6-8 / >8). Those are not the 2017 derivation cuts. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"tremor","description":"Caller-assigned Rastegar 2017 BAWS tremor points (integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"diaphoresis","description":"Caller-assigned Rastegar 2017 BAWS diaphoresis (sweats) points (integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"agitation","description":"Caller-assigned Rastegar 2017 BAWS agitation points (integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"orientation","description":"Caller-assigned Rastegar 2017 BAWS confusion/orientation points (integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"hallucinations","description":"Caller-assigned Rastegar 2017 BAWS hallucinations points (integer 0-3). One item, not separate CIWA-Ar tactile/auditory/visual scores. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"BAWS (Brief Alcohol Withdrawal Scale)","operationId":"get_api_calc_baws","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, predicts_ciwa_ar_ge_8, components, citation, disclaimer."},"400":{"description":"invalid_baws: BAWS items must be integers in the Rastegar 2017 published 0-3 range for those five signs. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/baws"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"BAWS (Brief Alcohol Withdrawal Scale) (bulk)","operationId":"post_api_calc_baws","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_baws: BAWS items must be integers in the Rastegar 2017 published 0-3 range for those five signs. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/baws"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"agitation":"0","diaphoresis":"0","hallucinations":"0","orientation":"0","tremor":"0"},{"agitation":"0","diaphoresis":"0","hallucinations":"0","orientation":"0","tremor":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/whr":{"get":{"description":"Compute waist–hip ratio (WHR) as waist circumference divided by hip circumference after the same unit normalize, following the WHO 2011 expert consultation report.\n\nWhen an agent needs the published waist–hip ratio and must not apply obesity or sex-specific WHR cutoffs, assign a body-fat percentage, or invent a cardiovascular diagnosis.\n\nNot a medical device. magent does not measure the patient.\n\nNot a body-fat or cardiovascular diagnosis. The 200 is the waist–hip ratio only.\n\nDoes not apply later obesity or sex-specific WHR cutoffs from the WHO 2011 report. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"waist_cm","description":"Waist circumference in centimeters (40-200). Provide waist_cm or waist_in.","required":false,"schema":{"type":"number"},"example":"80"},{"in":"query","name":"hip_cm","description":"Hip circumference in centimeters (40-200). Provide hip_cm or hip_in.","required":false,"schema":{"type":"number"},"example":"100"},{"in":"query","name":"waist_in","description":"Waist circumference in inches. Converted as cm = in * 2.54.","required":false,"schema":{"type":"number"},"example":"32"},{"in":"query","name":"hip_in","description":"Hip circumference in inches. Converted as cm = in * 2.54.","required":false,"schema":{"type":"number"},"example":"40"}],"summary":"WHR","operationId":"get_api_calc_whr","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, waist_cm, hip_cm, whr, citation, disclaimer."},"400":{"description":"invalid_waist_range: waist_cm must be a number from 40 to 200. Returned before settlement; you are not charged.; invalid_hip_range: hip_cm must be a number from 40 to 200. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/whr"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"WHR (bulk)","operationId":"post_api_calc_whr","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_waist_range: waist_cm must be a number from 40 to 200. Returned before settlement; you are not charged.; invalid_hip_range: hip_cm must be a number from 40 to 200. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/whr"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"hip_cm":"100","waist_cm":"80"},{"hip_cm":"100","waist_cm":"80"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pedsrc":{"get":{"description":"Apply the Streck 2017 Pediatric Surgery Research Collaborative five-variable prediction rule and return whether the child is at very low risk of blunt intra-abdominal injury (none of five caller-assigned findings present). Does not order a CT.\n\nWhen an agent has caller-assigned findings after blunt abdominal trauma in a child and needs the Streck 2017 PedSRC rule, not Holmes 2013 PECARN IAI (pecarn-iai).\n\nNot a medical device. Not a diagnosis. magent does not examine the child.\n\nThis tool is the Streck 2017 five-variable PedSRC prediction rule only. It is not Holmes 2013 PECARN IAI (pecarn-iai). Presence of a criterion does not mandate CT. Do not order a CT from this tool.\n\nAST is a positive variable iff greater than 200 U/L (200 is not positive). magent does not assay AST, amylase, or lipase; the caller assigns abnormal_pancreatic_enzymes.\n\nmagent does not take age. The published derivation was age <16 years. The five clinical variables determine very_low_risk. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ast_u_l","description":"Aspartate aminotransferase in U/L (number 1-10000). Positive Streck 2017 variable iff >200 U/L (200 is not positive). magent does not assay AST.","required":true,"schema":{"type":"number"},"example":"80"},{"in":"query","name":"abnormal_abdominal_exam","description":"Abnormal abdominal examination (wall trauma, distension, or tenderness) as assigned by the caller. true means the finding is present and very_low_risk is false. true or false. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"abnormal_chest_xray","description":"Abnormal chest x-ray as assigned by the caller. true means the finding is present and very_low_risk is false. true or false. magent does not read a radiograph.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"abdominal_pain","description":"Reported abdominal pain as assigned by the caller. true means pain is present and very_low_risk is false. true or false. magent does not take a pain score.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"abnormal_pancreatic_enzymes","description":"Abnormal amylase or lipase as assigned by the caller. true means the finding is present and very_low_risk is false. true or false. magent does not assay amylase or lipase.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"PedSRC blunt abdomen","operationId":"get_api_calc_pedsrc","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, very_low_risk, ast_u_l, criteria, citation, disclaimer."},"400":{"description":"invalid_ast: ast_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pedsrc"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PedSRC blunt abdomen (bulk)","operationId":"post_api_calc_pedsrc","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ast: ast_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pedsrc"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"abdominal_pain":"false","abnormal_abdominal_exam":"false","abnormal_chest_xray":"false","abnormal_pancreatic_enzymes":"false","ast_u_l":"80"},{"abdominal_pain":"false","abnormal_abdominal_exam":"false","abnormal_chest_xray":"false","abnormal_pancreatic_enzymes":"false","ast_u_l":"80"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/shapiro":{"get":{"description":"Apply the Shapiro 2008 major/minor blood-culture prediction rule and return whether culture is indicated from caller-assigned findings and labs.\n\nWhen an agent has caller-assigned adult ED findings and labs and needs the Shapiro 2008 prediction rule for whether blood culture is indicated, not a culture order and not a sepsis diagnosis.\n\nNot a medical device. Not a diagnosis of bacteremia, sepsis, or endocarditis. magent does not examine the patient.\n\nmagent does not draw blood cultures or order cultures. culture_indicated is the published 2008 rule only.\n\nShapiro 2008 major/minor rule only (indicated if ≥1 major or ≥2 minor). Not a later point encoding of the same items.\n\nTemperature major (>39.5 °C) and minor (38.3–39.4 °C) are derived from one temperature_c; they cannot both be true. 39.5 °C is neither band.\n\nAge >65 is a minor; 65 is not. Hypotension is a caller-assigned flag for systolic blood pressure <90 mm Hg; magent does not take a blood pressure.\n\nThe caller assigns every flag and lab. magent does not inspect catheters, diagnose endocarditis, or assay a CBC or creatinine.\n\nPublished for adults ≥18 years undergoing ED blood-culture decisions. Not SIRS, not qSOFA, and not a sepsis protocol. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120). Age >65 is a Shapiro 2008 minor criterion; 65 is not. The published rule is for adults ≥18 years.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"temperature_c","description":"Temperature in °C (30.0-45.0). Major when >39.5 (39.5 is not). Minor when 38.3–39.4 inclusive. magent does not measure temperature.","required":true,"schema":{"type":"number"},"example":"37.0"},{"in":"query","name":"catheter","description":"Indwelling vascular catheter (Shapiro 2008 major). true or false as assigned by the caller. magent does not inspect lines.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"suspected_endocarditis","description":"Clinical suspicion of endocarditis (Shapiro 2008 major). true or false as assigned by the caller. magent does not diagnose endocarditis.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"chills","description":"Chills (Shapiro 2008 minor). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"vomiting","description":"Vomiting (Shapiro 2008 minor). true or false as assigned by the caller. magent does not observe vomiting.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypotension","description":"Hypotension (Shapiro 2008 minor: systolic blood pressure < 90 mm Hg). true or false as assigned by the caller. magent does not measure blood pressure.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"neutrophil_percent","description":"Neutrophil percent (0-100). Shapiro 2008 minor when >80 (80 does not). magent does not assay a CBC.","required":true,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"wbc_k","description":"White blood cell count in thousands (0-500; same as 10^3/µL). Shapiro 2008 minor when >18 (18 does not). magent does not assay a CBC.","required":true,"schema":{"type":"number"},"example":"10"},{"in":"query","name":"bands_percent","description":"Band percent (0-100). Shapiro 2008 minor when >5 (5 does not). magent does not assay a CBC.","required":true,"schema":{"type":"number"},"example":"2"},{"in":"query","name":"platelets_k","description":"Platelet count in thousands (0-2000; same as 10^3/µL). Shapiro 2008 minor when <150 (150 does not). magent does not assay a CBC.","required":true,"schema":{"type":"number"},"example":"250"},{"in":"query","name":"creatinine_mg_dl","description":"Creatinine in mg/dL (0.1-20.0). Shapiro 2008 minor when >2.0 (2.0 does not). magent does not assay creatinine.","required":true,"schema":{"type":"number"},"example":"1.0"}],"summary":"Shapiro blood culture rule","operationId":"get_api_calc_shapiro","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, culture_indicated, major_count, minor_count, age, temperature_c, criteria, citation, disclaimer."},"400":{"description":"invalid_shapiro: Shapiro-rule inputs must be the 2008 major and minor bacteremia criteria (temperature, catheter, endocarditis suspicion, age, chills, vomiting, hypotension, and listed labs). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/shapiro"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Shapiro blood culture rule (bulk)","operationId":"post_api_calc_shapiro","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_shapiro: Shapiro-rule inputs must be the 2008 major and minor bacteremia criteria (temperature, catheter, endocarditis suspicion, age, chills, vomiting, hypotension, and listed labs). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/shapiro"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","bands_percent":"2","catheter":"false","chills":"false","creatinine_mg_dl":"1.0","hypotension":"false","neutrophil_percent":"70","platelets_k":"250","suspected_endocarditis":"false","temperature_c":"37.0","vomiting":"false","wbc_k":"10"},{"age":"40","bands_percent":"2","catheter":"false","chills":"false","creatinine_mg_dl":"1.0","hypotension":"false","neutrophil_percent":"70","platelets_k":"250","suspected_endocarditis":"false","temperature_c":"37.0","vomiting":"false","wbc_k":"10"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pecarn-iai":{"get":{"description":"Apply the Holmes 2013 PECARN seven-variable prediction rule and return whether the child is at very low risk of intra-abdominal injury requiring acute intervention (all seven caller-assigned findings absent). Does not order a CT.\n\nWhen an agent has caller-assigned findings after blunt torso trauma in a child and needs the Holmes 2013 PECARN IAI rule, not PECARN head CT (pecarn-head).\n\nNot a medical device. Not a diagnosis. magent does not examine the patient.\n\nThis tool is the Holmes 2013 PECARN seven-variable IAI prediction rule only. It is not PECARN head CT (pecarn-head) and does not implement the 2024 Lancet validation as a second rule.\n\nVery low risk of IAI requiring acute intervention only when all seven caller-assigned findings are absent. Presence of a criterion does not mandate CT. Do not order a CT from this tool.\n\nThe caller assigns all flags, including GCS <14 (not the PECARN head GCS <=14 flag). magent does not take a GCS integer or classify mechanism. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"abdominal_wall_trauma_or_seatbelt_sign","description":"Evidence of abdominal wall trauma or seatbelt sign as assigned by the caller (Holmes 2013 first-ranked criterion). true means the finding is present and very_low_risk_iai_intervention is false. true or false. magent does not examine the abdomen.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"gcs_less_than_14","description":"GCS score <14 as assigned by the caller (paper: GCS <14; equivalently GCS >13 is the low-risk direction). true means GCS <14 and very_low_risk_iai_intervention is false. true or false. This is not the PECARN head GCS <=14 flag. magent does not take a GCS integer.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"abdominal_tenderness","description":"Abdominal tenderness as assigned by the caller. true means tenderness is present and very_low_risk_iai_intervention is false. true or false. magent does not palpate the abdomen.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"thoracic_wall_trauma","description":"Evidence of thoracic wall trauma as assigned by the caller. true means the finding is present and very_low_risk_iai_intervention is false. true or false. magent does not examine the chest.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"abdominal_pain","description":"Complaints of abdominal pain as assigned by the caller. true means pain is present and very_low_risk_iai_intervention is false. true or false. magent does not take a pain score.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"decreased_breath_sounds","description":"Decreased breath sounds as assigned by the caller. true means decreased breath sounds are present and very_low_risk_iai_intervention is false. true or false. magent does not auscultate the chest.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"vomiting","description":"History of vomiting as assigned by the caller. true means vomiting is present and very_low_risk_iai_intervention is false. true or false. magent does not take a vomit count.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"PECARN pediatric IAI","operationId":"get_api_calc_pecarn_iai","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, very_low_risk_iai_intervention, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pecarn-iai"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PECARN pediatric IAI (bulk)","operationId":"post_api_calc_pecarn_iai","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pecarn-iai"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"abdominal_pain":"false","abdominal_tenderness":"false","abdominal_wall_trauma_or_seatbelt_sign":"false","decreased_breath_sounds":"false","gcs_less_than_14":"false","thoracic_wall_trauma":"false","vomiting":"false"},{"abdominal_pain":"false","abdominal_tenderness":"false","abdominal_wall_trauma_or_seatbelt_sign":"false","decreased_breath_sounds":"false","gcs_less_than_14":"false","thoracic_wall_trauma":"false","vomiting":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/nafld-nas":{"get":{"description":"Return the Kleiner 2005 NAFLD activity score (NAS) as the sum of three caller-assigned integer components (steatosis 0-3, lobular_inflammation 0-3, ballooning 0-2). Max 8. Does not return NASH diagnostic bands.\n\nWhen an agent already has Kleiner 2005 NAS component points and needs the published total. magent does not read histology or assign grades from a narrative, and does not apply NASH diagnostic cutoffs.\n\nNot a medical device and not a NASH diagnosis, biopsy, or treatment order. magent does not read histology.\n\nInputs are caller-assigned Kleiner 2005 point integers (steatosis 0-3, lobular_inflammation 0-3, ballooning 0-2), not percent fat, foci counts, or a fibrosis stage. Paper bins: steatosis <5% / 5–33% / >33–66% / >66%; lobular inflammation none / <2 foci per 200× / 2–4 / >4; ballooning none / few / many or prominent.\n\nKleiner 2005 stages fibrosis separately. Fibrosis is not in NAS and is not an input to this tool.\n\nKleiner 2005 reported NAS ≥5 correlated with NASH in that study; that is not a diagnostic algorithm. magent returns score and max_score only and does not apply NASH diagnostic bands. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"steatosis","description":"Caller-assigned Kleiner 2005 steatosis points 0-3 (paper bins: 0 <5%; 1 5–33%; 2 >33–66%; 3 >66%). magent does not read histology.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"lobular_inflammation","description":"Caller-assigned Kleiner 2005 lobular inflammation points 0-3 (paper bins: 0 none; 1 <2 foci/200×; 2 2–4 foci/200×; 3 >4 foci/200×). magent does not read histology.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"ballooning","description":"Caller-assigned Kleiner 2005 hepatocellular ballooning points 0-2 (paper bins: 0 none; 1 few; 2 many/prominent). magent does not read histology.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"NAS","operationId":"get_api_calc_nafld_nas","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, steatosis, lobular_inflammation, ballooning, components, citation, disclaimer."},"400":{"description":"invalid_nafld_nas: steatosis must be an integer 0-3, lobular_inflammation an integer 0-3, and ballooning an integer 0-2 (Kleiner 2005 NAS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nafld-nas"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"NAS (bulk)","operationId":"post_api_calc_nafld_nas","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_nafld_nas: steatosis must be an integer 0-3, lobular_inflammation an integer 0-3, and ballooning an integer 0-2 (Kleiner 2005 NAS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nafld-nas"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ballooning":"0","lobular_inflammation":"0","steatosis":"0"},{"ballooning":"0","lobular_inflammation":"0","steatosis":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mulbsta":{"get":{"description":"Sum Guo 2019 MuLBSTA points from age, exclusive smoking status, absolute lymphocyte count, and caller-assigned flags, and return the published total (max 20) and low/high band.\n\nWhen an agent has already assigned Guo 2019 MuLBSTA inputs and needs the published point total and low (0-11) or high (≥12) band, not a viral-species diagnosis or a treatment order.\n\nNot a medical device and not a viral-species diagnosis, site-of-care decision, or treatment order.\n\nmagent does not read imaging or assign smoking history. multilobular_infiltrates, bacterial_coinfection, hypertension, and smoking are caller-assigned.\n\nSmoking is mutually exclusive: never (0), former / quit-smoker (2), or current / acute-smoker (3). Current and former cannot both apply. Max score is 20, not the paper Table 5 12-22 wording.\n\nBands follow Guo 2019 only: low score 0-11 (paper mortality 5.07%) and high score ≥12 (paper 33.92%). No other cut-points. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Age ≥60 scores 2 (Guo 2019). magent does not compute age.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"smoking","description":"Exclusive Guo 2019 smoking status: never (0), former / quit-smoker (2), or current / acute-smoker (3). Current and former cannot both apply. Assigned by the caller; magent does not assign smoking history.","required":true,"schema":{"type":"string"},"example":"never"},{"in":"query","name":"lymphocyte_k_ul","description":"Absolute lymphocyte count ×10^9/L (0.05-20). Scores 4 when ≤0.8 (Guo 2019). magent does not read a CBC.","required":true,"schema":{"type":"number"},"example":"1.5"},{"in":"query","name":"multilobular_infiltrates","description":"Multilobular infiltrates as assigned by the caller (Guo 2019). true scores 5. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bacterial_coinfection","description":"Bacterial coinfection as assigned by the caller (Guo 2019). true scores 4. magent does not diagnose coinfection.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypertension","description":"Hypertension as assigned by the caller (Guo 2019). true scores 2. magent does not take a blood pressure.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"MuLBSTA","operationId":"get_api_calc_mulbsta","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, mulbsta_band, age_years, smoking, lymphocyte_k_ul, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_mulbsta_smoking: smoking must be never, former, or current (Guo 2019 MuLBSTA; current and former are mutually exclusive). Returned before settlement; you are not charged.; invalid_lymphocyte_count: lymphocyte_k_ul must be a number from 0.05 to 20 (absolute lymphocyte count ×10^9/L). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mulbsta"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"MuLBSTA (bulk)","operationId":"post_api_calc_mulbsta","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_mulbsta_smoking: smoking must be never, former, or current (Guo 2019 MuLBSTA; current and former are mutually exclusive). Returned before settlement; you are not charged.; invalid_lymphocyte_count: lymphocyte_k_ul must be a number from 0.05 to 20 (absolute lymphocyte count ×10^9/L). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mulbsta"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","bacterial_coinfection":"false","hypertension":"false","lymphocyte_k_ul":"1.5","multilobular_infiltrates":"false","smoking":"never"},{"age":"50","bacterial_coinfection":"false","hypertension":"false","lymphocyte_k_ul":"1.5","multilobular_infiltrates":"false","smoking":"never"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/das28-esr":{"get":{"description":"Compute the Prevoo 1995 28-joint DAS with ESR from caller-assigned tender and swollen 28-joint counts, ESR in mm/h, and patient general health on a 0-100 mm VAS. Returns the published score only.\n\nWhen an agent already has 28-joint tender and swollen counts, ESR in mm/h, and a 0-100 mm patient global and needs the Prevoo 1995 DAS28-ESR arithmetic, not SDAI, not CDAI, not DAS28-CRP, and not later EULAR 2.6/3.2/5.1 cutoffs.\n\nNot a medical device and not a rheumatoid arthritis diagnosis or a treatment order.\n\nmagent does not count joints or assay ESR. tjc28, sjc28, esr_mm_h, and gh are caller-assigned. GH is millimetres on a 0-100 VAS, not 0-10 cm CDAI/SDAI.\n\nPrevoo 1995 publishes this 28-joint DAS and discriminates high vs low activity by rheumatologist decision. It does not publish the later EULAR 2.6 / 3.2 / 5.1 cutoffs. magent returns the score only.\n\nNot SDAI. Not CDAI. Not DAS28-CRP. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"tjc28","description":"Caller-assigned tender joint count on the 28-joint set (Prevoo 1995). Integer 0-28. magent does not count joints.","required":true,"schema":{"type":"integer"},"example":0},{"in":"query","name":"sjc28","description":"Caller-assigned swollen joint count on the 28-joint set (Prevoo 1995). Integer 0-28. magent does not count joints.","required":true,"schema":{"type":"integer"},"example":0},{"in":"query","name":"esr_mm_h","description":"Caller-assigned erythrocyte sedimentation rate in mm/h. Strictly >0 (typical 1-150 magent clamp). Natural log in the formula. magent does not assay ESR.","required":true,"schema":{"type":"number"},"example":10},{"in":"query","name":"gh","description":"Caller-assigned patient general health on a 0-100 mm VAS (Prevoo 1995). Number 0-100. Not 0-10 CDAI/SDAI centimetres. magent does not examine the patient.","required":true,"schema":{"type":"number"},"example":0}],"summary":"DAS28-ESR","operationId":"get_api_calc_das28_esr","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, tjc28, sjc28, esr_mm_h, gh, citation, disclaimer."},"400":{"description":"invalid_das28_esr: DAS28-ESR inputs must match Prevoo 1995 28-joint counts, ESR, and 0-100 general health. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/das28-esr"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"DAS28-ESR (bulk)","operationId":"post_api_calc_das28_esr","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_das28_esr: DAS28-ESR inputs must match Prevoo 1995 28-joint counts, ESR, and 0-100 general health. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/das28-esr"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"esr_mm_h":"10","gh":"0","sjc28":"0","tjc28":"0"},{"esr_mm_h":"10","gh":"0","sjc28":"0","tjc28":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-cnvs":{"get":{"description":"Apply the Stanghellini 2016 Rome IV chronic nausea vomiting syndrome (CNVS, B3a) diagnostic criteria and return whether the published CNVS box holds (rome_iv_cnvs).\n\nWhen an agent already has the five caller-assigned Stanghellini 2016 Rome IV chronic nausea vomiting syndrome flags and needs whether the published CNVS box holds. magent does not take a history or read endoscopy.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose chronic nausea vomiting syndrome.\n\nThe caller assigns the five flags. magent does not take a history or read endoscopy.\n\nThis tool is Stanghellini 2016 Rome IV chronic nausea vomiting syndrome (B3a) only. Criterion 1 (bothersome nausea at least 1 day per week and/or one or more vomiting episodes per week) is one caller flag, not two. Not cyclic vomiting syndrome (CVS). Not cannabinoid hyperemesis syndrome (CHS). Not rumination. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"bothersome_nausea_or_vomiting_weekly","description":"Bothersome (severe enough to impact usual activities) nausea at least 1 day per week and/or one or more vomiting episodes per week (Stanghellini 2016 Rome IV CNVS B3a). One caller flag covering nausea and/or vomiting. true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"self_induced_vomiting_eating_disorders_regurgitation_rumination_excluded","description":"Self-induced vomiting, eating disorders, regurgitation, and rumination have been excluded (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"no_organic_systemic_metabolic_explanation","description":"No evidence of organic, systemic, or metabolic disease likely to explain the symptoms on routine investigations including at upper endoscopy, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not read endoscopy.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"fulfilled_last_3_months","description":"Criteria fulfilled for the last 3 months, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"onset_at_least_6_months","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV CNVS","operationId":"get_api_calc_rome_iv_cnvs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, rome_iv_cnvs, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_cnvs: Rome IV chronic nausea vomiting needs the Stanghellini 2016 gastroduodenal CNVS flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-cnvs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV CNVS (bulk)","operationId":"post_api_calc_rome_iv_cnvs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_cnvs: Rome IV chronic nausea vomiting needs the Stanghellini 2016 gastroduodenal CNVS flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-cnvs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bothersome_nausea_or_vomiting_weekly":"true","fulfilled_last_3_months":"true","no_organic_systemic_metabolic_explanation":"true","onset_at_least_6_months":"true","self_induced_vomiting_eating_disorders_regurgitation_rumination_excluded":"true"},{"bothersome_nausea_or_vomiting_weekly":"true","fulfilled_last_3_months":"true","no_organic_systemic_metabolic_explanation":"true","onset_at_least_6_months":"true","self_induced_vomiting_eating_disorders_regurgitation_rumination_excluded":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/egri":{"get":{"description":"Sum the El-Ganzouri 1996 simplified airway risk index (seven 0/1/2 items; max 12) and return high_risk when the score is 4 or more.\n\nWhen an agent already has the seven El-Ganzouri 1996 Methods items and needs the published simplified-index total. magent does not examine the airway. Original 3-class Mallampati only; not Samsoon class IV and not HEAVEN.\n\nNot a medical device. magent does not examine the airway. Not an intubation order.\n\nEl-Ganzouri 1996 original 3-class Mallampati only (classes 1-3). Samsoon class IV is not used; mallampati 4 is rejected.\n\nNot HEAVEN. The seven simplified-index items and 0/1/2 weights follow El-Ganzouri 1996 Methods. High risk is a simplified-index value of four or more (Grade IV vs Mallampati III), not an intubation order. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"mouth_opening_cm","description":"Interincisor gap in centimetres (0.5-10) as assigned by the caller. El-Ganzouri 1996: >4 cm scores 0; <=4 cm scores 1. Exactly 4.0 scores 1. magent does not measure mouth opening.","required":true,"schema":{"type":"number"},"example":"5"},{"in":"query","name":"thyromental_cm","description":"Thyromental distance in centimetres (2-15) as assigned by the caller. El-Ganzouri 1996: >6.5 cm scores 0; 6.0-6.5 inclusive scores 1; <6.0 cm scores 2. Exactly 6.5 scores 1.","required":true,"schema":{"type":"number"},"example":"7"},{"in":"query","name":"mallampati","description":"Original Mallampati class 1, 2, or 3 as assigned by the caller (El-Ganzouri 1996). 1 scores 0; 2 scores 1; 3 scores 2. Samsoon class 4 is not used and is rejected.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"neck_movement_deg","description":"Head and neck range of motion in degrees (0-180) as assigned by the caller. El-Ganzouri 1996: >90 scores 0; 80-90 inclusive scores 1; <80 scores 2. Exactly 90 scores 1. magent does not measure neck motion.","required":true,"schema":{"type":"number"},"example":"100"},{"in":"query","name":"can_prognath","description":"Ability to prognath (jaw protrusion) as assigned by the caller (El-Ganzouri 1996). true scores 0; false scores 1. true or false.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"weight_kg","description":"Body weight in kilograms (1-500). Provide weight_kg or weight_lb. El-Ganzouri 1996: <90 kg scores 0; 90-110 inclusive scores 1; >110 kg scores 2. Exactly 90 and 110 score 1.","required":false,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"weight_lb","description":"Body weight in pounds (2-1100). Converted as kg = lb × 0.45359237, then the El-Ganzouri 1996 kg bands apply. Provide weight_kg or weight_lb.","required":false,"schema":{"type":"number"},"example":"154"},{"in":"query","name":"history_difficult_intubation","description":"History of difficult intubation as assigned by the caller (El-Ganzouri 1996): none scores 0, questionable scores 1, definite scores 2.","required":true,"schema":{"type":"string","enum":["none","questionable","definite"]},"example":"none"}],"summary":"EGRI","operationId":"get_api_calc_egri","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, high_risk, egri_band, mouth_opening_cm, thyromental_cm, mallampati, neck_movement_deg, can_prognath, weight_kg, history_difficult_intubation, components, citation, disclaimer."},"400":{"description":"invalid_mouth_opening: mouth_opening_cm must be a number from 0.5 to 10 (El-Ganzouri 1996 interincisor gap). Returned before settlement; you are not charged.; invalid_thyromental: thyromental_cm must be a number from 2 to 15 (El-Ganzouri 1996 thyromental distance). Returned before settlement; you are not charged.; invalid_egri_mallampati: mallampati must be 1, 2, or 3 (El-Ganzouri 1996 original Mallampati; Samsoon class 4 is not used). Returned before settlement; you are not charged.; invalid_neck_movement: neck_movement_deg must be a number from 0 to 180 (El-Ganzouri 1996 head/neck range of motion). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_intubation_history: history_difficult_intubation must be none, questionable, or definite (El-Ganzouri 1996). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/egri"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"EGRI (bulk)","operationId":"post_api_calc_egri","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_mouth_opening: mouth_opening_cm must be a number from 0.5 to 10 (El-Ganzouri 1996 interincisor gap). Returned before settlement; you are not charged.; invalid_thyromental: thyromental_cm must be a number from 2 to 15 (El-Ganzouri 1996 thyromental distance). Returned before settlement; you are not charged.; invalid_egri_mallampati: mallampati must be 1, 2, or 3 (El-Ganzouri 1996 original Mallampati; Samsoon class 4 is not used). Returned before settlement; you are not charged.; invalid_neck_movement: neck_movement_deg must be a number from 0 to 180 (El-Ganzouri 1996 head/neck range of motion). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_intubation_history: history_difficult_intubation must be none, questionable, or definite (El-Ganzouri 1996). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/egri"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"can_prognath":"true","history_difficult_intubation":"none","mallampati":"1","mouth_opening_cm":"5","neck_movement_deg":"100","thyromental_cm":"7","weight_kg":"70"},{"can_prognath":"true","history_difficult_intubation":"none","mallampati":"1","mouth_opening_cm":"5","neck_movement_deg":"100","thyromental_cm":"7","weight_kg":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/fli":{"get":{"description":"Compute the Bedogni 2006 fatty liver index from caller-supplied BMI, waist circumference, triglycerides, and GGT as a predictor of hepatic steatosis in the general population.\n\nWhen an agent needs published Bedogni 2006 FLI arithmetic and must not invent an imaging diagnosis, hepatic steatosis index cutoffs, or NAFLD fibrosis score bands.\n\nNot a medical device. Not a steatosis diagnosis and not a substitute for imaging.\n\nBMI is caller-supplied. magent does not compute BMI from height and weight in this tool.\n\nBedogni 2006 FLI only. Not the hepatic steatosis index, not the NAFLD fibrosis score, not FIB-4, and not APRI. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"bmi_kg_m2","description":"Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI.","required":true,"schema":{"type":"number"},"example":"22"},{"in":"query","name":"waist_cm","description":"Waist circumference in cm (40-200).","required":true,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"ggt_u_l","description":"Gamma-glutamyltransferase in U/L (1-2000).","required":true,"schema":{"type":"number"},"example":"20"},{"in":"query","name":"triglycerides_mg_dl","description":"Triglycerides in mg/dL (10-2000). Italian lab units in Bedogni 2006. Provide this or triglycerides_mmol_l, not both.","required":false,"schema":{"type":"number"},"example":"80"},{"in":"query","name":"triglycerides_mmol_l","description":"Triglycerides in mmol/L (0.11-22.6). Converted as mg/dL = mmol/L * 88.57. Provide this or triglycerides_mg_dl, not both.","required":false,"schema":{"type":"number"},"example":"0.90"}],"summary":"Fatty liver index","operationId":"get_api_calc_fli","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, bmi_kg_m2, waist_cm, ggt_u_l, triglycerides_mg_dl, l, fli, bedogni_band, citation, disclaimer."},"400":{"description":"invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_waist_cm: waist_cm must be a number from 40 to 200 (Bedogni 2006 FLI). Returned before settlement; you are not charged.; invalid_ggt: ggt_u_l must be a number from 1 to 2000 (Bedogni 2006 FLI). Returned before settlement; you are not charged.; invalid_fli_triglyceride: triglycerides_mg_dl (10-2000) or triglycerides_mmol_l (0.11-22.6) is required, not both (Bedogni 2006 FLI; mg/dL = mmol/L * 88.57). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/fli"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Fatty liver index (bulk)","operationId":"post_api_calc_fli","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_waist_cm: waist_cm must be a number from 40 to 200 (Bedogni 2006 FLI). Returned before settlement; you are not charged.; invalid_ggt: ggt_u_l must be a number from 1 to 2000 (Bedogni 2006 FLI). Returned before settlement; you are not charged.; invalid_fli_triglyceride: triglycerides_mg_dl (10-2000) or triglycerides_mmol_l (0.11-22.6) is required, not both (Bedogni 2006 FLI; mg/dL = mmol/L * 88.57). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/fli"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bmi_kg_m2":"22","ggt_u_l":"20","triglycerides_mg_dl":"80","waist_cm":"70"},{"bmi_kg_m2":"22","ggt_u_l":"20","triglycerides_mg_dl":"80","waist_cm":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pittsburgh-knee":{"get":{"description":"Apply the Seaberg 1994 Pittsburgh knee rule: a knee radiograph is indicated after fall or blunt trauma if the patient cannot walk four weight-bearing steps or is younger than 12 or older than 50.\n\nWhen an agent needs the published Pittsburgh knee radiography rule and must not apply the Ottawa knee rule or invent a different age cutoff.\n\nNot a diagnosis of fracture. magent does not examine the knee.\n\nWithout fall or blunt trauma the rule does not indicate a film.\n\nAge 12 and age 50 do not meet the age limb (younger than 12 or older than 50). This is not the Ottawa knee rule (Stiell 1995). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (0-120). Seaberg 1994: younger than 12 or older than 50 meets the age limb; 12 and 50 do not.","required":true,"schema":{"type":"integer"},"example":"30"},{"in":"query","name":"blunt_trauma_or_fall","description":"Fall or blunt trauma mechanism (Seaberg 1994). true or false as assigned by the caller. The rule does not indicate a film without this mechanism.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"unable_to_walk_four_steps","description":"Inability to ambulate four weight-bearing steps (Seaberg 1994). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Pittsburgh knee","operationId":"get_api_calc_pittsburgh_knee","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, xray_indicated, age_years, blunt_trauma_or_fall, unable_to_walk_four_steps, criteria, citation, disclaimer."},"400":{"description":"invalid_pittsburgh_age: age must be an integer from 0 to 120 (Seaberg 1994 includes children). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pittsburgh-knee"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Pittsburgh knee (bulk)","operationId":"post_api_calc_pittsburgh_knee","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pittsburgh_age: age must be an integer from 0 to 120 (Seaberg 1994 includes children). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pittsburgh-knee"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"30","blunt_trauma_or_fall":"true","unable_to_walk_four_steps":"false"},{"age":"30","blunt_trauma_or_fall":"true","unable_to_walk_four_steps":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/smast":{"get":{"description":"Count Selzer 1975 SMAST alcoholic-direction answers and return the published 0-1 nonalcoholic, 2 possible, and ≥3 alcoholic bands.\n\nWhen an agent has already assigned the 13 SMAST yes/no items and needs that paper's scored total and cutoffs, not the 25-item MAST, Brief MAST, SMAST-G, or later clinic 0-2 / 3 / ≥4 tables.\n\nNot a medical device.\n\nNot a diagnosis of alcoholism or alcohol use disorder.\n\nmagent does not interview the patient. Each item is caller-assigned yes/no.\n\nScoring uses the Selzer 1975 alcoholic-direction key. feel_normal_drinker, friends_think_normal_drinker, and able_to_stop score 1 if false. magent does not award 1 point for every yes.\n\nThis is the 13-item SMAST only. Not the 25-item MAST, not Pokorny 1972 Brief MAST, and not SMAST-G.\n\nCutoffs are this paper's 0-1 nonalcoholic, 2 possible, and ≥3 alcoholic. magent does not apply later clinic 0-2 / 3 borderline / ≥4 tables. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"feel_normal_drinker","description":"Do you feel you are a normal drinker? (By normal we mean you drink less than or as much as most other people.) (Selzer 1975 SMAST item 1). true or false as assigned by the caller. false is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"relative_worry_or_complain","description":"Does your wife, husband, a parent, or other near relative ever worry or complain about your drinking? (Selzer 1975 SMAST item 2). true or false as assigned by the caller. true is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"feel_guilty","description":"Do you ever feel guilty about your drinking? (Selzer 1975 SMAST item 3). true or false as assigned by the caller. true is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"friends_think_normal_drinker","description":"Do friends or relatives think you are a normal drinker? (Selzer 1975 SMAST item 4). true or false as assigned by the caller. false is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"able_to_stop","description":"Are you able to stop drinking when you want to? (Selzer 1975 SMAST item 5). true or false as assigned by the caller. false is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"attended_aa","description":"Have you ever attended a meeting of Alcoholics Anonymous? (Selzer 1975 SMAST item 6). true or false as assigned by the caller. true is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"drinking_created_problems","description":"Has drinking ever created problems between you and your wife, husband, a parent, or other near relative? (Selzer 1975 SMAST item 7). true or false as assigned by the caller. true is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"trouble_at_work","description":"Have you ever gotten into trouble at work because of drinking? (Selzer 1975 SMAST item 8). true or false as assigned by the caller. true is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"neglected_obligations","description":"Have you ever neglected your obligations, your family, or your work for two or more days in a row because you were drinking? (Selzer 1975 SMAST item 9). true or false as assigned by the caller. true is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"gone_for_help","description":"Have you ever gone to anyone for help about your drinking? (Selzer 1975 SMAST item 10). true or false as assigned by the caller. true is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hospital_because_of_drinking","description":"Have you ever been in a hospital because of drinking? (Selzer 1975 SMAST item 11). true or false as assigned by the caller. true is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"arrested_drunk_driving","description":"Have you ever been arrested for drunk driving, driving while intoxicated, or driving after drinking? (Selzer 1975 SMAST item 12). true or false as assigned by the caller. true is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"arrested_drunken_behavior","description":"Have you ever been arrested, even for a few hours, because of drunken behavior? (Selzer 1975 SMAST item 13). true or false as assigned by the caller. true is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"SMAST","operationId":"get_api_calc_smast","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, band, components, citation, disclaimer."},"400":{"description":"invalid_smast: Each SMAST item must be yes or no as in Selzer 1975; reverse-scored items use that paper's key. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/smast"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SMAST (bulk)","operationId":"post_api_calc_smast","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_smast: Each SMAST item must be yes or no as in Selzer 1975; reverse-scored items use that paper's key. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/smast"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"able_to_stop":"true","arrested_drunk_driving":"false","arrested_drunken_behavior":"false","attended_aa":"false","drinking_created_problems":"false","feel_guilty":"false","feel_normal_drinker":"true","friends_think_normal_drinker":"true","gone_for_help":"false","hospital_because_of_drinking":"false","neglected_obligations":"false","relative_worry_or_complain":"false","trouble_at_work":"false"},{"able_to_stop":"true","arrested_drunk_driving":"false","arrested_drunken_behavior":"false","attended_aa":"false","drinking_created_problems":"false","feel_guilty":"false","feel_normal_drinker":"true","friends_think_normal_drinker":"true","gone_for_help":"false","hospital_because_of_drinking":"false","neglected_obligations":"false","relative_worry_or_complain":"false","trouble_at_work":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pediatric-nihss":{"get":{"description":"Sum Ichord 2011 PedNIHSS points from 15 caller-assigned NINDS NIH Stroke Scale integers, with left and right motor arm and leg. Does not apply total-score severity bands.\n\nWhen an agent already has Ichord 2011 PedNIHSS integers and needs that published total. magent does not examine the child, score Brott 1989 15-item NIHSS, score mNIHSS, or issue a tPA order.\n\nNot a medical device. magent does not examine the child. Each item is a caller-assigned Ichord 2011 / NINDS integer. Not a diagnosis.\n\nThis is the Ichord 2011 pediatric adaptation of the NINDS NIH Stroke Scale: all examination items and scoring ranges retained, with left and right motor arm and leg (each 0-4) and visual 0-3. It is not the Brott 1989 15-item NIHSS (weaker-limb motor, pupillary response, plantar reflex, max 37). Not mNIHSS. Not a tPA order.\n\nIchord 2011 published no total-score mild/moderate/severe cutoffs. This tool returns score and max_score only. It does not apply later 5/15/20 website cuts. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"loc","description":"Caller-assigned Ichord 2011 PedNIHSS level of consciousness (integer 0-3): 0 alert, 1 not alert but arousable, 2 not alert requires repeated stimulation, 3 unresponsive. magent does not examine the child.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"loc_questions","description":"Caller-assigned Ichord 2011 PedNIHSS LOC questions (integer 0-2): 0 answers both correctly, 1 answers one correctly, 2 incorrect. magent does not examine the child.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"loc_commands","description":"Caller-assigned Ichord 2011 PedNIHSS LOC commands (integer 0-2): 0 obeys both correctly, 1 obeys one correctly, 2 incorrect. magent does not examine the child.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"best_gaze","description":"Caller-assigned Ichord 2011 PedNIHSS best gaze (integer 0-2): 0 normal, 1 partial gaze palsy, 2 forced deviation. magent does not examine the child.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"best_visual","description":"Caller-assigned Ichord 2011 PedNIHSS best visual, NINDS range (integer 0-3): 0 no visual loss, 1 partial hemianopia, 2 complete hemianopia, 3 bilateral hemianopia. Not Brott 0-2. magent does not examine the child.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"facial_palsy","description":"Caller-assigned Ichord 2011 PedNIHSS facial palsy (integer 0-3): 0 normal, 1 minor, 2 partial, 3 complete. magent does not examine the child.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"motor_left_arm","description":"Caller-assigned Ichord 2011 PedNIHSS left arm motor, NINDS style (integer 0-4): 0 no drift, 1 drift, 2 some effort against gravity, 3 no effort against gravity, 4 no movement. Not Brott weaker-limb. magent does not examine the child.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"motor_right_arm","description":"Caller-assigned Ichord 2011 PedNIHSS right arm motor, NINDS style (integer 0-4): 0 no drift, 1 drift, 2 some effort against gravity, 3 no effort against gravity, 4 no movement. Not Brott weaker-limb. magent does not examine the child.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"motor_left_leg","description":"Caller-assigned Ichord 2011 PedNIHSS left leg motor, NINDS style (integer 0-4): 0 no drift, 1 drift, 2 some effort against gravity, 3 no effort against gravity, 4 no movement. Not Brott weaker-limb. magent does not examine the child.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"motor_right_leg","description":"Caller-assigned Ichord 2011 PedNIHSS right leg motor, NINDS style (integer 0-4): 0 no drift, 1 drift, 2 some effort against gravity, 3 no effort against gravity, 4 no movement. Not Brott weaker-limb. magent does not examine the child.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"limb_ataxia","description":"Caller-assigned Ichord 2011 PedNIHSS limb ataxia (integer 0-2): 0 absent, 1 present in one limb, 2 present in two limbs. magent does not examine the child.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"sensory","description":"Caller-assigned Ichord 2011 PedNIHSS sensory (integer 0-2): 0 normal, 1 mild to moderate loss, 2 severe to total loss. magent does not examine the child.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"best_language","description":"Caller-assigned Ichord 2011 PedNIHSS best language (integer 0-3): 0 no aphasia, 1 mild to moderate, 2 severe aphasia, 3 mute or global aphasia. magent does not examine the child.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"dysarthria","description":"Caller-assigned Ichord 2011 PedNIHSS dysarthria (integer 0-2): 0 normal articulation, 1 mild to moderate, 2 severe or unintelligible. magent does not examine the child.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"extinction","description":"Caller-assigned Ichord 2011 PedNIHSS extinction and inattention (integer 0-2): 0 no abnormality, 1 inattention to one modality, 2 profound hemi-inattention or extinction to more than one modality. Not Brott neglect. magent does not examine the child.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"}],"summary":"PedNIHSS","operationId":"get_api_calc_pediatric_nihss","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_pediatric_nihss: PedNIHSS needs Ichord pediatric NIH Stroke Scale item scores in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pediatric-nihss"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PedNIHSS (bulk)","operationId":"post_api_calc_pediatric_nihss","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pediatric_nihss: PedNIHSS needs Ichord pediatric NIH Stroke Scale item scores in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pediatric-nihss"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"best_gaze":"0","best_language":"0","best_visual":"0","dysarthria":"0","extinction":"0","facial_palsy":"0","limb_ataxia":"0","loc":"0","loc_commands":"0","loc_questions":"0","motor_left_arm":"0","motor_left_leg":"0","motor_right_arm":"0","motor_right_leg":"0","sensory":"0"},{"best_gaze":"0","best_language":"0","best_visual":"0","dysarthria":"0","extinction":"0","facial_palsy":"0","limb_ataxia":"0","loc":"0","loc_commands":"0","loc_questions":"0","motor_left_arm":"0","motor_left_leg":"0","motor_right_arm":"0","motor_right_leg":"0","sensory":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ssign":{"get":{"description":"Sum the Frank 2002 SSIGN score from caller-assigned 1997 TNM, tumor size, nuclear grade, and coagulative necrosis, and return the published cancer-specific survival row.\n\nWhen an agent already has 1997 pathologic T, N, and M, tumor size in cm, nuclear grade, and coagulative necrosis and needs the published SSIGN total and CSS row. magent does not stage the tumor or read slides, and must not invent an RCC diagnosis or a later-TNM conversion.\n\nNot a medical device. magent does not stage the tumor or read pathology.\n\n1997 TNM weights from Frank 2002 only. Not 2002 or 2010 TNM. pT4 scores 0 as published. The caller maps TNM; magent does not convert later editions.\n\nSize uses unrounded cm; 5.0 cm scores 2. Magent clamp 0.1-40 cm is not a published range.\n\nPublished CSS percents are Frank 2002 cohort Kaplan-Meier rows, not an individualized prediction or a treatment recommendation.\n\nNot UISS. Not an RCC diagnosis. Clear-cell radical-nephrectomy cohort only. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"t_1997","description":"1997 pathologic T as assigned by the caller (Frank 2002 SSIGN). t1 scores 0; t2 scores 1; t3, t3a, t3b, or t3c scores 2; t4 scores 0 (published 1997 weight). Not 2002/2010 T1a/T1b. magent does not stage the tumor.","required":true,"schema":{"type":"string","enum":["t1","t2","t3","t3a","t3b","t3c","t4"]},"example":"t1"},{"in":"query","name":"n_1997","description":"1997 pathologic N as assigned by the caller (Frank 2002 SSIGN). n0 or nx scores 0; n1 or n2 scores 2. magent does not stage nodes.","required":true,"schema":{"type":"string","enum":["n0","nx","n1","n2"]},"example":"n0"},{"in":"query","name":"m_1997","description":"1997 pathologic M as assigned by the caller (Frank 2002 SSIGN). m0 scores 0; m1 scores 4. magent does not assign M.","required":true,"schema":{"type":"string","enum":["m0","m1"]},"example":"m0"},{"in":"query","name":"tumor_size_cm","description":"Maximum tumor size in cm as assigned by the caller (Frank 2002). Unrounded; 5.0 cm or greater scores 2. Magent clamp 0.1-40, not a published range. magent does not measure the tumor.","required":true,"schema":{"type":"number"},"example":"3"},{"in":"query","name":"fuhrman","description":"Nuclear grade 1-4 as assigned by the caller (Frank 2002 SSIGN). 1-2 score 0; 3 scores 1; 4 scores 3. Integer 1-4 only; reject 0, 5, 1.5, and roman I. magent does not read slides.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"necrosis","description":"Coagulative tumor necrosis as assigned by the caller (Frank 2002). true scores 2. magent does not read slides.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"SSIGN score","operationId":"get_api_calc_ssign","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, css_band, css_1_year_percent, css_3_year_percent, css_5_year_percent, css_7_year_percent, css_10_year_percent, t_1997, n_1997, m_1997, tumor_size_cm, fuhrman, necrosis, components, citation, disclaimer."},"400":{"description":"invalid_ssign: t_1997, n_1997, m_1997, tumor_size_cm, fuhrman, and necrosis must match Frank 2002 SSIGN 1997 TNM weights (not later TNM editions). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ssign"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SSIGN score (bulk)","operationId":"post_api_calc_ssign","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ssign: t_1997, n_1997, m_1997, tumor_size_cm, fuhrman, and necrosis must match Frank 2002 SSIGN 1997 TNM weights (not later TNM editions). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ssign"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"fuhrman":"1","m_1997":"m0","n_1997":"n0","necrosis":"false","t_1997":"t1","tumor_size_cm":"3"},{"fuhrman":"1","m_1997":"m0","n_1997":"n0","necrosis":"false","t_1997":"t1","tumor_size_cm":"3"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/awol":{"get":{"description":"Sum the four Douglas 2013 AWOL items and return the combined-population observed delirium percent at that score.\n\nWhen an agent already has the four AWOL flags assigned and needs the published 0–4 total and Douglas 2013 combined-population observed delirium rates, not a delirium diagnosis and not CAM-ICU or 4AT.\n\nNot a medical device and not a delirium diagnosis.\n\nmagent does not interview the patient.\n\nEach flag is caller-assigned. magent does not collect an integer age.\n\nObserved delirium percents are the Douglas 2013 combined-population rates at scores 0–4 (2/4/14/20/64). This is not a binary high-risk cutoff.\n\nThis is Douglas 2013 AWOL only. Not CAM-ICU. Not 4AT. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_ge_80","description":"Age ≥80 years (AWOL A; Douglas 2013). true or false as assigned by the caller. magent does not collect an integer age and does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"failed_world_backward","description":"Unable to correctly spell WORLD backward (AWOL W; Douglas 2013). true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"not_oriented_to_place","description":"Not fully oriented to place: not oriented to city, state, county, hospital name, and floor (AWOL O; Douglas 2013). true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"illness_moderate_severe_or_moribund","description":"Nurse-rated illness severity moderately ill, severely ill, or moribund, as opposed to not ill or mildly ill (AWOL L; Douglas 2013). true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"AWOL","operationId":"get_api_calc_awol","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, observed_delirium_percent, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/awol"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"AWOL (bulk)","operationId":"post_api_calc_awol","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/awol"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_ge_80":"false","failed_world_backward":"false","illness_moderate_severe_or_moribund":"false","not_oriented_to_place":"false"},{"age_ge_80":"false","failed_world_backward":"false","illness_moderate_severe_or_moribund":"false","not_oriented_to_place":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/neonatal-partial-exchange":{"get":{"description":"Compute the Kumar 2004 partial-exchange transfusion volume from actual hematocrit and caller-assigned blood volume, using the trial's printed desired hematocrit of 55 percent.\n\nWhen an agent needs the published Kumar 2004 PET volume and must not invent a blood-volume nomogram, a desired hematocrit other than 55 percent, a saline-versus-plasma choice, or an indication for exchange.\n\nNot a medical device. Not a transfusion order.\n\nDesired hematocrit is the trial's 55 percent only. magent does not implement a blood-volume nomogram or choose millilitres per kilogram.\n\nmagent does not choose saline versus plasma.\n\nNot an indication. The trial found no long-term benefit in asymptomatic LBW infants. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"actual_hct_percent","description":"Actual hematocrit as percent (56-90). Must be above the trial desired 55.","required":true,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"blood_volume_ml","description":"Caller-assigned blood volume in millilitres (40-600). magent does not choose millilitres per kilogram.","required":true,"schema":{"type":"number"},"example":"270"}],"summary":"Neonatal partial-exchange volume","operationId":"get_api_calc_neonatal_partial_exchange","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, actual_hct_percent, blood_volume_ml, desired_hct_percent, volume_ml, citation, disclaimer."},"400":{"description":"invalid_pet: Partial-exchange inputs must match Kumar 2004 actual hematocrit above 55 percent and caller-assigned blood volume from that trial. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/neonatal-partial-exchange"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Neonatal partial-exchange volume (bulk)","operationId":"post_api_calc_neonatal_partial_exchange","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pet: Partial-exchange inputs must match Kumar 2004 actual hematocrit above 55 percent and caller-assigned blood volume from that trial. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/neonatal-partial-exchange"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"actual_hct_percent":"70","blood_volume_ml":"270"},{"actual_hct_percent":"70","blood_volume_ml":"270"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/swede":{"get":{"description":"Sum five caller-assigned Strander 2005 Swede integers (acetowhiteness, margins_surface, vessels, lesion_size, iodine; each 0-2; max 10) and return the published total and <5 / 5-7 / >=8 bands.\n\nWhen an agent has already assigned Strander 2005 Table I 0-2 integers for acetowhiteness, margins and surface, vessels, lesion size, and iodine and needs the published Swede total and bands, not a CIN diagnosis, see-and-treat order, or Reid index. magent does not read the colposcope.\n\nNot a medical device. magent does not diagnose CIN or high-grade dysplasia.\n\nInputs are caller-assigned Strander 2005 Table I integers (each 0, 1, or 2). magent does not read the colposcope.\n\nPublished derivation-set findings: score ≥5 identified all high-grade lesions (HGL); score ≥8 had 90% specificity for HGL. magent reports bands <5, 5-7, and >=8. Score 5 is 5-7. Score 8 is >=8. magent does not invent a see-and-treat order.\n\nNot the Reid colposcopic index. Not a CIN diagnosis. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"acetowhiteness","description":"Caller-assigned Strander 2005 Table I acetowhiteness (integer 0-2): 0 none/transparent; 1 shady/milky; 2 distinct/stearin (opaque white). magent does not read the colposcope.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"2"},{"in":"query","name":"margins_surface","description":"Caller-assigned Strander 2005 Table I margins and surface (integer 0-2): 0 none/diffuse; 1 sharp but irregular/jagged/geographical (satellites); 2 sharp and even, surface-level difference (cuffing). magent does not read the colposcope.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"2"},{"in":"query","name":"vessels","description":"Caller-assigned Strander 2005 Table I vessels (integer 0-2): 0 fine/regular; 1 absent; 2 coarse or atypical. magent does not read the colposcope.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"1"},{"in":"query","name":"lesion_size","description":"Caller-assigned Strander 2005 Table I lesion size (integer 0-2): 0 <5 mm; 1 5-15 mm or 2 quadrants; 2 >15 mm or 3-4 quadrants or endocervically undefined. magent does not read the colposcope.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"1"},{"in":"query","name":"iodine","description":"Caller-assigned Strander 2005 Table I iodine staining (integer 0-2): 0 brown; 1 faintly or patchy yellow; 2 distinct yellow. magent does not read the colposcope.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"2"}],"summary":"Swede score","operationId":"get_api_calc_swede","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, swede_band, acetowhiteness, margins_surface, vessels, lesion_size, iodine, components, citation, disclaimer."},"400":{"description":"invalid_swede: Swede score needs acetowhiteness, margins_surface, vessels, lesion_size, and iodine, each 0, 1, or 2. Returned before settlement; you are not charged.; invalid_swede_item: acetowhiteness, margins_surface, vessels, lesion_size, and iodine must each be 0, 1, or 2 (Strander 2005). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/swede"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Swede score (bulk)","operationId":"post_api_calc_swede","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_swede: Swede score needs acetowhiteness, margins_surface, vessels, lesion_size, and iodine, each 0, 1, or 2. Returned before settlement; you are not charged.; invalid_swede_item: acetowhiteness, margins_surface, vessels, lesion_size, and iodine must each be 0, 1, or 2 (Strander 2005). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/swede"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"acetowhiteness":"2","iodine":"2","lesion_size":"1","margins_surface":"2","vessels":"1"},{"acetowhiteness":"2","iodine":"2","lesion_size":"1","margins_surface":"2","vessels":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/edacs":{"get":{"description":"Compute the Than 2014 Emergency Department Assessment of Chest pain Score from age, sex, and caller-assigned flags.\n\nWhen an agent needs the published EDACS total and must not invent HEART, TIMI, or a discharge decision from ECG or troponin.\n\nNot a diagnosis or discharge order. score_lt_16 is the published EDACS < 16 threshold only; the Than 2014 2-hour ADP also requires a non-ischemic ECG and negative 0 h and 2 h troponin, which magent does not take.\n\nknown_cad_or_three_risk_factors is caller-assigned (known CAD or ≥3 risk factors). magent does not count risk factors. That term scores +4 only when age is 18-50; above 50 it is 0 even if the flag is true.\n\nThis is EDACS (Than 2014), not HEART and not TIMI. Pain flags are caller-assigned; magent does not interpret a history or ECG. The score may be negative. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). 18-45 scores 2; then +2 per 5-year band through 81-85 (18); ≥86 scores 20.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"sex","description":"male scores 6; female scores 0.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"known_cad_or_three_risk_factors","description":"Caller-assigned known CAD or ≥3 risk factors (Than 2014). Scores +4 only when age is 18-50; required even when age >50 (then 0). magent does not count risk factors. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"diaphoresis","description":"Diaphoresis with the pain. true scores +3.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pain_radiates_arm_shoulder_neck_jaw","description":"Pain radiates to arm, shoulder, neck, or jaw. true scores +5. magent does not interpret the history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pain_with_inspiration","description":"Pain occurred or worsened with inspiration. true scores −4.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pain_reproduced_by_palpation","description":"Pain reproduced by palpation. true scores −6.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"EDACS","operationId":"get_api_calc_edacs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, score_lt_16, sex, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/edacs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"EDACS (bulk)","operationId":"post_api_calc_edacs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/edacs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","diaphoresis":"false","known_cad_or_three_risk_factors":"false","pain_radiates_arm_shoulder_neck_jaw":"false","pain_reproduced_by_palpation":"false","pain_with_inspiration":"false","sex":"female"},{"age":"40","diaphoresis":"false","known_cad_or_three_risk_factors":"false","pain_radiates_arm_shoulder_neck_jaw":"false","pain_reproduced_by_palpation":"false","pain_with_inspiration":"false","sex":"female"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rule-7s":{"get":{"description":"Apply the Cohn 2012 Rule of 7s and return whether all three published low-risk criteria hold (rule7s_low_risk).\n\nWhen an agent already has headache duration in days, CSF mononuclear percent, and whether cranial-nerve palsy is present, as in Cohn 2012, and needs the published three-item Rule of 7s low-risk result. magent does not examine nerves or count CSF cells.\n\nNot a medical device.\n\nNot a Lyme diagnosis. Low-risk on the Rule of 7s is not a diagnosis of Lyme meningitis or aseptic meningitis.\n\nmagent does not examine nerves or count CSF cells. headache_days, csf_mononuclear_percent, and cranial_nerve_palsy are caller-assigned.\n\nThis tool is the named three-item Rule of 7s as stated in Cohn 2012. It does not compute Avery 2006 logistic probabilities.\n\nNot a treatment or discharge order. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"headache_days","description":"Duration of headache in days (integer 0-90). Low-risk criterion holds when strictly less than 7. Seven days is not low-risk. magent does not take a history.","required":true,"schema":{"type":"integer"},"example":"3"},{"in":"query","name":"csf_mononuclear_percent","description":"CSF mononuclear cell percent (0-100). Low-risk criterion holds when strictly less than 70. Seventy percent is not low-risk. magent does not count CSF cells.","required":true,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"cranial_nerve_palsy","description":"Seventh or other cranial-nerve palsy. true or false as assigned by the caller. Low-risk criterion holds when false (palsy absent). magent does not examine nerves.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Rule of 7s","operationId":"get_api_calc_rule_7s","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, rule7s_low_risk, criteria, citation, disclaimer."},"400":{"description":"invalid_headache_days: headache_days must be an integer from 0 to 90 (Cohn 2012 Rule of 7s). Returned before settlement; you are not charged.; invalid_csf_mononuclear: csf_mononuclear_percent must be a number from 0 to 100 (Cohn 2012 Rule of 7s). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rule-7s"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rule of 7s (bulk)","operationId":"post_api_calc_rule_7s","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_headache_days: headache_days must be an integer from 0 to 90 (Cohn 2012 Rule of 7s). Returned before settlement; you are not charged.; invalid_csf_mononuclear: csf_mononuclear_percent must be a number from 0 to 100 (Cohn 2012 Rule of 7s). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rule-7s"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"cranial_nerve_palsy":"false","csf_mononuclear_percent":"40","headache_days":"3"},{"cranial_nerve_palsy":"false","csf_mononuclear_percent":"40","headache_days":"3"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/kasymjanova":{"get":{"description":"Apply the Kasymjanova 2010 prognostic index (PI 0–2) from caller-supplied CRP in mg/L and WBC in ×10^9/L.\n\nWhen an agent has pre-treatment CRP and WBC for advanced NSCLC and needs the published Kasymjanova 2010 PI, not GPS/mGPS, and not a chemotherapy order.\n\nNot a medical device. magent does not examine the patient and does not assay CRP or WBC.\n\nThis is the Kasymjanova 2010 advanced NSCLC prognostic index from CRP and WBC only. It is not Glasgow Prognostic Score (GPS), not McMillan mGPS, and not a chemotherapy order.\n\nNot a cancer diagnosis or staging decision. Does not return survival months or percents. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"crp_mg_l","description":"C-reactive protein in mg/L (0-500), not mg/dL. Kasymjanova 2010 elevated CRP is >10 mg/L. CRP = 10 is not elevated. magent does not assay CRP.","required":true,"schema":{"type":"number"},"example":"10"},{"in":"query","name":"wbc_10e9_l","description":"White-cell count in ×10^9/L (0.01-500). Kasymjanova 2010 elevated WBC is >11 ×10^9/L. WBC = 11 is not elevated. magent does not assay WBC.","required":true,"schema":{"type":"number"},"example":"11"}],"summary":"Kasymjanova PI","operationId":"get_api_calc_kasymjanova","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, crp_mg_l, wbc_10e9_l, pi, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_crp: crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/kasymjanova"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Kasymjanova PI (bulk)","operationId":"post_api_calc_kasymjanova","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_crp: crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/kasymjanova"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"crp_mg_l":"10","wbc_10e9_l":"11"},{"crp_mg_l":"10","wbc_10e9_l":"11"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/travis":{"get":{"description":"Apply the Travis 1996 day-3 of intravenous corticosteroids rule for severe ulcerative colitis and return travis_high from stools_per_day and crp_mg_l.\n\nWhen an agent already has the day-3 stool count and CRP in mg/L during intravenous steroid treatment for severe ulcerative colitis and needs the published Travis 1996 high-risk classification. magent does not count stools or measure CRP.\n\nNot a medical device.\n\nNot a colectomy order. magent does not assign surgery or return a colectomy probability.\n\nThis is Travis 1996 day-3 of intravenous steroids for severe ulcerative colitis only. Not the Ho score. Not Truelove and Witts.\n\nThe caller assigns stools_per_day and crp_mg_l. magent does not count stools or measure CRP. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"stools_per_day","description":"Number of stools (motions) per day as assigned by the caller (integer 0-40). Travis 1996 high is stools_per_day > 8, or stools_per_day 3 to 8 inclusive with CRP > 45 mg/L. Both parameters are required. magent does not count stools.","required":true,"schema":{"type":"integer"},"example":"9"},{"in":"query","name":"crp_mg_l","description":"C-reactive protein in mg/L (0-500), not mg/dL. Travis 1996 CRP arm is crp_mg_l > 45 when stools_per_day is 3 to 8 inclusive. CRP = 45 is not high on that arm. magent does not assay CRP.","required":true,"schema":{"type":"number"},"example":"10"}],"summary":"Travis criteria","operationId":"get_api_calc_travis","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, travis_high, stools_per_day, crp_mg_l, criteria, citation, disclaimer."},"400":{"description":"invalid_stools_per_day: stools_per_day must be an integer from 0 to 40. Returned before settlement; you are not charged.; invalid_crp: crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/travis"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Travis criteria (bulk)","operationId":"post_api_calc_travis","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_stools_per_day: stools_per_day must be an integer from 0 to 40. Returned before settlement; you are not charged.; invalid_crp: crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/travis"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"crp_mg_l":"10","stools_per_day":"9"},{"crp_mg_l":"10","stools_per_day":"9"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pas-ii":{"get":{"description":"Compute the Wolfe 2005 Patient Activity Scale II (PAS-II) from a caller-assigned HAQ-II disability index (0-3), pain VAS (0-10), and patient global VAS (0-10). Uses HAQ-II × 3.33, not HAQ. Returns the PAS-II total only.\n\nWhen an agent already has a caller-assigned HAQ-II (0-3, not HAQ), pain VAS, and patient global VAS and needs the published Wolfe 2005 PAS-II composite, not PAS-RA, not DAS28, not CDAI, and not Samuel 2002 pediatric appendicitis PAS.\n\nNot a medical device and not a rheumatoid arthritis diagnosis or a treatment order.\n\nmagent does not administer HAQ-II. haq_ii, pain_vas, and patient_global_vas are caller-assigned. This tool uses HAQ-II 0-3, not HAQ.\n\nThis is Wolfe 2005 PAS-II (HAQ-II × 3.33), not PAS-RA (HAQ). Not Samuel 2002 pediatric appendicitis PAS. Not DAS28. Not CDAI.\n\nWolfe 2005 does not lock remission, minimal, moderate, or severe cutoffs in this tool. magent returns the PAS-II total only. No activity-state cutoffs. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"haq_ii","description":"Caller-assigned HAQ-II disability index (Wolfe 2005 PAS-II). Number 0-3. Not HAQ. magent does not administer HAQ-II.","required":true,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"pain_vas","description":"Caller-assigned pain visual analog scale (Wolfe 2005 PAS-II). Number 0-10. magent does not examine the patient.","required":true,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"patient_global_vas","description":"Caller-assigned patient global visual analog scale (Wolfe 2005 PAS-II). Number 0-10. magent does not examine the patient.","required":true,"schema":{"type":"number"},"example":"0"}],"summary":"PAS-II","operationId":"get_api_calc_pas_ii","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, haq_ii, pain_vas, patient_global_vas, pas_ii, citation, disclaimer."},"400":{"description":"invalid_haq_ii: haq_ii must be a number from 0 to 3 (Wolfe 2005 HAQ-II 0-3). Returned before settlement; you are not charged.; invalid_pain_vas: pain_vas must be a number from 0 to 10 (Wolfe 2005 pain VAS). Returned before settlement; you are not charged.; invalid_patient_global: patient_global_vas must be a number from 0 to 10 (Wolfe 2005 patient global VAS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pas-ii"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PAS-II (bulk)","operationId":"post_api_calc_pas_ii","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_haq_ii: haq_ii must be a number from 0 to 3 (Wolfe 2005 HAQ-II 0-3). Returned before settlement; you are not charged.; invalid_pain_vas: pain_vas must be a number from 0 to 10 (Wolfe 2005 pain VAS). Returned before settlement; you are not charged.; invalid_patient_global: patient_global_vas must be a number from 0 to 10 (Wolfe 2005 patient global VAS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pas-ii"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"haq_ii":"0","pain_vas":"0","patient_global_vas":"0"},{"haq_ii":"0","pain_vas":"0","patient_global_vas":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/surgical-apgar":{"get":{"description":"Compute the Gawande 2007 intraoperative Surgical Apgar score from estimated blood loss, lowest mean arterial pressure, and lowest heart rate.\n\nWhen an agent needs the published intraoperative Surgical Apgar total and must not substitute Virginia Apgar or treat the score as operative clearance.\n\nNot a medical device and not an operative-clearance, cancellation, or monitoring order. magent does not observe the operation.\n\nThis is the Gawande 2007 intraoperative Surgical Apgar (Table 1) only. It is not the Virginia Apgar newborn score.\n\nEstimated blood loss, lowest MAP, and lowest heart rate are caller-supplied intraoperative values. magent does not read an anesthesia record.\n\nscore_le_4 follows the validation-cohort association of scores ≤4 with 58.6% 30-day death or major complication (9–10 with 3.6%). It is not an operative-clearance decision. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ebl_ml","description":"Estimated intraoperative blood loss in mL (0.0-20000.0). Gawande 2007 Table 1: >1000 → 0, 601-1000 → 1, 101-600 → 2, ≤100 → 3.","required":true,"schema":{"type":"number"},"example":"50"},{"in":"query","name":"lowest_map_mm_hg","description":"Lowest intraoperative mean arterial pressure in mm Hg (30.0-180.0). Gawande 2007 Table 1: <40 → 0, 40-54 → 1, 55-69 → 2, ≥70 → 3.","required":true,"schema":{"type":"number"},"example":"80"},{"in":"query","name":"lowest_heart_rate_bpm","description":"Lowest intraoperative heart rate in beats/min (integer 30-220). Gawande 2007 Table 1: >85 → 0, 76-85 → 1, 66-75 → 2, 56-65 → 3, ≤55 → 4.","required":true,"schema":{"type":"integer"},"example":"60"}],"summary":"Surgical Apgar","operationId":"get_api_calc_surgical_apgar","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, score_le_4, ebl_ml, lowest_map_mm_hg, lowest_heart_rate_bpm, components, citation, disclaimer."},"400":{"description":"invalid_ebl_ml: ebl_ml must be a number from 0 to 20000. Returned before settlement; you are not charged.; invalid_surgical_apgar_map: lowest_map_mm_hg must be a number from 30 to 180. Returned before settlement; you are not charged.; invalid_surgical_apgar_heart_rate: lowest_heart_rate_bpm must be an integer from 30 to 220. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/surgical-apgar"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Surgical Apgar (bulk)","operationId":"post_api_calc_surgical_apgar","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ebl_ml: ebl_ml must be a number from 0 to 20000. Returned before settlement; you are not charged.; invalid_surgical_apgar_map: lowest_map_mm_hg must be a number from 30 to 180. Returned before settlement; you are not charged.; invalid_surgical_apgar_heart_rate: lowest_heart_rate_bpm must be an integer from 30 to 220. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/surgical-apgar"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ebl_ml":"50","lowest_heart_rate_bpm":"60","lowest_map_mm_hg":"80"},{"ebl_ml":"50","lowest_heart_rate_bpm":"60","lowest_map_mm_hg":"80"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/t-macs":{"get":{"description":"Compute the Body 2016 Troponin-only Manchester Acute Coronary Syndromes (T-MACS) logistic probability of ACS from caller-assigned ECG ischaemia, worsening angina, right-arm or shoulder radiation, vomiting, observed sweating, hypotension, and Roche Elecsys hs-cTnT in ng/L.\n\nWhen an agent already has those Body 2016 predictors as assigned by the caller and needs the published T-MACS probability and risk band. magent does not interpret an ECG or assay troponin. Not a diagnosis, discharge protocol, or original MACS (H-FABP).\n\nNot a medical device. Not a diagnosis of ACS.\n\necg_ischaemia, worsening_angina, pain_radiation_right_arm_or_shoulder, vomiting, sweating_observed, and hypotension are caller-assigned. magent does not interpret ECG ischaemia or assay troponin.\n\nhs-cTnT is Roche Diagnostics Elecsys in ng/L as entered. 0–100000 ng/L is an implementation clamp. magent does not convert units.\n\nBody 2016 rounded T-MACS coefficients only. Not original MACS (H-FABP). Not HEART. Not EDACS. Not the Vancouver Chest Pain Rule.\n\nThat paper writes low as 0.02<p<0.05 and moderate as 0.05<p<0.95 (equality at 0.02 and 0.05 omitted). magent uses a complete partition: p<0.02 very_low, 0.02≤p<0.05 low, 0.05≤p<0.95 moderate, p≥0.95 high. Bands use unrounded p.\n\nThe paper notes patients are only ruled out if all model features are absent and hs-cTnT is <10 ng/L. This tool returns the logistic probability; it does not add a second checklist gate.\n\nNot a discharge, observation, or rule-out protocol. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ecg_ischaemia","description":"Caller-assigned ECG ischaemia as used in Body 2016 (E; 1 if true, 0 if false). magent does not interpret an ECG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"worsening_angina","description":"Worsening or crescendo angina as assigned by the caller (A): anginal pain with increasing frequency, occurring with less exertion, or becoming more prolonged (Body 2016). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pain_radiation_right_arm_or_shoulder","description":"Pain radiating to the right arm or shoulder as assigned by the caller (R; Body 2016). true or false. magent does not take a pain history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"vomiting","description":"Vomiting in association with the presenting symptoms as assigned by the caller (V; Body 2016). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"sweating_observed","description":"Sweating observed by the treating clinician as assigned by the caller (S; Body 2016). true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypotension","description":"Hypotension as assigned by the caller (H): systolic BP <100 mm Hg on arrival (Body 2016, dichotomised as in that paper). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hs_ctnt_ng_l","description":"Roche Diagnostics Elecsys high-sensitivity cardiac troponin T on arrival in ng/L (T; 0-100000, implementation clamp). Continuous linear predictor in Body 2016. magent does not convert units or assay troponin.","required":true,"schema":{"type":"number"},"example":"3"}],"summary":"T-MACS","operationId":"get_api_calc_t_macs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, ecg_ischaemia, worsening_angina, pain_radiation_right_arm_or_shoulder, vomiting, sweating_observed, hypotension, hs_ctnt_ng_l, linear_predictor, probability, t_macs_band, citation, disclaimer."},"400":{"description":"invalid_t_macs: T-MACS inputs must match Body 2016 dichotomous predictors and Roche hs-cTnT ng/L from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/t-macs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"T-MACS (bulk)","operationId":"post_api_calc_t_macs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_t_macs: T-MACS inputs must match Body 2016 dichotomous predictors and Roche hs-cTnT ng/L from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/t-macs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ecg_ischaemia":"false","hs_ctnt_ng_l":"3","hypotension":"false","pain_radiation_right_arm_or_shoulder":"false","sweating_observed":"false","vomiting":"false","worsening_angina":"false"},{"ecg_ischaemia":"false","hs_ctnt_ng_l":"3","hypotension":"false","pain_radiation_right_arm_or_shoulder":"false","sweating_observed":"false","vomiting":"false","worsening_angina":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ses-cd":{"get":{"description":"Sum four caller-assigned Daperno 2004 SES-CD integers (ulcers, ulcerated_surface, affected_surface, narrowings; each 0-3) in each of five ileocolonic segments (ileum, right_colon, transverse_colon, left_colon, rectum) and return the total (max 60). Does not return activity bands.\n\nWhen an agent has already assigned Daperno 2004 SES-CD Table 1 integers for the four items in each of five segments and needs the published total, not a diagnosis, CDEIS, CDAI, or later remission cutoffs.\n\nNot a medical device and not a Crohn's diagnosis or a treatment order.\n\nEach of the 20 params is a caller-assigned Daperno 2004 integer 0-3. magent does not perform endoscopy. Unexamined segments are 0 as assigned by the caller.\n\nTheoretical max is 60 (five segments × four items × 3). magent does not apply a 56 clamp.\n\nDaperno 2004 did not publish SES-CD remission or response cutoffs. magent returns score and max_score only and does not apply later activity bands.\n\nNot CDEIS and not the Best 1976 CDAI. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ileum_ulcers","description":"Caller-assigned Daperno 2004 SES-CD ulcers for the ileum (integer 0-3; Table 1: 0 none / 1 aphthous 0.1–0.5 cm / 2 large 0.5–2 cm / 3 very large >2 cm). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"ileum_ulcerated_surface","description":"Caller-assigned Daperno 2004 SES-CD ulcerated surface for the ileum (integer 0-3; Table 1: 0 none / 1 <10% / 2 10–30% / 3 >30%). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"ileum_affected_surface","description":"Caller-assigned Daperno 2004 SES-CD affected surface for the ileum (integer 0-3; Table 1: 0 unaffected / 1 <50% / 2 50–75% / 3 >75%). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"ileum_narrowings","description":"Caller-assigned Daperno 2004 SES-CD narrowings for the ileum (integer 0-3; Table 1: 0 none / 1 single passable / 2 multiple passable / 3 cannot be passed). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"right_colon_ulcers","description":"Caller-assigned Daperno 2004 SES-CD ulcers for the right colon (integer 0-3; Table 1: 0 none / 1 aphthous 0.1–0.5 cm / 2 large 0.5–2 cm / 3 very large >2 cm). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"right_colon_ulcerated_surface","description":"Caller-assigned Daperno 2004 SES-CD ulcerated surface for the right colon (integer 0-3; Table 1: 0 none / 1 <10% / 2 10–30% / 3 >30%). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"right_colon_affected_surface","description":"Caller-assigned Daperno 2004 SES-CD affected surface for the right colon (integer 0-3; Table 1: 0 unaffected / 1 <50% / 2 50–75% / 3 >75%). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"right_colon_narrowings","description":"Caller-assigned Daperno 2004 SES-CD narrowings for the right colon (integer 0-3; Table 1: 0 none / 1 single passable / 2 multiple passable / 3 cannot be passed). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"transverse_colon_ulcers","description":"Caller-assigned Daperno 2004 SES-CD ulcers for the transverse colon (integer 0-3; Table 1: 0 none / 1 aphthous 0.1–0.5 cm / 2 large 0.5–2 cm / 3 very large >2 cm). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"transverse_colon_ulcerated_surface","description":"Caller-assigned Daperno 2004 SES-CD ulcerated surface for the transverse colon (integer 0-3; Table 1: 0 none / 1 <10% / 2 10–30% / 3 >30%). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"transverse_colon_affected_surface","description":"Caller-assigned Daperno 2004 SES-CD affected surface for the transverse colon (integer 0-3; Table 1: 0 unaffected / 1 <50% / 2 50–75% / 3 >75%). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"transverse_colon_narrowings","description":"Caller-assigned Daperno 2004 SES-CD narrowings for the transverse colon (integer 0-3; Table 1: 0 none / 1 single passable / 2 multiple passable / 3 cannot be passed). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"left_colon_ulcers","description":"Caller-assigned Daperno 2004 SES-CD ulcers for the left colon (integer 0-3; Table 1: 0 none / 1 aphthous 0.1–0.5 cm / 2 large 0.5–2 cm / 3 very large >2 cm). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"left_colon_ulcerated_surface","description":"Caller-assigned Daperno 2004 SES-CD ulcerated surface for the left colon (integer 0-3; Table 1: 0 none / 1 <10% / 2 10–30% / 3 >30%). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"left_colon_affected_surface","description":"Caller-assigned Daperno 2004 SES-CD affected surface for the left colon (integer 0-3; Table 1: 0 unaffected / 1 <50% / 2 50–75% / 3 >75%). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"left_colon_narrowings","description":"Caller-assigned Daperno 2004 SES-CD narrowings for the left colon (integer 0-3; Table 1: 0 none / 1 single passable / 2 multiple passable / 3 cannot be passed). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"rectum_ulcers","description":"Caller-assigned Daperno 2004 SES-CD ulcers for the rectum (integer 0-3; Table 1: 0 none / 1 aphthous 0.1–0.5 cm / 2 large 0.5–2 cm / 3 very large >2 cm). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"rectum_ulcerated_surface","description":"Caller-assigned Daperno 2004 SES-CD ulcerated surface for the rectum (integer 0-3; Table 1: 0 none / 1 <10% / 2 10–30% / 3 >30%). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"rectum_affected_surface","description":"Caller-assigned Daperno 2004 SES-CD affected surface for the rectum (integer 0-3; Table 1: 0 unaffected / 1 <50% / 2 50–75% / 3 >75%). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"rectum_narrowings","description":"Caller-assigned Daperno 2004 SES-CD narrowings for the rectum (integer 0-3; Table 1: 0 none / 1 single passable / 2 multiple passable / 3 cannot be passed). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"SES-CD","operationId":"get_api_calc_ses_cd","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_ses_cd: ulcers, ulcerated_surface, affected_surface, and narrowings in ileum, right_colon, transverse_colon, left_colon, and rectum must each be an integer 0-3 (Daperno 2004 SES-CD). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ses-cd"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SES-CD (bulk)","operationId":"post_api_calc_ses_cd","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ses_cd: ulcers, ulcerated_surface, affected_surface, and narrowings in ileum, right_colon, transverse_colon, left_colon, and rectum must each be an integer 0-3 (Daperno 2004 SES-CD). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ses-cd"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ileum_affected_surface":"0","ileum_narrowings":"0","ileum_ulcerated_surface":"0","ileum_ulcers":"0","left_colon_affected_surface":"0","left_colon_narrowings":"0","left_colon_ulcerated_surface":"0","left_colon_ulcers":"0","rectum_affected_surface":"0","rectum_narrowings":"0","rectum_ulcerated_surface":"0","rectum_ulcers":"0","right_colon_affected_surface":"0","right_colon_narrowings":"0","right_colon_ulcerated_surface":"0","right_colon_ulcers":"0","transverse_colon_affected_surface":"0","transverse_colon_narrowings":"0","transverse_colon_ulcerated_surface":"0","transverse_colon_ulcers":"0"},{"ileum_affected_surface":"0","ileum_narrowings":"0","ileum_ulcerated_surface":"0","ileum_ulcers":"0","left_colon_affected_surface":"0","left_colon_narrowings":"0","left_colon_ulcerated_surface":"0","left_colon_ulcers":"0","rectum_affected_surface":"0","rectum_narrowings":"0","rectum_ulcerated_surface":"0","rectum_ulcers":"0","right_colon_affected_surface":"0","right_colon_narrowings":"0","right_colon_ulcerated_surface":"0","right_colon_ulcers":"0","transverse_colon_affected_surface":"0","transverse_colon_narrowings":"0","transverse_colon_ulcerated_surface":"0","transverse_colon_ulcers":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/padua":{"get":{"description":"Compute the Barbar 2010 Padua Prediction Score for VTE risk in hospitalized medical patients from age and ten caller-assigned findings.\n\nWhen an agent needs the published Padua Prediction Score (not Caprini, IMPROVE, or Khorana) for a hospitalized medical patient as in the paper.\n\nNot a diagnosis of VTE. magent does not diagnose venous thromboembolism.\n\nNot Caprini, IMPROVE, or Khorana. This tool is the Barbar 2010 Padua Prediction Score only.\n\nOnly for hospitalized medical patients as published.\n\nObesity is a caller-applied BMI ≥30 flag; magent does not take height or weight.\n\nAge 70 is included (scores 1). High risk is score ≥4; scores 0–3 are low risk. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Scores 1 when age ≥70; 69 does not score.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"active_cancer","description":"Active cancer as assigned by the caller (local or distant metastases and/or chemotherapy or radiotherapy in the previous 6 months). true or false. 3 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"previous_vte","description":"Previous VTE as assigned by the caller (exclude superficial vein thrombosis). true or false. 3 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"reduced_mobility","description":"Reduced mobility as assigned by the caller (bedrest with bathroom privileges ≥3 days). true or false. 3 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"thrombophilic_condition","description":"Known thrombophilic condition as assigned by the caller. true or false. 3 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"recent_trauma_or_surgery","description":"Recent trauma and/or surgery as assigned by the caller (≤1 month). true or false. 2 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"heart_or_respiratory_failure","description":"Heart and/or respiratory failure. true or false. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"acute_mi_or_ischemic_stroke","description":"Acute myocardial infarction or ischemic stroke. true or false. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"acute_infection_or_rheumatologic_disorder","description":"Acute infection and/or rheumatologic disorder. true or false. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"obesity","description":"Obesity as assigned by the caller (BMI ≥30). true or false. magent does not take height or weight. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ongoing_hormonal_treatment","description":"Ongoing hormonal treatment. true or false. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Padua score","operationId":"get_api_calc_padua","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, padua_risk, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/padua"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Padua score (bulk)","operationId":"post_api_calc_padua","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/padua"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"active_cancer":"false","acute_infection_or_rheumatologic_disorder":"false","acute_mi_or_ischemic_stroke":"false","age":"50","heart_or_respiratory_failure":"false","obesity":"false","ongoing_hormonal_treatment":"false","previous_vte":"false","recent_trauma_or_surgery":"false","reduced_mobility":"false","thrombophilic_condition":"false"},{"active_cancer":"false","acute_infection_or_rheumatologic_disorder":"false","acute_mi_or_ischemic_stroke":"false","age":"50","heart_or_respiratory_failure":"false","obesity":"false","ongoing_hormonal_treatment":"false","previous_vte":"false","recent_trauma_or_surgery":"false","reduced_mobility":"false","thrombophilic_condition":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/improve-vte":{"get":{"description":"Compute the Spyropoulos 2011 7-factor associative IMPROVE VTE score during hospitalization from age and six caller-assigned flags.\n\nWhen an agent needs the published 7-factor associative IMPROVE VTE score during hospitalization (not the 4-factor admission predictive model, not IMPROVEDD, not Padua, not Caprini). magent does not examine the patient and does not diagnose VTE or issue a prophylaxis order.\n\nNot a medical device.\n\nNot a VTE diagnosis. magent does not diagnose venous thromboembolism.\n\nNot a prophylaxis order. This tool does not recommend a drug or start thromboprophylaxis.\n\n7-factor associative IMPROVE VTE score during hospitalization (Spyropoulos 2011). Observed VTE in the paper was 1.5% at score 2-3 and 5.7% at score >=4; score >=2 was associated with higher mortality. Those figures are published associations, not per-integer rates and not a treatment threshold.\n\nNot the 4-factor admission-only predictive model. Not IMPROVEDD (no D-dimer).\n\nNot Padua or Caprini.\n\nmagent does not examine the patient. Flags are caller-assigned. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Scores 1 when age >60 (Spyropoulos 2011). Age 60 scores 0; age 61 scores 1.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"previous_vte","description":"Previous VTE as assigned by the caller (Spyropoulos 2011 7-factor associative model). true or false. 3 points if true. magent does not diagnose VTE.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"known_thrombophilia","description":"Known thrombophilia as assigned by the caller (Spyropoulos 2011). true or false. 2 points if true. magent does not interpret a thrombophilia panel.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"lower_limb_paralysis","description":"Lower-limb paralysis as assigned by the caller (Spyropoulos 2011). true or false. 2 points if true. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"current_cancer","description":"Current cancer as assigned by the caller (Spyropoulos 2011). true or false. 2 points if true. magent does not diagnose cancer.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"immobilized_ge_7_days","description":"Immobilized ≥7 days as assigned by the caller (Spyropoulos 2011, during hospitalization). true or false. 1 point if true. magent does not observe mobility.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"icu_ccu_stay","description":"ICU or CCU stay as assigned by the caller (Spyropoulos 2011, during hospitalization). true or false. 1 point if true. magent does not assign level of care.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"IMPROVE VTE","operationId":"get_api_calc_improve_vte","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, vte_band, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/improve-vte"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"IMPROVE VTE (bulk)","operationId":"post_api_calc_improve_vte","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/improve-vte"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","current_cancer":"false","icu_ccu_stay":"false","immobilized_ge_7_days":"false","known_thrombophilia":"false","lower_limb_paralysis":"false","previous_vte":"false"},{"age":"50","current_cancer":"false","icu_ccu_stay":"false","immobilized_ge_7_days":"false","known_thrombophilia":"false","lower_limb_paralysis":"false","previous_vte":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/map":{"get":{"description":"Compute conventional estimated mean arterial pressure from cuff systolic and diastolic pressures.\n\nWhen an agent needs the 1/3 pulse-pressure MAP estimate and must not invent a cuff MAP.\n\nNot a treatment target. This is the conventional 1/3 pulse-pressure estimate from cuff pressures, not an invasive aortic mean.\n\nDoes not apply arterial-line averaging, form-factor corrections, or blood-pressure treatment thresholds. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"systolic_mm_hg","description":"Cuff systolic blood pressure in mm Hg (50-250).","required":true,"schema":{"type":"number"},"example":"120"},{"in":"query","name":"diastolic_mm_hg","description":"Cuff diastolic blood pressure in mm Hg (20-160). Must be less than systolic.","required":true,"schema":{"type":"number"},"example":"80"}],"summary":"MAP","operationId":"get_api_calc_map","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, systolic_mm_hg, diastolic_mm_hg, pulse_pressure_mm_hg, map_mm_hg, citation, disclaimer."},"400":{"description":"invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_diastolic_bp: diastolic_mm_hg must be a number from 20 to 160. Returned before settlement; you are not charged.; invalid_pulse_pressure: diastolic_mm_hg must be less than systolic_mm_hg. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/map"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"MAP (bulk)","operationId":"post_api_calc_map","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_diastolic_bp: diastolic_mm_hg must be a number from 20 to 160. Returned before settlement; you are not charged.; invalid_pulse_pressure: diastolic_mm_hg must be less than systolic_mm_hg. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/map"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"diastolic_mm_hg":"80","systolic_mm_hg":"120"},{"diastolic_mm_hg":"80","systolic_mm_hg":"120"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/car-olt":{"get":{"description":"Sum VanWagner 2017 Table 3 CAR-OLT integer points and return the Table 4 1-year predicted CVD complication percent.\n\nWhen an agent has caller-assigned age, sex, race as used in VanWagner 2017, work, education, and comorbidity flags and needs the published CAR-OLT total and Table 4 predicted percent, not a listing decision or RCRI.\n\nNot a medical device. Not a transplant listing, operative clearance, or cardiac-testing order.\n\nrace_group is caller-assigned as used in VanWagner 2017 Table 3 (white, black, other). magent does not assign race. Hispanic and Asian map to other (referent) in that model.\n\nTable 4 color/risk labels are arbitrary; magent reports the integer score and the table 1-year predicted percent only.\n\nTable 4 has no row for total score 9; that score uses the <9 predicted <5% row.\n\nScores >40 map to Table 4 45% (the paper prints 45+). Unclamped except as Table 3.\n\nmagent does not examine the patient, assign work or education, or observe a ventilator. Flags are caller-assigned. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120). VanWagner 2017 Table 3: <45 scores 0; 45-49 scores -6; 50-54 scores -4; 55-59 scores 2; 60-64 scores 5; ≥65 scores 8. Derivation was first OLT ages 18-75; ≥65 is the top Table 3 band.","required":true,"schema":{"type":"integer"},"example":40},{"in":"query","name":"sex","description":"Caller-assigned sex (VanWagner 2017 Table 3). male scores 0 (referent); female scores 1. magent does not assign sex.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"race_group","description":"Caller-assigned race as used in VanWagner 2017 Table 3. white scores 7; black scores 10; other scores 0 (referent). Hispanic and Asian map to other in this model. magent does not assign race.","required":true,"schema":{"type":"string","enum":["white","black","other"]},"example":"other"},{"in":"query","name":"working_for_income","description":"Working for income at transplant (VanWagner 2017 Table 3). true scores 0 (referent); false scores 10. magent does not assign employment.","required":true,"schema":{"type":"boolean"},"example":true},{"in":"query","name":"education","description":"Caller-assigned education (VanWagner 2017 Table 3). college scores 0 (College+ referent); high_school_or_unknown scores 5. magent does not assign education.","required":true,"schema":{"type":"string","enum":["high_school_or_unknown","college"]},"example":"college"},{"in":"query","name":"atrial_fibrillation","description":"History of atrial fibrillation prior to transplant (VanWagner 2017 Table 3). true scores 25. magent does not read an ECG.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"ventilator_respiratory_failure","description":"Respiratory failure on a ventilator at transplant (VanWagner 2017 Table 3). true scores 13. magent does not observe ventilation.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"pulmonary_hypertension","description":"History of pulmonary hypertension prior to transplant (VanWagner 2017 Table 3). true scores 9. magent does not perform right-heart catheterization.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"hcc","description":"History of hepatocellular carcinoma (VanWagner 2017 Table 3). true scores 0 (referent); false scores 6. No HCC is the higher-risk term. magent does not diagnose HCC.","required":true,"schema":{"type":"boolean"},"example":true},{"in":"query","name":"hypertension","description":"History of systemic hypertension prior to transplant (VanWagner 2017 Table 3). true scores 4. magent does not measure blood pressure.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"diabetes","description":"History of diabetes prior to transplant (VanWagner 2017 Table 3). true scores 4. magent does not assay glucose.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"heart_failure","description":"History of heart failure prior to transplant (VanWagner 2017 Table 3). true scores 7. magent does not diagnose heart failure.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"CAR-OLT","operationId":"get_api_calc_car_olt","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, predicted_1yr_cvd_percent, age_years, sex, race_group, education, working_for_income, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_car_olt: CAR-OLT inputs must match VanWagner 2017 Table 3 age group, sex, race, work, education, and comorbidity flags. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/car-olt"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CAR-OLT (bulk)","operationId":"post_api_calc_car_olt","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_car_olt: CAR-OLT inputs must match VanWagner 2017 Table 3 age group, sex, race, work, education, and comorbidity flags. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/car-olt"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","atrial_fibrillation":"false","diabetes":"false","education":"college","hcc":"true","heart_failure":"false","hypertension":"false","pulmonary_hypertension":"false","race_group":"other","sex":"male","ventilator_respiratory_failure":"false","working_for_income":"true"},{"age":"40","atrial_fibrillation":"false","diabetes":"false","education":"college","hcc":"true","heart_failure":"false","hypertension":"false","pulmonary_hypertension":"false","race_group":"other","sex":"male","ventilator_respiratory_failure":"false","working_for_income":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/sdai":{"get":{"description":"Sum caller-assigned 28-joint swollen and tender counts, 0–10 cm patient and evaluator globals, and CRP in mg/dL, and return the Aletaha 2005 SDAI with the newly proposed activity state.\n\nWhen an agent already has 28-joint swollen and tender counts, 0–10 cm patient and evaluator globals, and CRP in mg/dL and needs the published SDAI sum and Aletaha 2005 newly proposed activity state, not the original 5/20/40 cutoffs.\n\nNot a medical device and not a rheumatoid arthritis diagnosis or a treatment order.\n\nmagent does not count joints or assay CRP. sjc28, tjc28, pga, ega, and crp_mg_dl are caller-assigned. CRP is mg/dL as published, not mg/L. The 0–30 CRP range is a magent clamp.\n\nUses the Aletaha 2005 newly proposed SDAI definition (≤3.3 remission, ≤11 low, ≤26 moderate, >26 high), not the original 5/20/40 cutoffs.\n\nNot CDAI (SDAI without CRP). Not Crohn's CDAI. Not DAS28. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sjc28","description":"Caller-assigned swollen joint count on the 28-joint set (Aletaha 2005). Integer 0-28. magent does not count joints.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"tjc28","description":"Caller-assigned tender joint count on the 28-joint set (Aletaha 2005). Integer 0-28. magent does not count joints.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"pga","description":"Caller-assigned patient global assessment on a 0-10 cm VAS (Aletaha 2005). Number 0-10. magent does not examine the patient.","required":true,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"ega","description":"Caller-assigned evaluator global assessment on a 0-10 cm VAS (Aletaha 2005). Number 0-10. magent does not examine the patient.","required":true,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"crp_mg_dl","description":"Caller-assigned C-reactive protein in mg/dL (Aletaha 2005; not mg/L). Number 0-30 is a magent clamp. magent does not assay CRP.","required":true,"schema":{"type":"number"},"example":"0.4"}],"summary":"SDAI","operationId":"get_api_calc_sdai","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, sdai_band, sjc28, tjc28, pga, ega, crp_mg_dl, components, citation, disclaimer."},"400":{"description":"invalid_sdai: sjc28 and tjc28 must be integers 0–28; pga and ega numbers 0–10; crp_mg_dl a number 0–30 (Aletaha 2005 SDAI disease-activity states). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sdai"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SDAI (bulk)","operationId":"post_api_calc_sdai","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_sdai: sjc28 and tjc28 must be integers 0–28; pga and ega numbers 0–10; crp_mg_dl a number 0–30 (Aletaha 2005 SDAI disease-activity states). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sdai"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"crp_mg_dl":"0.4","ega":"0","pga":"0","sjc28":"0","tjc28":"0"},{"crp_mg_dl":"0.4","ega":"0","pga":"0","sjc28":"0","tjc28":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/oakland":{"get":{"description":"Sum the Oakland 2017 derivation-table weights for acute lower gastrointestinal bleeding and return safe_discharge (score ≤8) or not_safe (score >8).\n\nWhen an agent needs the published Oakland 2017 point total and must not invent a discharge order, an LGIB diagnosis, or a later validation cutoff.\n\nNot a medical device and not a discharge order. magent does not examine the rectum or assay hemoglobin.\n\nNot a diagnosis of lower GI bleeding. This tool returns the published Oakland 2017 point total only.\n\ndre_blood is blood on digital rectal examination as assigned by the caller. magent does not examine the patient.\n\nHemoglobin may be g/dL or g/L (÷ 10). The first published band starts at 3.6 g/dL; values below that after conversion are rejected.\n\nsafe_discharge is score ≤8 from the Oakland 2017 derivation. This is not a later US validation threshold. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 16-120). Oakland 2017: ≤39 → 0, 40-69 → 1, ≥70 → 2.","required":true,"schema":{"type":"integer"},"example":"35"},{"in":"query","name":"sex","description":"Sex as assigned by the caller. female scores 0; male scores 1.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"previous_lgib_admission","description":"Previous admission for lower GI bleeding as assigned by the caller (Oakland 2017). true scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"dre_blood","description":"Blood on digital rectal examination as assigned by the caller (Oakland 2017). true scores 1. magent does not examine the rectum.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats per minute (integer 30-220). Oakland 2017: <70 → 0, 70-89 → 1, 90-109 → 2, ≥110 → 3.","required":true,"schema":{"type":"integer"},"example":"65"},{"in":"query","name":"systolic_mm_hg","description":"Systolic blood pressure in mm Hg (50-250). Oakland 2017: 50-89 → 5, 90-119 → 4, 120-129 → 3, 130-159 → 2, ≥160 → 0. magent does not read a blood pressure.","required":true,"schema":{"type":"number"},"example":"165"},{"in":"query","name":"hemoglobin_g_dl","description":"Hemoglobin in g/dL (3-22). Provide this or hemoglobin_g_l, not both. Oakland 2017 bands start at 3.6 g/dL: 3.6-6.9 → 22, 7.0-8.9 → 17, 9.0-10.9 → 13, 11.0-12.9 → 8, 13.0-15.9 → 4, ≥16.0 → 0. Values <3.6 after conversion are rejected. magent does not assay hemoglobin.","required":false,"schema":{"type":"number"},"example":"16.5"},{"in":"query","name":"hemoglobin_g_l","description":"Hemoglobin in g/L (30-220). Converted as hemoglobin_g_dl = hemoglobin_g_l / 10. Provide this or hemoglobin_g_dl, not both. Values <3.6 g/dL after conversion are rejected.","required":false,"schema":{"type":"number"},"example":"165"}],"summary":"Oakland score","operationId":"get_api_calc_oakland","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, oakland_band, age_years, sex, previous_lgib_admission, dre_blood, heart_rate_bpm, systolic_mm_hg, hemoglobin_g_dl, components, citation, disclaimer."},"400":{"description":"invalid_oakland_age: age must be an integer from 16 to 120 (Oakland 2017 acute lower GI bleeding). Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/oakland"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Oakland score (bulk)","operationId":"post_api_calc_oakland","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_oakland_age: age must be an integer from 16 to 120 (Oakland 2017 acute lower GI bleeding). Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/oakland"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"35","dre_blood":"false","heart_rate_bpm":"65","hemoglobin_g_dl":"16.5","previous_lgib_admission":"false","sex":"female","systolic_mm_hg":"165"},{"age":"35","dre_blood":"false","heart_rate_bpm":"65","hemoglobin_g_dl":"16.5","previous_lgib_admission":"false","sex":"female","systolic_mm_hg":"165"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/aap-pediatric-bp":{"get":{"description":"Apply Flynn 2017 Table 3 and return the more severe of the systolic and diastolic pediatric blood-pressure categories (normal, elevated, stage_1, or stage_2) from completed age and cuff readings, using caller-assigned 90th and 95th mm Hg for age 1-12.\n\nWhen an agent already has a cuff systolic and diastolic reading and completed age 1-17 years and needs the published AAP 2017 Table 3 category. For age 1-12 the caller must assign that child's 90th and 95th mm Hg from the guideline tables. magent does not measure blood pressure or interpolate height or sex tables. Not the 2004 Fourth Report and not adult ACC/AHA 2017 for age <13.\n\nNot a medical device and not a hypertension diagnosis.\n\nmagent does not measure blood pressure. systolic_mm_hg and diastolic_mm_hg are caller-supplied cuff readings.\n\nAge 1-12 requires caller-assigned AAP-table 90th and 95th mm Hg. magent does not embed or interpolate the height/sex percentile tables.\n\nAge ≥13 uses Table 3 adult-aligned cutoffs. Percentile fields must be omitted for that band.\n\nThis tool is Flynn 2017 Table 3 only. Not the 2004 Fourth Report. Not adult ACC/AHA 2017 for age <13. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_years","description":"Completed age in years, integer 1-17 (Flynn 2017 Table 3). Age 1-12 uses the left-column percentile rule and requires caller 90th/95th mm Hg. Age 13-17 uses the right-column adult-aligned cutoffs and must omit percentile fields. Age 0 and age ≥18 are rejected.","required":true,"schema":{"type":"integer"},"example":"15"},{"in":"query","name":"systolic_mm_hg","description":"Caller-assigned cuff systolic blood pressure in mm Hg (50-250). magent does not measure blood pressure.","required":true,"schema":{"type":"number"},"example":"118"},{"in":"query","name":"diastolic_mm_hg","description":"Caller-assigned cuff diastolic blood pressure in mm Hg (20-160). Must be less than systolic. magent does not measure blood pressure.","required":true,"schema":{"type":"number"},"example":"72"},{"in":"query","name":"sbp_p90_mm_hg","description":"Caller-assigned AAP Table 4/5 systolic 90th percentile in mm Hg for that child (40-180, and must be < sbp_p95_mm_hg). Required for age 1-12. Must be omitted for age ≥13. magent does not interpolate height or sex tables.","required":false,"schema":{"type":"number"},"example":"108"},{"in":"query","name":"sbp_p95_mm_hg","description":"Caller-assigned AAP Table 4/5 systolic 95th percentile in mm Hg for that child (40-180, and must be > sbp_p90_mm_hg). Required for age 1-12. Must be omitted for age ≥13. magent does not interpolate height or sex tables.","required":false,"schema":{"type":"number"},"example":"115"},{"in":"query","name":"dbp_p90_mm_hg","description":"Caller-assigned AAP Table 4/5 diastolic 90th percentile in mm Hg for that child (40-180, and must be < dbp_p95_mm_hg). Required for age 1-12. Must be omitted for age ≥13. magent does not interpolate height or sex tables.","required":false,"schema":{"type":"number"},"example":"66"},{"in":"query","name":"dbp_p95_mm_hg","description":"Caller-assigned AAP Table 4/5 diastolic 95th percentile in mm Hg for that child (40-180, and must be > dbp_p90_mm_hg). Required for age 1-12. Must be omitted for age ≥13. magent does not interpolate height or sex tables.","required":false,"schema":{"type":"number"},"example":"74"}],"summary":"AAP pediatric BP","operationId":"get_api_calc_aap_pediatric_bp","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, category, age_years, systolic_mm_hg, diastolic_mm_hg, components, citation, disclaimer."},"400":{"description":"invalid_aap_pediatric_bp: AAP 2017 pediatric BP inputs must match Flynn Table 3 age 1-17, systolic/diastolic mm Hg, and for age 1-12 caller-assigned 90th and 95th mm Hg from that guideline. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/aap-pediatric-bp"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"AAP pediatric BP (bulk)","operationId":"post_api_calc_aap_pediatric_bp","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_aap_pediatric_bp: AAP 2017 pediatric BP inputs must match Flynn Table 3 age 1-17, systolic/diastolic mm Hg, and for age 1-12 caller-assigned 90th and 95th mm Hg from that guideline. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/aap-pediatric-bp"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_years":"15","diastolic_mm_hg":"72","systolic_mm_hg":"118"},{"age_years":"15","diastolic_mm_hg":"72","systolic_mm_hg":"118"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/bars":{"get":{"description":"Return the Swift 2002 Behavioural Activity Rating Scale (BARS) 1-7 from a caller-assigned integer, with a stable label.\n\nWhen an agent already has a BARS integer 1, 2, 3, 4, 5, 6, or 7 as in Swift 2002 and needs the published score and label. magent does not observe the patient. Not RASS and not a diagnosis.\n\nNot a medical device. magent does not observe the patient.\n\nNot RASS (Sessler 2002). BARS is Swift 2002 integers 1-7 only. Stable bars_label tokens are not a published class.\n\nNot a diagnosis. The caller assigns bars 1-7. magent does not examine the patient or apply restraint. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"bars","description":"Swift 2002 Behavioural Activity Rating Scale integer 1, 2, 3, 4, 5, 6, or 7 as assigned by the caller (1 difficult or unable to rouse; 2 asleep but responds normally to verbal or physical contact; 3 drowsy, appears sedated; 4 quiet and awake, normal level of activity; 5 signs of overt physical or verbal activity, calms with instructions; 6 extremely or continuously active, not requiring restraint; 7 violent, requires restraint). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"4"}],"summary":"BARS","operationId":"get_api_calc_bars","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, bars, bars_label, components, citation, disclaimer."},"400":{"description":"invalid_bars: BARS needs bars as an integer from 1 to 7 (Swift 2002). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bars"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"BARS (bulk)","operationId":"post_api_calc_bars","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_bars: BARS needs bars as an integer from 1 to 7 (Swift 2002). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bars"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bars":"4"},{"bars":"4"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rockall-pre":{"get":{"description":"Compute the Rockall 1996 pre-endoscopy (admission) score from age, heart rate, systolic blood pressure, and caller-assigned comorbidity after acute upper gastrointestinal haemorrhage.\n\nWhen an agent needs the published pre-endoscopy Rockall score (age + shock + comorbidity only) and must not apply complete/post-endoscopy Rockall, AIMS65, or Glasgow-Blatchford.\n\nNot a diagnosis of the cause or severity of bleeding.\n\nNot complete or post-endoscopy Rockall. This tool is the admission/pre-endoscopy score only (age, shock, and comorbidity). Diagnosis and stigmata of recent haemorrhage are not inputs.\n\nNot AIMS65 and not the Glasgow-Blatchford score.\n\nmagent does not assign comorbidity. The caller maps cardiac failure, IHD, or any major comorbidity to cardiac, and renal failure, liver failure, or disseminated malignancy to renal_liver_metastatic. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). <60 scores 0; 60-79 scores 1; ≥80 scores 2. 59 does not score; 60 scores 1; 79 scores 1; 80 scores 2.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats per minute (integer 30-220). With SBP ≥100, HR ≥100 scores 1 (tachycardia); 99 does not. Not added when SBP <100.","required":true,"schema":{"type":"integer"},"example":"80"},{"in":"query","name":"systolic_mm_hg","description":"Systolic blood pressure in mm Hg (50-250). SBP <100 scores 2 (hypotension) and tachycardia is not added; 100 does not score hypotension.","required":true,"schema":{"type":"number"},"example":"120"},{"in":"query","name":"comorbidity","description":"Caller-assigned comorbidity: none (0), cardiac (2; cardiac failure, IHD, or any major comorbidity), or renal_liver_metastatic (3; renal failure, liver failure, or disseminated malignancy). magent does not assign comorbidity.","required":true,"schema":{"type":"string"},"example":"none"}],"summary":"Pre-endoscopy Rockall","operationId":"get_api_calc_rockall_pre","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, age_years, heart_rate_bpm, systolic_mm_hg, comorbidity, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_rockall_comorbidity: comorbidity must be none, cardiac, or renal_liver_metastatic. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rockall-pre"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Pre-endoscopy Rockall (bulk)","operationId":"post_api_calc_rockall_pre","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_rockall_comorbidity: comorbidity must be none, cardiac, or renal_liver_metastatic. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rockall-pre"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","comorbidity":"none","heart_rate_bpm":"80","systolic_mm_hg":"120"},{"age":"50","comorbidity":"none","heart_rate_bpm":"80","systolic_mm_hg":"120"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pcp-hf":{"get":{"description":"Compute the Khan 2019 PCP-HF 10-year incident heart-failure percent for adults aged 30-79 from Table 2 sex- and cohort-specific Cox coefficients.\n\nWhen an agent already has those Khan 2019 predictors for a person aged 30-79 without prior CVD and needs that paper's 10-year incident HF percent. Caller assigns cohort as white or black. Not a diagnosis, treatment order, AHA PREVENT 2024, or 2013 PCE.\n\nNot a medical device. Not a diagnosis of heart failure. Not a treatment order, medication recommendation, or reason to withhold therapy.\n\n10-year incident HF only. Age 30-79. Not AHA PREVENT 2024. Not the 2013 ACC/AHA pooled-cohort equations (2013 PCE).\n\ncohort is caller-assigned as white or black using the paper's terms. magent does not assign race or ethnicity. Other cohort strings are rejected.\n\nTreated versus untreated systolic BP and fasting glucose each use the matching Table 2 coefficient (not both). Caller assigns age, sex, cohort, blood pressure, antihypertensive, glucose, diabetes medication, lipids, BMI, smoking, and QRS duration. magent does not assay lipids, does not measure blood pressure, and does not interpret an ECG. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 30-79). Khan 2019 Table 2 10-year incident HF is for ages 30-79. magent does not take a date of birth.","required":true,"schema":{"type":"integer"},"example":50},{"in":"query","name":"sex","description":"Sex used by the sex-specific Table 2 coefficients (female or male). Not cohort.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"cohort","description":"Caller-assigned cohort as used in Khan 2019 Table 2: white or black (paper terms). Not param race. magent does not assign race or ethnicity. Other strings are rejected.","required":true,"schema":{"type":"string","enum":["white","black"]},"example":"white"},{"in":"query","name":"sbp_mm_hg","description":"Systolic blood pressure in mm Hg (50-250). Enters as ln(SBP) with the treated or untreated Table 2 coefficient according to antihypertensive. magent does not measure blood pressure.","required":true,"schema":{"type":"number"},"example":120},{"in":"query","name":"antihypertensive","description":"Current antihypertensive treatment as assigned by the caller (true or false). true uses the Table 2 treated-SBP coefficient (and age × treated SBP when that cell is not N/A). false uses untreated SBP. Not both.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"glucose_mg_dl","description":"Fasting glucose in mg/dL (40-600). Enters as ln(glucose) with the treated or untreated Table 2 coefficient according to diabetes_medication. magent does not assay glucose.","required":true,"schema":{"type":"number"},"example":90},{"in":"query","name":"diabetes_medication","description":"Current diabetes medication as assigned by the caller (true or false). true uses the Table 2 treated-glucose coefficient. false uses untreated glucose. Not both.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"bmi_kg_m2","description":"Body-mass index in kg/m2 (10-80). Enters as ln(BMI) and ln(age)×ln(BMI) when that Table 2 cell is not N/A. magent does not measure height or weight.","required":true,"schema":{"type":"number"},"example":22},{"in":"query","name":"total_cholesterol_mg_dl","description":"Total cholesterol in mg/dL (50-800). Enters as ln(total cholesterol) when that Table 2 cell is not N/A. magent does not assay lipids.","required":true,"schema":{"type":"number"},"example":180},{"in":"query","name":"hdl_mg_dl","description":"HDL cholesterol in mg/dL (5-150). Enters as ln(HDL-C) when that Table 2 cell is not N/A. magent does not assay lipids.","required":true,"schema":{"type":"number"},"example":55},{"in":"query","name":"smoker","description":"Current cigarette smoking as assigned by the caller (true or false). Adds the Table 2 smoker term and ln(age) × smoker when that cell is not N/A. magent does not take a smoking history.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"qrs_ms","description":"QRS duration in ms (40-300). Enters as ln(QRS). magent does not interpret an ECG.","required":true,"schema":{"type":"number"},"example":90}],"summary":"PCP-HF 10-year incident HF","operationId":"get_api_calc_pcp_hf","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age, sex, cohort, sbp_mm_hg, antihypertensive, glucose_mg_dl, diabetes_medication, bmi_kg_m2, total_cholesterol_mg_dl, hdl_mg_dl, smoker, qrs_ms, individual_sum, ten_year_hf_percent, citation, disclaimer."},"400":{"description":"invalid_pcp_hf: PCP-HF inputs must match Khan 2019 age 30-79, sex, caller-assigned white or black cohort, treated or untreated SBP and glucose, lipids, BMI, smoking, and QRS. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pcp-hf"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PCP-HF 10-year incident HF (bulk)","operationId":"post_api_calc_pcp_hf","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pcp_hf: PCP-HF inputs must match Khan 2019 age 30-79, sex, caller-assigned white or black cohort, treated or untreated SBP and glucose, lipids, BMI, smoking, and QRS. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pcp-hf"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","antihypertensive":"false","bmi_kg_m2":"22","cohort":"white","diabetes_medication":"false","glucose_mg_dl":"90","hdl_mg_dl":"55","qrs_ms":"90","sbp_mm_hg":"120","sex":"female","smoker":"false","total_cholesterol_mg_dl":"180"},{"age":"50","antihypertensive":"false","bmi_kg_m2":"22","cohort":"white","diabetes_medication":"false","glucose_mg_dl":"90","hdl_mg_dl":"55","qrs_ms":"90","sbp_mm_hg":"120","sex":"female","smoker":"false","total_cholesterol_mg_dl":"180"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mets-ir":{"get":{"description":"Compute the Bello-Chavolla 2018 METS-IR score from fasting glucose, triglycerides, caller-supplied BMI, and HDL as a marker of insulin sensitivity associated with visceral adiposity and incident type 2 diabetes.\n\nWhen an agent needs published Bello-Chavolla 2018 METS-IR arithmetic and must not invent HOMA-IR, HOMA2, or a diabetes diagnosis.\n\nNot a medical device. Not a diabetes diagnosis and not a treatment threshold.\n\nBello-Chavolla 2018 METS-IR only. Not HOMA-IR, not HOMA2, and not an insulin-resistance cutoff beyond the published derivation highest T2D-risk quartile (mets_ir > 50.39).\n\nBMI is caller-supplied. magent does not compute BMI from height and weight in this tool.\n\nGlucose, triglycerides, and HDL must each be exactly one of the mg/dL or mmol/L keys, not mixed within an analyte. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"glucose_mg_dl","description":"Fasting plasma glucose in mg/dL (50-1000). Provide this or glucose_mmol_l, not both.","required":false,"schema":{"type":"number"},"example":"90"},{"in":"query","name":"glucose_mmol_l","description":"Fasting plasma glucose in mmol/L (2.8-55.5). Converted as mg/dL = mmol/L * 18. Provide this or glucose_mg_dl, not both.","required":false,"schema":{"type":"number"},"example":"5.0"},{"in":"query","name":"triglycerides_mg_dl","description":"Triglycerides in mg/dL (10-2000). Provide this or triglycerides_mmol_l, not both.","required":false,"schema":{"type":"number"},"example":"100"},{"in":"query","name":"triglycerides_mmol_l","description":"Triglycerides in mmol/L (0.11-22.6). Converted as mg/dL = mmol/L * 88.57. Provide this or triglycerides_mg_dl, not both.","required":false,"schema":{"type":"number"},"example":"1.13"},{"in":"query","name":"hdl_mg_dl","description":"HDL cholesterol in mg/dL (5-150). Provide this or hdl_mmol_l, not both. Used in the natural-log term.","required":false,"schema":{"type":"number"},"example":"50"},{"in":"query","name":"hdl_mmol_l","description":"HDL cholesterol in mmol/L (0.1-3.9). Converted as mg/dL = mmol/L * 38.67. Provide this or hdl_mg_dl, not both.","required":false,"schema":{"type":"number"},"example":"1.29"},{"in":"query","name":"bmi_kg_m2","description":"Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI.","required":true,"schema":{"type":"number"},"example":"25"}],"summary":"METS-IR","operationId":"get_api_calc_mets_ir","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, glucose_mg_dl, triglycerides_mg_dl, hdl_mg_dl, bmi_kg_m2, mets_ir, highest_quartile_t2d, citation, disclaimer."},"400":{"description":"invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_hdl: hdl_mg_dl must be a number from 5 to 150, or hdl_mmol_l from 0.1 to 3.9, not both. Returned before settlement; you are not charged.; invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_mets_ir_triglyceride: triglycerides_mg_dl must be 10-2000, or triglycerides_mmol_l 0.11-22.6, not both. Do not use the Friedewald 400 mg/dL cap. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mets-ir"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"METS-IR (bulk)","operationId":"post_api_calc_mets_ir","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_hdl: hdl_mg_dl must be a number from 5 to 150, or hdl_mmol_l from 0.1 to 3.9, not both. Returned before settlement; you are not charged.; invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_mets_ir_triglyceride: triglycerides_mg_dl must be 10-2000, or triglycerides_mmol_l 0.11-22.6, not both. Do not use the Friedewald 400 mg/dL cap. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mets-ir"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bmi_kg_m2":"25","glucose_mg_dl":"90","hdl_mg_dl":"50","triglycerides_mg_dl":"100"},{"bmi_kg_m2":"25","glucose_mg_dl":"90","hdl_mg_dl":"50","triglycerides_mg_dl":"100"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/plan":{"get":{"description":"Compute the O'Donnell 2012 PLAN score (preadmission comorbidities, level of consciousness, age, and neurologic deficit) for death and severe disability after acute ischemic stroke from the published Table 4 items.\n\nWhen an agent needs the published PLAN total and <10 / 10-15 / >15 grouping after acute ischemic stroke, and must not invent NIHSS-total points or iScore items from a chart narrative.\n\nNot a medical device and not a tPA decision.\n\nThis is the PLAN score (O'Donnell 2012), not iScore.\n\nDerived in the Registry of the Canadian Stroke Network in patients 18 years or older with acute ischemic stroke. Thrombolysis, TIA, and intracerebral hemorrhage were excluded from the primary analysis. The paper reports lower discrimination after thrombolysis and in lacunar stroke.\n\nThe caller assigns published items (preadmission dependence, cancer, heart failure, atrial fibrillation, reduced level of consciousness, significant or total arm and leg weakness, aphasia or neglect). magent does not examine the patient. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). O'Donnell 2012 Table 4: 1 point per decade (floor age/10), maximum 10. The derivation excluded patients younger than 18.","required":true,"schema":{"type":"integer"},"example":"18"},{"in":"query","name":"preadmission_dependence","description":"Preadmission dependence (O'Donnell 2012 Table 4). true scores 1.5; false scores 0. The caller assigns the item.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cancer","description":"History of cancer on the admission notes (O'Donnell 2012 Table 4; not a diagnosis made during the incident hospitalization). true scores 1.5; false scores 0. The caller assigns the item.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"congestive_heart_failure","description":"Congestive heart failure (O'Donnell 2012 Table 4). true scores 1; false scores 0. The caller assigns the item.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"atrial_fibrillation","description":"Atrial fibrillation (O'Donnell 2012 Table 4). true scores 1; false scores 0. The caller assigns the item.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"reduced_loc","description":"Caller-assigned reduced level of consciousness (O'Donnell 2012 Table 4). true scores 5; false (alert) scores 0. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"arm_weakness","description":"Caller-assigned significant or total arm weakness (O'Donnell 2012 Table 4). true scores 2. Mild or no weakness scores 0. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"leg_weakness","description":"Caller-assigned significant or total leg weakness (O'Donnell 2012 Table 4). true scores 2. Mild or no weakness scores 0. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"aphasia_or_neglect","description":"Caller-assigned aphasia or neglect (O'Donnell 2012 Table 4 combined item). true scores 1 whether one or both are present; false scores 0. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"PLAN","operationId":"get_api_calc_plan","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, plan_band, age_years, age_points, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_plan: each PLAN 2012 stroke item must be a published value. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/plan"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PLAN (bulk)","operationId":"post_api_calc_plan","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_plan: each PLAN 2012 stroke item must be a published value. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/plan"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"18","aphasia_or_neglect":"false","arm_weakness":"false","atrial_fibrillation":"false","cancer":"false","congestive_heart_failure":"false","leg_weakness":"false","preadmission_dependence":"false","reduced_loc":"false"},{"age":"18","aphasia_or_neglect":"false","arm_weakness":"false","atrial_fibrillation":"false","cancer":"false","congestive_heart_failure":"false","leg_weakness":"false","preadmission_dependence":"false","reduced_loc":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/denver-bcvi":{"get":{"description":"Apply the Cothren 2005 modified Denver BCVI screening list and return whether any published sign or high-energy risk factor is present (imaging indicated by this screen).\n\nWhen an agent has caller-assigned blunt-trauma signs and injury-pattern flags and needs the published modified Denver BCVI imaging screen, not Biffl grade, not expanded Denver, not NEXUS, and not Canadian C-spine.\n\nNot a medical device. Not a diagnosis. magent does not examine the patient and does not read a CT angiogram.\n\nThis tool is the Cothren 2005 Table 1 modified Denver BCVI screening list only. It is not Biffl grade I-V, not expanded Denver, not Memphis criteria, not NEXUS, and not the Canadian C-spine rule.\n\nCaller assigns published flags. magent does not take numeric age or GCS. Cervical bruit is the published age-<50 indication. DAI is the published GCS <6 compound. C-spine is the published patterns (subluxation, transverse foramen, or C1-C3), not any cervical fracture.\n\nIsolated seat-belt abrasion is not a Table 1 item. Screen positive (any published sign or risk factor) is an indication for imaging as published. Does not replace imaging when the screen is positive. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"arterial_hemorrhage","description":"Arterial hemorrhage as assigned by the caller (Cothren 2005 Table 1 sign). true or false. A true flag is a published indication for imaging. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cervical_bruit_age_lt_50","description":"Cervical bruit in a patient younger than 50 years as assigned by the caller (Cothren 2005 Table 1 sign). true or false. Caller assigns the published <50 indication; magent does not take numeric age.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"expanding_cervical_hematoma","description":"Expanding cervical hematoma as assigned by the caller (Cothren 2005 Table 1 sign). true or false. A true flag is a published indication for imaging. magent does not examine the neck.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"focal_neuro_deficit","description":"Focal neurologic deficit as assigned by the caller (Cothren 2005 Table 1 sign). true or false. A true flag is a published indication for imaging. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"neuro_exam_incongruous_head_ct","description":"Neurologic exam incongruous with head CT scan findings as assigned by the caller (Cothren 2005 Table 1 sign). true or false. magent does not read a head CT.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"stroke_on_secondary_ct","description":"Stroke on secondary CT scan as assigned by the caller (Cothren 2005 Table 1 sign). true or false. magent does not read a CT scan.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"lefort_ii_or_iii","description":"High-energy transfer with LeFort II or III fracture as assigned by the caller (Cothren 2005 Table 1 risk factor). true or false. A true flag is a published indication for imaging. magent does not interpret facial imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cspine_subluxation_transverse_foramen_or_c1_c3","description":"High-energy transfer with the published C-spine patterns (subluxation, fracture extending into the transverse foramen, or fracture of C1-C3) as assigned by the caller (Cothren 2005 Table 1 risk factor). true or false. Not any cervical-spine fracture. magent does not interpret C-spine imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"basilar_skull_fracture_carotid_canal","description":"High-energy transfer with basilar skull fracture with carotid canal involvement as assigned by the caller (Cothren 2005 Table 1 risk factor). true or false. magent does not interpret skull imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"dai_gcs_lt_6","description":"High-energy transfer with diffuse axonal injury and GCS <6 as assigned by the caller (Cothren 2005 Table 1 risk factor). true or false. Caller assigns the published compound; magent does not take a GCS integer.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"near_hanging_anoxic_brain_injury","description":"High-energy transfer with near hanging and anoxic brain injury as assigned by the caller (Cothren 2005 Table 1 risk factor). true or false. magent does not classify mechanism.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Modified Denver BCVI","operationId":"get_api_calc_denver_bcvi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, screen_positive, imaging_indicated, sign_positive, risk_factor_positive, criteria, citation, disclaimer."},"400":{"description":"invalid_denver_bcvi: Modified Denver BCVI screening needs the published mechanism and sign flags from the cited trauma paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/denver-bcvi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Modified Denver BCVI (bulk)","operationId":"post_api_calc_denver_bcvi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_denver_bcvi: Modified Denver BCVI screening needs the published mechanism and sign flags from the cited trauma paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/denver-bcvi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"arterial_hemorrhage":"false","basilar_skull_fracture_carotid_canal":"false","cervical_bruit_age_lt_50":"false","cspine_subluxation_transverse_foramen_or_c1_c3":"false","dai_gcs_lt_6":"false","expanding_cervical_hematoma":"false","focal_neuro_deficit":"false","lefort_ii_or_iii":"false","near_hanging_anoxic_brain_injury":"false","neuro_exam_incongruous_head_ct":"false","stroke_on_secondary_ct":"false"},{"arterial_hemorrhage":"false","basilar_skull_fracture_carotid_canal":"false","cervical_bruit_age_lt_50":"false","cspine_subluxation_transverse_foramen_or_c1_c3":"false","dai_gcs_lt_6":"false","expanding_cervical_hematoma":"false","focal_neuro_deficit":"false","lefort_ii_or_iii":"false","near_hanging_anoxic_brain_injury":"false","neuro_exam_incongruous_head_ct":"false","stroke_on_secondary_ct":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/health":{"get":{"summary":"Liveness probe","operationId":"get_health","responses":{"200":{"description":"OK"}},"security":[]}},"/api/calc/rome-iv-bloating":{"get":{"description":"Apply the Mearin 2016 Rome IV C4 functional abdominal bloating/distension criteria and return whether the published C4 box holds (rome_iv_bloating).\n\nWhen an agent already has the three caller-assigned Rome IV C4 flags as in Mearin 2016 and needs whether the published functional abdominal bloating/distension box holds. magent does not examine the patient.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose functional abdominal bloating or distension.\n\nThe caller assigns the three flags. magent does not examine the patient.\n\nThis tool is adult Rome IV C4 functional abdominal bloating/distension only. Not child, not IBS, not functional constipation, not functional diarrhea, and not PDS or functional dyspepsia as a substitute. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"criteria_last_3_months_onset_6_months","description":"Criteria fulfilled for the last 3 months with symptom onset at least 6 months prior to diagnosis, as assigned (Mearin 2016 C4). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"recurrent_bloating_or_distension_ge_1_day_week_predominant","description":"Recurrent bloating or visible distension, on average at least 1 day per week, that predominates over other bowel symptoms (Mearin 2016 C4). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"insufficient_criteria_for_ibs_fc_diarrhea_pds","description":"Insufficient criteria for IBS, functional constipation, functional diarrhea, or postprandial distress syndrome, as assigned by the caller (Mearin 2016 C4). true or false. magent does not apply those other boxes.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV Bloating","operationId":"get_api_calc_rome_iv_bloating","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, rome_iv_bloating, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-bloating"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV Bloating (bulk)","operationId":"post_api_calc_rome_iv_bloating","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-bloating"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"criteria_last_3_months_onset_6_months":"true","insufficient_criteria_for_ibs_fc_diarrhea_pds":"true","recurrent_bloating_or_distension_ge_1_day_week_predominant":"true"},{"criteria_last_3_months_onset_6_months":"true","insufficient_criteria_for_ibs_fc_diarrhea_pds":"true","recurrent_bloating_or_distension_ge_1_day_week_predominant":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/grace":{"get":{"description":"Sum the Granger 2003 in-hospital GRACE 1.0 nomogram points from eight admission predictors and return that paper's printed in-hospital mortality readout.\n\nWhen an agent already has age, heart rate, systolic BP, creatinine, Killip class, cardiac arrest, ST-segment deviation, and initial enzyme flags and needs the Granger 2003 in-hospital point total, not a catheterization order.\n\nNot a medical device.\n\nNot a cath-lab order, reperfusion protocol, or diagnosis of ACS. magent does not interpret the ECG or assign Killip class.\n\nGranger 2003 in-hospital GRACE 1.0 integer nomogram only. Not the later continuous GRACE 2.0 model. Not Fox 2006 6-month mortality. Not Eagle 2004 post-discharge.\n\nDoes not apply later ESC NSTE-ACS ≤108 / 109-140 / >140 cutoffs; those bands are not printed in Granger 2003. in_hospital_mortality_percent is the 2003 nomogram readout (≤60 → 0.2%; labeled 70-240 percents at or below the total; ≥250 → 52%).\n\nCardiac arrest, ST-segment deviation, and elevated enzymes are caller-assigned flags. magent does not read the chart or the laboratory. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Granger 2003 nomogram: <30 scores 0; 30-39 scores 8; 40-49 scores 25; 50-59 scores 41; 60-69 scores 58; 70-79 scores 75; 80-89 scores 91; ≥90 scores 100.","required":true,"schema":{"type":"integer"},"example":65},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats/min (20-300). Granger 2003 nomogram: <50 scores 0; 50-69 scores 3; 70-89 scores 9; 90-109 scores 15; 110-149 scores 24; 150-199 scores 38; ≥200 scores 46.","required":true,"schema":{"type":"integer"},"example":80},{"in":"query","name":"sbp_mm_hg","description":"Systolic blood pressure in mm Hg (40-300). Granger 2003 nomogram, inverse: <80 scores 58; 80-99 scores 53; 100-119 scores 43; 120-139 scores 34; 140-159 scores 24; 160-199 scores 10; ≥200 scores 0.","required":true,"schema":{"type":"integer"},"example":130},{"in":"query","name":"creatinine_mg_dl","description":"Initial serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l. If both are sent, creatinine_mg_dl is scored. Granger 2003 nomogram: 0.0-0.39 scores 1; 0.4-0.79 scores 4; 0.8-1.19 scores 7; 1.2-1.59 scores 10; 1.6-1.99 scores 13; 2.0-3.99 scores 21; ≥4.0 scores 28.","required":false,"schema":{"type":"number"},"example":1.0},{"in":"query","name":"creatinine_umol_l","description":"Initial serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42. Alternate to creatinine_mg_dl. Ignored when creatinine_mg_dl is present.","required":false,"schema":{"type":"number"},"example":88.42},{"in":"query","name":"killip_class","description":"Killip class 1-4 as assigned by the caller (1 no heart failure scores 0; 2 rales or elevated venous pressure scores 20; 3 pulmonary edema scores 39; 4 cardiogenic shock scores 59). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":1},{"in":"query","name":"cardiac_arrest","description":"Cardiac arrest at presentation as assigned by the caller (Granger 2003). true scores 39. magent does not read the chart. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"st_deviation","description":"ST-segment deviation on the presenting ECG as assigned by the caller (Granger 2003). true scores 28. magent does not interpret the ECG. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"elevated_enzymes","description":"Elevated initial cardiac enzymes as assigned by the caller (Granger 2003). true scores 14. magent does not read the laboratory. true or false.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"GRACE","operationId":"get_api_calc_grace","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, in_hospital_mortality_percent, age_years, heart_rate_bpm, sbp_mm_hg, creatinine_mg_dl, killip_class, cardiac_arrest, st_deviation, elevated_enzymes, components, citation, disclaimer."},"400":{"description":"invalid_grace: GRACE in-hospital inputs must match Granger 2003 age, heart rate, SBP, creatinine, Killip class, cardiac arrest, ST deviation, and enzyme flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/grace"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"GRACE (bulk)","operationId":"post_api_calc_grace","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_grace: GRACE in-hospital inputs must match Granger 2003 age, heart rate, SBP, creatinine, Killip class, cardiac arrest, ST deviation, and enzyme flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/grace"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"65","cardiac_arrest":"false","creatinine_mg_dl":"1.0","elevated_enzymes":"false","heart_rate_bpm":"80","killip_class":"1","sbp_mm_hg":"130","st_deviation":"false"},{"age":"65","cardiac_arrest":"false","creatinine_mg_dl":"1.0","elevated_enzymes":"false","heart_rate_bpm":"80","killip_class":"1","sbp_mm_hg":"130","st_deviation":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/kawasaki":{"get":{"description":"Apply McCrindle 2017 classic/complete Kawasaki disease criteria and return complete or not_complete from fever_days and five caller-assigned principal features.\n\nWhen an agent already has fever duration in days and the five principal clinical features as assigned by the caller and needs the published classic/complete Kawasaki classification. magent does not examine the patient or read an echocardiogram.\n\nNot a medical device and not a diagnosis of Kawasaki disease.\n\nThis tool is classic/complete Kawasaki disease criteria from McCrindle 2017 only. It is not the incomplete-KD laboratory or echocardiogram workup.\n\nmagent does not examine the patient or read an echocardiogram. The caller assigns fever_days and the five principal features as already determined.\n\nThe rare 3-day fever clinician exception in the statement is not implemented. Fever of 3 days is not_complete even with all 5 principal features. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"fever_days","description":"Duration of fever in days (integer 1-30). Classic complete KD requires fever_days >= 5 with >=4 principal features; with >=4 principal features the diagnosis may be made with 4 days of fever (McCrindle 2017). The 3-day clinician exception is not this tool.","required":true,"schema":{"type":"integer"},"example":"5"},{"in":"query","name":"oral_mucosal_changes","description":"Principal feature: erythema and cracking of lips, strawberry tongue, and/or erythema of oral and pharyngeal mucosa (McCrindle 2017). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"bilateral_conjunctival_injection","description":"Principal feature: bilateral bulbar conjunctival injection without exudate (McCrindle 2017). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"rash","description":"Principal feature: rash — maculopapular, diffuse erythroderma, or erythema multiforme-like (McCrindle 2017). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"extremity_changes","description":"Principal feature: erythema and edema of the hands and feet in the acute phase and/or periungual desquamation in the subacute phase (McCrindle 2017). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"cervical_lymphadenopathy","description":"Principal feature: cervical lymphadenopathy (>=1.5 cm diameter), usually unilateral (McCrindle 2017). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Kawasaki","operationId":"get_api_calc_kawasaki","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, fever_days, oral_mucosal_changes, bilateral_conjunctival_injection, rash, extremity_changes, cervical_lymphadenopathy, principal_feature_count, classification, criteria, citation, disclaimer."},"400":{"description":"invalid_fever_days: fever_days must be an integer from 1 to 30. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/kawasaki"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Kawasaki (bulk)","operationId":"post_api_calc_kawasaki","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_fever_days: fever_days must be an integer from 1 to 30. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/kawasaki"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bilateral_conjunctival_injection":"true","cervical_lymphadenopathy":"true","extremity_changes":"true","fever_days":"5","oral_mucosal_changes":"true","rash":"true"},{"bilateral_conjunctival_injection":"true","cervical_lymphadenopathy":"true","extremity_changes":"true","fever_days":"5","oral_mucosal_changes":"true","rash":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/framingham-chd":{"get":{"description":"Sum Wilson 1998 sex-specific total-cholesterol point sheets (age, TC, HDL, JNC-V blood pressure, diabetes, smoking) and return the published 10-year CHD percent.\n\nWhen an agent has those Wilson 1998 predictors as assigned by the caller and needs the published Figs 3-4 10-year CHD lookup. Not ATP-III 2001 treated-SBP sheets, not pooled-cohort ASCVD, and not a statin order.\n\nNot a medical device. Not a statin order, intensity, or LDL target. magent does not measure lipids or blood pressure and does not diagnose coronary disease.\n\nWilson 1998 Figs 3-4 individual point-total lookup is 10-year CHD from that paper (derivation included angina, coronary insufficiency, MI, and coronary death). Hard CHD (MI or coronary death, excluding angina) is printed on the same sheet only as an age-band Framingham average, not a second individual lookup. This tool returns the published point-total 10-year CHD percent.\n\nAge 30-74 as published. No race coefficient. No ATP-III 2001 / NHLBI treated-versus-untreated SBP sheets. No age×cholesterol interaction points. No later pooled-cohort ASCVD cutoffs.\n\nUses the total-cholesterol sheet, not the LDL-C sheet. diabetes and smoker are caller-assigned dichotomous flags; former smoking is smoker=false. Blood pressure uses JNC-V categories; when SBP and DBP stages differ, the higher point value is used.\n\nMen point totals >=14 map to the published >=53% bound (returned as 53 with ten_year_chd_risk_at_or_above true). Women >=17 map to >=27% (returned as 27). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years. Wilson 1998 derivation was ages 30-74; magent accepts that published range only. Sex-specific 5-year point bands from Figs 3-4.","required":true,"schema":{"type":"integer"},"example":30},{"in":"query","name":"sex","description":"female or male. Wilson 1998 published separate point sheets. No race coefficient.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"total_cholesterol_mg_dl","description":"Total cholesterol in mg/dL (50-500, magent clamp). Wilson 1998 TC bands: <160, 160-199, 200-239, 240-279, >=280. Not the LDL-C sheet. magent does not assay lipids.","required":true,"schema":{"type":"number"},"example":180},{"in":"query","name":"hdl_mg_dl","description":"HDL cholesterol in mg/dL (5-150, magent clamp). Wilson 1998 HDL bands: <35, 35-44, 45-49, 50-59, >=60. magent does not assay lipids.","required":true,"schema":{"type":"number"},"example":45},{"in":"query","name":"sbp_mm_hg","description":"Systolic blood pressure in mm Hg (70-260, magent clamp). JNC-V categories with diastolic: when SBP and DBP stages differ, use the higher point value (Wilson 1998 Fig 3-4). magent does not measure blood pressure. Not ATP-III treated vs untreated SBP.","required":true,"schema":{"type":"number"},"example":110},{"in":"query","name":"dbp_mm_hg","description":"Diastolic blood pressure in mm Hg (40-150, magent clamp). JNC-V: <80 optimal, 80-84 normal, 85-89 high-normal, 90-99 stage I, >=100 stage II-IV. magent does not measure blood pressure.","required":true,"schema":{"type":"number"},"example":70},{"in":"query","name":"diabetes","description":"Diabetes as assigned by the caller (Wilson 1998 dichotomous). true is 2 points in men and 4 points in women. magent does not assay glucose.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"smoker","description":"Current cigarette smoking as assigned by the caller (Wilson 1998 dichotomous). true is 2 points in both sexes. Former smoking is false. magent does not take a smoking history.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"Framingham CHD","operationId":"get_api_calc_framingham_chd","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, sex, age_years, age_band, total_cholesterol_mg_dl, cholesterol_band, hdl_mg_dl, hdl_band, sbp_mm_hg, dbp_mm_hg, blood_pressure_category, diabetes, smoker, score, max_score, ten_year_chd_risk_percent, ten_year_chd_risk_at_or_above, components, citation, disclaimer."},"400":{"description":"invalid_framingham_chd: Framingham CHD inputs must match Wilson 1998 sex-specific age, lipids, blood pressure, diabetes, and smoking categories from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/framingham-chd"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Framingham CHD (bulk)","operationId":"post_api_calc_framingham_chd","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_framingham_chd: Framingham CHD inputs must match Wilson 1998 sex-specific age, lipids, blood pressure, diabetes, and smoking categories from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/framingham-chd"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"30","dbp_mm_hg":"70","diabetes":"false","hdl_mg_dl":"45","sbp_mm_hg":"110","sex":"male","smoker":"false","total_cholesterol_mg_dl":"180"},{"age":"30","dbp_mm_hg":"70","diabetes":"false","hdl_mg_dl":"45","sbp_mm_hg":"110","sex":"male","smoker":"false","total_cholesterol_mg_dl":"180"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rasp":{"get":{"description":"Multiply Vertesi 2003 exclusive Steps A–C (source population, inoculum type, transmission) to Z, take basic_risk = 1/Z, apply volume modifier D as total_risk = basic_risk × D, and return the Table 2 suggested-treatment band.\n\nWhen an agent has already assigned Vertesi 2003 exclusive A/B/C/D tokens and needs the published product risk and Table 2 band, not a PEP order and not an interpretation of the source patient.\n\nNot a medical device. Not a PEP, nPEP, or antiretroviral order. magent does not interpret the source patient.\n\nVertesi 2003 Figure 1 scores bake in average Canadian community HIV prevalence. They are not recalibrated for other prevalence.\n\nEach of Steps A–D is an exclusive caller-assigned token. magent does not assign source status, inoculum type, transmission method, or volume.\n\nTable 2 bands are published suggestions, not a treatment mandate. Not HIRI-MSM and not Menza. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"source_population","description":"Vertesi 2003 Step A source population as assigned by the caller (exclusive). known_hiv_acute_aids scores 1 (acute AIDS illness); known_hiv_asymptomatic scores 10; unknown_hiv_high_risk scores 100; unknown_hiv_low_risk scores 1000. magent does not interpret the source patient.","required":true,"schema":{"type":"string","enum":["known_hiv_acute_aids","known_hiv_asymptomatic","unknown_hiv_high_risk","unknown_hiv_low_risk"]},"example":"known_hiv_asymptomatic"},{"in":"query","name":"inoculum_type","description":"Vertesi 2003 Step B inoculum type as assigned by the caller (exclusive). fresh_blood scores 1; body_fluids_at_risk scores 10 (semen); dried_old_blood scores 100; low_risk_secretions scores 1000 (tears, saliva, urine). magent does not classify the specimen.","required":true,"schema":{"type":"string","enum":["fresh_blood","body_fluids_at_risk","dried_old_blood","low_risk_secretions"]},"example":"fresh_blood"},{"in":"query","name":"transmission","description":"Vertesi 2003 Step C method of transmission as assigned by the caller (exclusive). intravenous scores 1; deep_intramuscular scores 10; deep_transcutaneous_visible_bleeding scores 100; superficial_transcutaneous_no_bleeding scores 200; mucosal_contact scores 500; intact_skin scores 1000. magent does not examine the wound.","required":true,"schema":{"type":"string","enum":["intravenous","deep_intramuscular","deep_transcutaneous_visible_bleeding","superficial_transcutaneous_no_bleeding","mucosal_contact","intact_skin"]},"example":"deep_transcutaneous_visible_bleeding"},{"in":"query","name":"inoculum_volume","description":"Vertesi 2003 Step D volume modifier as assigned by the caller (exclusive). massive_transfusion scores 100; measurable_gt_1_ml scores 10; moderate_large_bore_gt_22g scores 5; small_small_bore_lt_22g scores 3; trace_surface scores 1 (suture needle). 22 g exactly is not a published token. magent does not measure volume.","required":true,"schema":{"type":"string","enum":["massive_transfusion","measurable_gt_1_ml","moderate_large_bore_gt_22g","small_small_bore_lt_22g","trace_surface"]},"example":"small_small_bore_lt_22g"}],"summary":"RASP","operationId":"get_api_calc_rasp","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, source_population, inoculum_type, transmission, inoculum_volume, source_score, inoculum_type_score, transmission_score, volume_modifier, z, basic_risk, total_risk, risk_one_in, risk_level, suggested_treatment, citation, disclaimer."},"400":{"description":"invalid_rasp: RASP inputs must match Vertesi 2003 exclusive source-population, inoculum-type, transmission, and volume scores from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rasp"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"RASP (bulk)","operationId":"post_api_calc_rasp","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rasp: RASP inputs must match Vertesi 2003 exclusive source-population, inoculum-type, transmission, and volume scores from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rasp"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"inoculum_type":"fresh_blood","inoculum_volume":"small_small_bore_lt_22g","source_population":"known_hiv_asymptomatic","transmission":"deep_transcutaneous_visible_bleeding"},{"inoculum_type":"fresh_blood","inoculum_volume":"small_small_bore_lt_22g","source_population":"known_hiv_asymptomatic","transmission":"deep_transcutaneous_visible_bleeding"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rifle":{"get":{"description":"Apply Bellomo 2004 Fig. 1 RIFLE classification and return the worse of the creatinine and urine-output limbs (none, risk, injury, failure), with persistent ARF beyond 4 weeks mapping to loss and ESRD beyond 3 months mapping to esrd.\n\nWhen an agent already has baseline and current serum creatinine in mg/dL, a caller-assigned RIFLE urine-output category, and optional Loss/ESRD duration flags, and needs the published RIFLE class. magent does not assay creatinine or measure urine. Not AKIN 2007 and not KDIGO 2012.\n\nNot a medical device and not a diagnosis of acute kidney injury.\n\nmagent does not assay creatinine or measure urine. baseline_creatinine_mg_dl and current_creatinine_mg_dl are caller-supplied in mg/dL only.\n\nurine_output is the caller-assigned published duration category. magent does not collect weight or urine volume.\n\nLoss and ESRD are caller-assigned duration flags; magent does not collect observation time.\n\nThis tool is Bellomo 2004 Fig. 1 RIFLE classification only. Not AKIN 2007 and not KDIGO 2012. It does not estimate baseline creatinine with MDRD. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"baseline_creatinine_mg_dl","description":"Baseline serum creatinine in mg/dL (0.1-20). Classification uses the unrounded value. µmol/L is not accepted on this tool. magent does not assay creatinine.","required":true,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"current_creatinine_mg_dl","description":"Current serum creatinine in mg/dL (0.1-20). Classification uses the unrounded value. µmol/L is not accepted on this tool. magent does not assay creatinine.","required":true,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"urine_output","description":"Caller-assigned RIFLE urine-output category (Bellomo 2004 Fig. 1): none (no oliguria or anuria criterion); oliguria_gt_6h (<0.5 mL/kg/h for 6 hours); oliguria_gt_12h (<0.5 mL/kg/h for 12 hours); oliguria_24h_or_anuria_12h (<0.3 mL/kg/h for 24 hours or anuria for 12 hours). Case-insensitive. magent does not collect weight or measure urine.","required":true,"schema":{"type":"string","enum":["none","oliguria_gt_6h","oliguria_gt_12h","oliguria_24h_or_anuria_12h"]},"example":"none"},{"in":"query","name":"persistent_arf_gt_4_weeks","description":"Persistent complete loss of kidney function for more than 4 weeks as assigned by the caller (Bellomo 2004 Loss). true maps to rifle_class loss unless esrd_gt_3_months is true. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"esrd_gt_3_months","description":"End-stage kidney disease for more than 3 months as assigned by the caller (Bellomo 2004 ESRD). true maps to rifle_class esrd irrespective of creatinine, urine, or Loss. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"RIFLE","operationId":"get_api_calc_rifle","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, baseline_creatinine_mg_dl, current_creatinine_mg_dl, urine_output, persistent_arf_gt_4_weeks, esrd_gt_3_months, creat_class, uo_class, rifle_class, components, citation, disclaimer."},"400":{"description":"invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_rifle_urine: urine_output must be none, oliguria_gt_6h, oliguria_gt_12h, or oliguria_24h_or_anuria_12h (Bellomo 2004). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rifle"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"RIFLE (bulk)","operationId":"post_api_calc_rifle","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_rifle_urine: urine_output must be none, oliguria_gt_6h, oliguria_gt_12h, or oliguria_24h_or_anuria_12h (Bellomo 2004). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rifle"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"baseline_creatinine_mg_dl":"1.0","current_creatinine_mg_dl":"1.0","esrd_gt_3_months":"false","persistent_arf_gt_4_weeks":"false","urine_output":"none"},{"baseline_creatinine_mg_dl":"1.0","current_creatinine_mg_dl":"1.0","esrd_gt_3_months":"false","persistent_arf_gt_4_weeks":"false","urine_output":"none"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/years":{"get":{"description":"Apply the van der Hulle 2017 YEARS algorithm: count three caller-assigned items and return whether PE is excluded at the published D-dimer threshold.\n\nWhen an agent has caller-assigned YEARS items and a D-dimer in ng/mL FEU and needs the published PE-excluded or CTPA-indicated result.\n\nNot a diagnosis of pulmonary embolism. YEARS is a diagnostic-management algorithm, not a PE confirmation.\n\nNot the Wells PE score and not PERC. Do not substitute those tools.\n\nThe 2017 YEARS cohort excluded pregnancy. This tool does not apply a pregnancy-adapted YEARS rule and has no pregnancy parameter.\n\nThe caller assigns clinical_signs_dvt, hemoptysis, and pe_most_likely. magent does not decide whether PE is the most likely diagnosis and does not examine the patient.\n\nD-dimer is ng/mL fibrinogen-equivalent units (FEU) as in the paper. Other D-dimer units are not this tool.\n\nThresholds are strict less-than: 1000 ng/mL when years_items is 0; 500 ng/mL when years_items is 1-3. Equality is not PE-excluded. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"clinical_signs_dvt","description":"Clinical signs of deep-vein thrombosis. true or false as assigned by the caller. Counts as one unweighted YEARS item when true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hemoptysis","description":"Hemoptysis. true or false as assigned by the caller. Counts as one unweighted YEARS item when true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pe_most_likely","description":"PE is the most likely diagnosis, as assigned by the caller. magent does not decide PE most likely. Counts as one unweighted YEARS item when true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"d_dimer_ng_ml","description":"D-dimer in ng/mL fibrinogen-equivalent units (FEU) as in van der Hulle 2017 (0-20000). PE excluded only when strictly below 1000 (0 YEARS items) or 500 (1-3 items). Equality is not excluded.","required":true,"schema":{"type":"number"},"example":"499"}],"summary":"YEARS algorithm","operationId":"get_api_calc_years","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, years_items, d_dimer_ng_ml, d_dimer_threshold_ng_ml, pe_excluded, ctpa_indicated, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_d_dimer: d_dimer_ng_ml must be a number from 0 to 20000. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/years"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"YEARS algorithm (bulk)","operationId":"post_api_calc_years","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_d_dimer: d_dimer_ng_ml must be a number from 0 to 20000. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/years"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"clinical_signs_dvt":"false","d_dimer_ng_ml":"499","hemoptysis":"false","pe_most_likely":"false"},{"clinical_signs_dvt":"false","d_dimer_ng_ml":"499","hemoptysis":"false","pe_most_likely":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/flipi":{"get":{"description":"Sum the Solal-Céligny 2004 FLIPI adverse factors for follicular lymphoma and return low (0–1), intermediate (2), or high (≥3).\n\nWhen an agent needs the published FLIPI 2004 point total and class and must not invent a follicular-lymphoma diagnosis or treatment choice, and must not substitute FLIPI-2.\n\nNot a medical device and not a follicular-lymphoma diagnosis or treatment choice. magent does not examine the patient.\n\nThis is FLIPI 2004 (Solal-Céligny), not FLIPI-2.\n\nmagent does not stage lymphoma, assay hemoglobin, count nodal sites, or measure LDH. All five inputs are caller-assigned flags. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_gt_60","description":"Age >60 years as assigned by the caller (Solal-Céligny 2004). true scores 1. magent does not assign age.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"stage_iii_iv","description":"Ann Arbor stage III–IV as assigned by the caller (Solal-Céligny 2004). true scores 1. magent does not stage lymphoma.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hemoglobin_lt_120_g_l","description":"Hemoglobin <120 g/L as assigned by the caller (Solal-Céligny 2004). true scores 1. magent does not assay hemoglobin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"nodal_sites_gt_4","description":"Nodal areas >4 as assigned by the caller (Solal-Céligny 2004). true scores 1. magent does not count nodal sites.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ldh_above_uln","description":"Serum LDH above the upper limit of normal as assigned by the caller (Solal-Céligny 2004). true scores 1. magent does not measure LDH.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"FLIPI","operationId":"get_api_calc_flipi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, flipi_band, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/flipi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"FLIPI (bulk)","operationId":"post_api_calc_flipi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/flipi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_gt_60":"false","hemoglobin_lt_120_g_l":"false","ldh_above_uln":"false","nodal_sites_gt_4":"false","stage_iii_iv":"false"},{"age_gt_60":"false","hemoglobin_lt_120_g_l":"false","ldh_above_uln":"false","nodal_sites_gt_4":"false","stage_iii_iv":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/modified-rankin":{"get":{"description":"Return the van Swieten 1988 modified Rankin handicap grade 0-5 from a caller-assigned integer, with the published grade wording.\n\nWhen an agent needs the 1988 modified Rankin handicap grade 0-5 and must not invent grade 6 (dead), Rankin 1957 five-grade wording, or a discharge or disability-benefit protocol.\n\nNot a medical device and not a diagnosis. Not a discharge or disability-benefit protocol. magent does not interview the patient.\n\nvan Swieten 1988 is grades 0-5 only and does not include a dead grade. Grade 6 (dead) is a later addition and is not returned.\n\nThe caller assigns mrs 0-5. magent does not examine the patient or apply a structured interview. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"mrs","description":"van Swieten 1988 modified Rankin handicap grade 0-5 as assigned by the caller (0 no symptoms at all; 1 no significant disability despite symptoms; 2 slight disability; 3 moderate disability, walks unaided; 4 moderately severe, unable to walk unaided; 5 severe, bedridden, incontinent, constant nursing). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"Modified Rankin","operationId":"get_api_calc_modified_rankin","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, mrs, score, max_score, grade, components, citation, disclaimer."},"400":{"description":"invalid_mrs: mrs must be an integer from 0 to 5 (van Swieten 1988 grades). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/modified-rankin"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Modified Rankin (bulk)","operationId":"post_api_calc_modified_rankin","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_mrs: mrs must be an integer from 0 to 5 (van Swieten 1988 grades). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/modified-rankin"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"mrs":"0"},{"mrs":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/bush-francis":{"get":{"description":"Sum Bush 1996 23-item catatonia rating scale points from caller-assigned integers and report the 14-item screen (positive iff at least two of items 1-14 score above 0). Does not diagnose catatonia.\n\nWhen an agent already has Bush 1996 23-item integers and needs the published severity sum and 14-item screen. magent does not perform the standardized examination, diagnose catatonia, or apply DSM catatonia criteria.\n\nNot a medical device and not a diagnosis of catatonia or a treatment order.\n\nEach of the 23 items is a caller-assigned Bush 1996 integer. magent does not perform the standardized examination and does not examine the patient.\n\nScreening uses the first 14 items only: screen_positive is true iff at least two of those items score above 0 (Bush 1996 cases defined by ≥2 signs on the 14-item screen). This is not DSM catatonia criteria as a separate tool.\n\nItems 17-21 (mitgehen, gegenhalten, ambitendency, grasp_reflex, perseveration) are 0 or 3 only in Bush 1996. magent does not apply later training-manual changes to those ranges. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"excitement","description":"Caller-assigned Bush 1996 excitement (item 1; integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"1"},{"in":"query","name":"immobility_stupor","description":"Caller-assigned Bush 1996 immobility/stupor (item 2; integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"1"},{"in":"query","name":"mutism","description":"Caller-assigned Bush 1996 mutism (item 3; integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"staring","description":"Caller-assigned Bush 1996 staring (item 4; integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"posturing_catalepsy","description":"Caller-assigned Bush 1996 posturing/catalepsy (item 5; integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"grimacing","description":"Caller-assigned Bush 1996 grimacing (item 6; integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"echopraxia_echolalia","description":"Caller-assigned Bush 1996 echopraxia/echolalia (item 7; integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"stereotypy","description":"Caller-assigned Bush 1996 stereotypy (item 8; integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"mannerisms","description":"Caller-assigned Bush 1996 mannerisms (item 9; integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"verbigeration","description":"Caller-assigned Bush 1996 verbigeration (item 10; integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"rigidity","description":"Caller-assigned Bush 1996 rigidity (item 11; integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"negativism","description":"Caller-assigned Bush 1996 negativism (item 12; integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"waxy_flexibility","description":"Caller-assigned Bush 1996 waxy flexibility (item 13; integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"withdrawal","description":"Caller-assigned Bush 1996 withdrawal (item 14; integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"impulsivity","description":"Caller-assigned Bush 1996 impulsivity (item 15; integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"automatic_obedience","description":"Caller-assigned Bush 1996 automatic obedience (item 16; integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"mitgehen","description":"Caller-assigned Bush 1996 mitgehen (item 17; 0 absent or 3 present only). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,3]},"example":"0"},{"in":"query","name":"gegenhalten","description":"Caller-assigned Bush 1996 gegenhalten (item 18; 0 absent or 3 present only). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,3]},"example":"0"},{"in":"query","name":"ambitendency","description":"Caller-assigned Bush 1996 ambitendency (item 19; 0 absent or 3 present only). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,3]},"example":"0"},{"in":"query","name":"grasp_reflex","description":"Caller-assigned Bush 1996 grasp reflex (item 20; 0 absent or 3 present only). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,3]},"example":"0"},{"in":"query","name":"perseveration","description":"Caller-assigned Bush 1996 perseveration (item 21; 0 absent or 3 present only). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,3]},"example":"0"},{"in":"query","name":"combativeness","description":"Caller-assigned Bush 1996 combativeness (item 22; integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"autonomic_abnormality","description":"Caller-assigned Bush 1996 autonomic abnormality (item 23; integer 0-3). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"}],"summary":"Bush-Francis","operationId":"get_api_calc_bush_francis","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, screen_positive, screen_signs_met, components, citation, disclaimer."},"400":{"description":"invalid_bush_francis: Bush-Francis needs the 1996 catatonia item integers in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bush-francis"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Bush-Francis (bulk)","operationId":"post_api_calc_bush_francis","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_bush_francis: Bush-Francis needs the 1996 catatonia item integers in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bush-francis"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ambitendency":"0","automatic_obedience":"0","autonomic_abnormality":"0","combativeness":"0","echopraxia_echolalia":"0","excitement":"1","gegenhalten":"0","grasp_reflex":"0","grimacing":"0","immobility_stupor":"1","impulsivity":"0","mannerisms":"0","mitgehen":"0","mutism":"0","negativism":"0","perseveration":"0","posturing_catalepsy":"0","rigidity":"0","staring":"0","stereotypy":"0","verbigeration":"0","waxy_flexibility":"0","withdrawal":"0"},{"ambitendency":"0","automatic_obedience":"0","autonomic_abnormality":"0","combativeness":"0","echopraxia_echolalia":"0","excitement":"1","gegenhalten":"0","grasp_reflex":"0","grimacing":"0","immobility_stupor":"1","impulsivity":"0","mannerisms":"0","mitgehen":"0","mutism":"0","negativism":"0","perseveration":"0","posturing_catalepsy":"0","rigidity":"0","staring":"0","stereotypy":"0","verbigeration":"0","waxy_flexibility":"0","withdrawal":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/parkland":{"get":{"description":"Compute adult Parkland 24-hour crystalloid volume from weight and percent TBSA, with half allotted to the first 8 hours from the time of burn.\n\nWhen an agent needs the adult Parkland 4 mL/kg/%TBSA 24-hour crystalloid split and must not invent a burn-fluid volume or apply modified Brooke (2 mL) or pediatric Galveston formulas.\n\nAdult 4 mL/kg/%TBSA Parkland crystalloid only. Does not implement modified Brooke (2 mL) or pediatric Galveston formulas.\n\nNot a treatment order or IV prescription. magent does not titrate to urine output or choose fluid type.\n\nThe first 8 hours are counted from the time of burn, not from arrival. This tool does not take elapsed time since injury. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"weight_kg","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"weight_lb","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"schema":{"type":"number"},"example":"154.3236"},{"in":"query","name":"tbsa_percent","description":"Percent total body surface area burned (1-100). 0 is invalid.","required":true,"schema":{"type":"number"},"example":"50"}],"summary":"Parkland formula","operationId":"get_api_calc_parkland","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, weight_kg, tbsa_percent, volume_24h_ml, first_8h_ml, remaining_16h_ml, citation, disclaimer."},"400":{"description":"invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_tbsa_percent: tbsa_percent must be a number from 1 to 100. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/parkland"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Parkland formula (bulk)","operationId":"post_api_calc_parkland","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_tbsa_percent: tbsa_percent must be a number from 1 to 100. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/parkland"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"tbsa_percent":"50","weight_kg":"70"},{"tbsa_percent":"50","weight_kg":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/denver-hiv":{"get":{"description":"Sum the published Haukoos 2012 Table 2 FULL pruned Denver HIV risk score from caller-assigned age, sex, ethnicity, independent sexual-practice flags, injection drug use, and past HIV testing, and return the derivation-cohort HIV prevalence band.\n\nWhen an agent already has those Haukoos 2012 Table 2 inputs as assigned by the caller and needs the published point total and derivation HIV prevalence band. Not a diagnosis, not an HIV test order, and not the abbreviated score that drops sexual-practice items.\n\nNot a medical device. Not a diagnosis of HIV infection and not an HIV test, PrEP, nPEP, or antiretroviral order.\n\nHaukoos 2012 Table 2 FULL pruned model only (age, sex, ethnicity, sex with a male, vaginal intercourse, receptive anal intercourse, injection drug use, past HIV testing). Range -14 to +81. Not the later abbreviated score that omits vaginal intercourse and receptive anal intercourse.\n\nethnicity is caller-assigned as black, hispanic, white, or other using the paper's terms (other: American Indian or Alaska Native, Native Hawaiian, or non-Hawaiian Pacific Islander). magent does not assign race or ethnicity.\n\nSexual-practice items are independent flags, not mutually exclusive partner-gender choices. Query ids: sm (sex with a male, +22), vi (vaginal intercourse, -10), rai (receptive anal intercourse, +8), idu (injection drug use, +9), pht (past HIV testing, -4). magent does not take a sexual history or a substance-use history.\n\nBand names and derivation HIV percents are from the results paragraph after Table 2 (<20 very_low 0.12%; 20-29 low 0.24%; 30-39 moderate 0.67%; 40-49 high 2.28%; >=50 very_high 5.66%). Validation-cohort percents from the abstract are not this response.\n\nAge is an integer 18-120 (invalid_age outside that range). Haukoos 2012 enrolled consecutive patients 13 years or older; ages 18-21 score 0 as published for <22. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120). Haukoos 2012 Table 2: <22 or >60 scores 0; 22-25 or 55-60 scores 4; 26-32 or 47-54 scores 10; 33-46 scores 12. Caller-assigned.","required":true,"schema":{"type":"integer"},"example":20},{"in":"query","name":"sex","description":"female or male as assigned by the caller (Haukoos 2012 Table 2 gender). female scores 0; male scores 21.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"ethnicity","description":"Caller-assigned ethnicity as used in Haukoos 2012 Table 2 (not param race). black scores 9; hispanic scores 3; white scores 0; other scores 0 (paper: American Indian or Alaska Native, Native Hawaiian, or non-Hawaiian Pacific Islander). magent does not assign race or ethnicity.","required":true,"schema":{"type":"string","enum":["black","hispanic","white","other"]},"example":"white"},{"in":"query","name":"sm","description":"Haukoos 2012 Table 2 item sm. Caller-assigned boolean. +22 if true. Magent docs map this to the paper's sex-with-a-male coefficient; magent does not take a sexual history.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"vi","description":"Haukoos 2012 Table 2 item vi. Caller-assigned boolean. -10 if true. Do not drop this item. Magent docs map this to the paper's vaginal-intercourse coefficient.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"rai","description":"Haukoos 2012 Table 2 item rai. Caller-assigned boolean. +8 if true. Do not drop this item. Magent docs map this to the paper's receptive-anal-intercourse coefficient.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"idu","description":"Haukoos 2012 Table 2 item idu. Caller-assigned boolean. +9 if true. Magent docs map this to the paper's injection-drug-use coefficient.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"pht","description":"Haukoos 2012 Table 2 item pht. Caller-assigned boolean. -4 if true. Magent docs map this to the paper's past-HIV-testing coefficient.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"Denver HIV","operationId":"get_api_calc_denver_hiv","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, min_score, max_score, band, derivation_hiv_percent, age_years, sex, ethnicity, sm, vi, rai, idu, pht, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_denver_hiv: Denver HIV score inputs must match Haukoos 2012 Table 2 age band, sex, ethnicity, sexual-practice flags, IDU, and prior testing. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/denver-hiv"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Denver HIV (bulk)","operationId":"post_api_calc_denver_hiv","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_denver_hiv: Denver HIV score inputs must match Haukoos 2012 Table 2 age band, sex, ethnicity, sexual-practice flags, IDU, and prior testing. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/denver-hiv"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"20","ethnicity":"white","idu":"false","pht":"false","rai":"false","sex":"female","sm":"false","vi":"false"},{"age":"20","ethnicity":"white","idu":"false","pht":"false","rai":"false","sex":"female","sm":"false","vi":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/paradise":{"get":{"description":"Apply the Paradise 1984 eligibility frequency for recurrent throat infection and return whether paradise_criteria holds (frequency met and qualifying episode features).\n\nWhen an agent already has caller-assigned Paradise 1984 frequency flags and whether counting episodes had the trial's published qualifying features, and needs whether the published eligibility box holds. magent does not examine the patient or count episodes.\n\nNot a medical device.\n\nNot a tonsillectomy order. magent does not decide whether to operate.\n\nThe caller assigns frequency flags and qualifying episode features. magent does not examine the patient or count episodes.\n\nParadise 1984 eligibility frequency only. Not AAO-HNS 2019 as a separate guideline tool. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ge_7_episodes_preceding_year","description":"Seven or more episodes of throat infection in the preceding year (Paradise 1984). true or false as assigned by the caller. magent does not count episodes.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"ge_5_episodes_each_of_2_years","description":"Five or more episodes in each of the preceding two years (Paradise 1984). true or false as assigned by the caller. magent does not count episodes.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ge_3_episodes_each_of_3_years","description":"Three or more episodes in each of the preceding three years (Paradise 1984). true or false as assigned by the caller. magent does not count episodes.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"qualifying_episode_features","description":"Caller assigns that counting episodes had the trial's published features: fever >38.3 C, or cervical adenopathy, or tonsillar exudate, or culture positive for group A beta-hemolytic streptococcus (Paradise 1984). true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Paradise","operationId":"get_api_calc_paradise","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, frequency_met, paradise_criteria, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/paradise"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Paradise (bulk)","operationId":"post_api_calc_paradise","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/paradise"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ge_3_episodes_each_of_3_years":"false","ge_5_episodes_each_of_2_years":"false","ge_7_episodes_preceding_year":"true","qualifying_episode_features":"true"},{"ge_3_episodes_each_of_3_years":"false","ge_5_episodes_each_of_2_years":"false","ge_7_episodes_preceding_year":"true","qualifying_episode_features":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/sedan":{"get":{"description":"Compute the Strbian 2012 SEDAN score (Sugar, Early infarct signs, (hyper)Dense artery, Age, NIHSS) for symptomatic intracranial hemorrhage after stroke thrombolysis.\n\nWhen an agent has caller-assigned admission glucose, CT early infarct signs, hyperdense artery sign, age, and NIHSS and needs the published SEDAN total and derivation sICH percents for scores 0-5, without inventing a percent for score 6 or a tPA decision.\n\nNot a medical device and not a tPA withhold, thrombolysis, or treatment decision.\n\nDerived in intravenous thrombolysis cohorts (Strbian 2012). It is not a recommendation for or against alteplase.\n\nThe caller assigns NIHSS (0-42), early infarct signs, and hyperdense cerebral artery sign. magent does not examine the patient, assign NIHSS, or read CT.\n\nGlucose uses mmol/L cutoffs after converting mg/dL / 18. 8.1-12.0 inclusive scores 1; >12.0 scores 2; 8.0 and 12.0 follow those bounds.\n\nDerivation absolute sICH percents are returned for scores 0-5 only (1.4, 2.9, 8.5, 12.2, 21.7, 33.3). Score 6 has no published percent in Strbian 2012; magent does not invent one. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). >75 scores 1; 75 does not (Strbian 2012). magent does not date the patient.","required":true,"schema":{"type":"integer"},"example":"60"},{"in":"query","name":"nihss","description":"Caller-assigned NIH Stroke Scale total (integer 0-42). ≥10 scores 1; 9 does not. magent does not compute NIHSS or examine the patient.","required":true,"schema":{"type":"integer"},"example":"5"},{"in":"query","name":"glucose_mmol_l","description":"Baseline glucose in mmol/L (2.8-55.5). Provide this or glucose_mg_dl, not both. 8.1-12.0 inclusive scores 1; >12.0 scores 2; else 0 (Strbian 2012).","required":false,"schema":{"type":"number"},"example":"6.0"},{"in":"query","name":"glucose_mg_dl","description":"Baseline glucose in mg/dL (50-1000). Converted as mmol/L = mg/dL / 18. Provide this or glucose_mmol_l, not both.","required":false,"schema":{"type":"number"},"example":"108"},{"in":"query","name":"early_infarct_signs","description":"Early infarct signs on admission CT as assigned by the caller (Strbian 2012). true scores 1; false scores 0. magent does not read the CT.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hyperdense_artery","description":"(Hyper)dense cerebral artery sign on admission CT as assigned by the caller (Strbian 2012). true scores 1; false scores 0. magent does not read the CT.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"SEDAN","operationId":"get_api_calc_sedan","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, sich_percent, age_years, nihss, glucose_mmol_l, early_infarct_signs, hyperdense_artery, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_nihss: nihss must be an integer from 0 to 42. Returned before settlement; you are not charged.; invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sedan"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SEDAN (bulk)","operationId":"post_api_calc_sedan","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_nihss: nihss must be an integer from 0 to 42. Returned before settlement; you are not charged.; invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sedan"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"60","early_infarct_signs":"false","glucose_mmol_l":"6.0","hyperdense_artery":"false","nihss":"5"},{"age":"60","early_infarct_signs":"false","glucose_mmol_l":"6.0","hyperdense_artery":"false","nihss":"5"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/abc-score":{"get":{"description":"Sum the four Nunez 2009 ABC (assessment of blood consumption) arrival factors and return score_ge_2 at the published ≥2 cutoff.\n\nWhen an agent needs the published Nunez 2009 ABC point total and the ≥2 cutoff flag and must not invent an MTP activation or transfusion order.\n\nNot a medical device and not a massive-transfusion protocol (MTP) or transfusion order. magent does not decide whether to activate MTP.\n\nABC ≥2 was 75% sensitive and 86% specific for massive transfusion in Nunez 2009; score_ge_2 is that published classification cutoff, not an order.\n\nPenetrating mechanism and positive FAST are caller-assigned. magent does not interpret FAST images or assign injury mechanism.\n\nThis is Nunez 2009 ABC only. It is not TASH, not ABC/2 ICH volume, and not a blood-product volume estimate. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"penetrating","description":"Penetrating injury mechanism as assigned by the caller (Nunez 2009). true or false. magent does not assign mechanism.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"systolic_mm_hg","description":"Arrival systolic blood pressure in mm Hg (integer 0-300). ≤90 scores 1.","required":true,"schema":{"type":"integer"},"example":"120"},{"in":"query","name":"heart_rate_bpm","description":"Arrival heart rate in beats per minute (integer 30-220). ≥120 scores 1.","required":true,"schema":{"type":"integer"},"example":"80"},{"in":"query","name":"positive_fast","description":"Positive FAST as assigned by the caller (Nunez 2009). true or false. magent does not interpret FAST images.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"ABC score","operationId":"get_api_calc_abc_score","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, score_ge_2, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_rts_systolic: systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/abc-score"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ABC score (bulk)","operationId":"post_api_calc_abc_score","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_rts_systolic: systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/abc-score"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"heart_rate_bpm":"80","penetrating":"false","positive_fast":"false","systolic_mm_hg":"120"},{"heart_rate_bpm":"80","penetrating":"false","positive_fast":"false","systolic_mm_hg":"120"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/phases":{"get":{"description":"Sum Greving 2014 PHASES points (population, hypertension, age, size, earlier SAH, site; max 22) and return the published grouped 5-year rupture risk percent.\n\nWhen an agent already has caller-assigned PHASES factors for an unruptured intracranial aneurysm and needs the published 5-year rupture-risk percent, not a treatment order or PHASES of care.\n\nNot a medical device, not a diagnosis of rupture, and not a treatment, clipping, or coiling order.\n\nNot PHASES of care. Geographic population is caller-assigned (north_america_europe, japanese, or finnish as in Greving 2014). magent does not assign ancestry.\n\nSize bands and site groups follow Greving 2014 only (ica 0; mca 2; aca_pcom_posterior 4). magent does not read imaging.\n\nfive_year_rupture_risk_percent is the paper's grouped table (score ≤2 → 0.4%; 3 → 0.7%; 4 → 0.9%; 5 → 1.3%; 6 → 1.7%; 7 → 2.4%; 8 → 3.2%; 9 → 4.3%; 10 → 5.3%; 11 → 7.2%; ≥12 → 17.8%). Scores 0 and 1 use the ≤2 row. The paper does not split ≥12 further. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"population","description":"Caller-assigned Greving 2014 geographic study population: north_america_europe (0; North America and Europe other than Finland), japanese (3), or finnish (5). magent does not assign ancestry.","required":true,"schema":{"type":"string"},"example":"north_america_europe"},{"in":"query","name":"hypertension","description":"Caller-assigned history of hypertension (Greving 2014). true scores 1. magent does not take a blood-pressure reading.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"age","description":"Age in years (integer 18-120). <70 scores 0; ≥70 scores 1 (Greving 2014).","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"aneurysm_mm","description":"Caller-assigned maximum aneurysm diameter in millimetres (1.0-50.0). <7.0 scores 0; 7.0-9.9 scores 3; 10.0-19.9 scores 6; ≥20.0 scores 10. magent does not read imaging.","required":true,"schema":{"type":"number"},"example":"5"},{"in":"query","name":"earlier_sah","description":"Earlier subarachnoid hemorrhage from another aneurysm (Greving 2014). true scores 1. Not a diagnosis of current rupture.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"site","description":"Caller-assigned aneurysm site as grouped in Greving 2014: ica (0), mca (2), or aca_pcom_posterior (4; anterior cerebral, anterior communicating, posterior communicating, or posterior circulation). magent does not read imaging.","required":true,"schema":{"type":"string"},"example":"ica"}],"summary":"PHASES","operationId":"get_api_calc_phases","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, five_year_rupture_risk_percent, population, age_years, aneurysm_mm, site, components, citation, disclaimer."},"400":{"description":"invalid_phases_population: population must be north_america_europe, japanese, or finnish (Greving 2014 PHASES). Returned before settlement; you are not charged.; invalid_phases_size: aneurysm_mm must be a number from 1.0 to 50.0 (Greving 2014 PHASES). Returned before settlement; you are not charged.; invalid_phases_site: site must be ica, mca, or aca_pcom_posterior (Greving 2014 PHASES). Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/phases"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PHASES (bulk)","operationId":"post_api_calc_phases","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_phases_population: population must be north_america_europe, japanese, or finnish (Greving 2014 PHASES). Returned before settlement; you are not charged.; invalid_phases_size: aneurysm_mm must be a number from 1.0 to 50.0 (Greving 2014 PHASES). Returned before settlement; you are not charged.; invalid_phases_site: site must be ica, mca, or aca_pcom_posterior (Greving 2014 PHASES). Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/phases"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","aneurysm_mm":"5","earlier_sah":"false","hypertension":"false","population":"north_america_europe","site":"ica"},{"age":"50","aneurysm_mm":"5","earlier_sah":"false","hypertension":"false","population":"north_america_europe","site":"ica"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/free-water-deficit":{"get":{"description":"Estimate free water deficit from weight, sex-specific TBW, and measured serum Na versus a chosen target.\n\nWhen an agent needs Adrogué–Madias hypernatremia deficit arithmetic and must not invent TBW or a replacement volume.\n\nNot a treatment order and not an infusion protocol. The result is an estimate of free water deficit versus a target sodium, not a dosing or correction-rate order.\n\nSex-only TBW fractions (0.6 male, 0.5 female); no extra elderly coefficient. Does not model ongoing losses or the safe rate of correction. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"weight_kg","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"weight_lb","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"schema":{"type":"number"},"example":"154.3236"},{"in":"query","name":"sex","description":"Sex used for TBW: 0.6 × weight (male) or 0.5 × weight (female).","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"sodium_mmol_l","description":"Measured serum sodium in mmol/L. Range 146-190 (hypernatremia).","required":true,"schema":{"type":"number"},"example":"160"},{"in":"query","name":"desired_na_mmol_l","description":"Target serum sodium in mmol/L (130-145), must be less than measured Na. Omitted uses 140.","required":false,"schema":{"type":"number"},"example":"140"}],"summary":"Free water deficit","operationId":"get_api_calc_free_water_deficit","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, weight_kg, sex, tbw_l, sodium_mmol_l, desired_na_mmol_l, free_water_deficit_l, citation, disclaimer."},"400":{"description":"invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_hypernatremia_sodium: sodium_mmol_l must be a number from 146 to 190 (hypernatremia). Returned before settlement; you are not charged.; invalid_hypernatremia_desired_sodium: desired_na_mmol_l must be a number from 130 to 145 less than sodium_mmol_l. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/free-water-deficit"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Free water deficit (bulk)","operationId":"post_api_calc_free_water_deficit","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_hypernatremia_sodium: sodium_mmol_l must be a number from 146 to 190 (hypernatremia). Returned before settlement; you are not charged.; invalid_hypernatremia_desired_sodium: desired_na_mmol_l must be a number from 130 to 145 less than sodium_mmol_l. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/free-water-deficit"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"desired_na_mmol_l":"140","sex":"male","sodium_mmol_l":"160","weight_kg":"70"},{"desired_na_mmol_l":"140","sex":"male","sodium_mmol_l":"160","weight_kg":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/psi-port":{"get":{"description":"Compute the Fine 1997 Pneumonia Severity Index (PORT) two-step risk class and Table 2 point total for community-acquired pneumonia.\n\nWhen an agent needs the published Fine 1997 PSI/PORT two-step class and Table 2 total and must not invent bands or skip Step 1.\n\nNot a medical device and not a site-of-care, admission, or treatment protocol.\n\nFine 1997 two-step rule only. Class I is assigned from Step 1 even when Table 2 points would map to class II–V. The Table 2 total is always returned.\n\nGlucose is mg/dL only (Fine Table 2). magent does not convert mmol/L.\n\nThe caller assigns comorbidities, mental status, nursing-home status, and pleural effusion. magent does not examine the patient.\n\nNot CURB-65 or CRB-65. Those are separate tools. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Table 2: men add the age integer; women add age − 10. Step 1 Class I requires age ≤50 (Fine: 50 years of age or younger).","required":true,"schema":{"type":"integer"},"example":"45"},{"in":"query","name":"sex","description":"Sex (female or male). Women subtract 10 from the age points.","required":true,"schema":{"type":"string"},"example":"male"},{"in":"query","name":"nursing_home","description":"Nursing home resident as assigned by the caller. true or false. Table 2 +10 if true. Not a Step 1 Class I item.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"neoplastic","description":"Neoplastic disease as assigned by the caller. true or false. Step 1 excludes Class I if true. Table 2 +30 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"liver_disease","description":"Liver disease as assigned by the caller. true or false. Step 1 excludes Class I if true. Table 2 +20 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"chf","description":"Congestive heart failure as assigned by the caller. true or false. Step 1 excludes Class I if true. Table 2 +10 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cerebrovascular","description":"Cerebrovascular disease as assigned by the caller. true or false. Step 1 excludes Class I if true. Table 2 +10 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"renal_disease","description":"Renal disease as assigned by the caller. true or false. Step 1 excludes Class I if true. Table 2 +10 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"altered_mental_status","description":"Altered mental status as assigned by the caller. true or false. Step 1 excludes Class I if true. Table 2 +20 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats per minute (integer 30-220). Step 1 Class I requires <125. Table 2 +10 when ≥125; 124 does not score.","required":true,"schema":{"type":"integer"},"example":"80"},{"in":"query","name":"respiratory_rate","description":"Respiratory rate in breaths/min (integer 4-80). Step 1 Class I requires <30. Table 2 +20 when ≥30; 29 does not score.","required":true,"schema":{"type":"integer"},"example":"16"},{"in":"query","name":"systolic_mm_hg","description":"Systolic blood pressure in mm Hg (50-250). Step 1 Class I requires ≥90. Table 2 +20 when <90; 90 does not score.","required":true,"schema":{"type":"number"},"example":"120"},{"in":"query","name":"temperature_c","description":"Temperature in °C (30-45). Step 1 Class I requires ≥35 and <40. Table 2 +15 when <35 or ≥40; 35.0 and 39.9 do not score.","required":true,"schema":{"type":"number"},"example":"37.0"},{"in":"query","name":"arterial_ph","description":"Arterial pH (6.80-7.80). Table 2 +30 when <7.35; 7.35 does not score. Not a Step 1 Class I item.","required":true,"schema":{"type":"number"},"example":"7.40"},{"in":"query","name":"bun_mg_dl","description":"Blood urea nitrogen in mg/dL (1-200). Table 2 +20 when ≥30; 29.9 does not score. Not a Step 1 Class I item.","required":true,"schema":{"type":"number"},"example":"14"},{"in":"query","name":"sodium_mmol_l","description":"Serum sodium in mmol/L (110-160). Table 2 +20 when <130; 130 does not score. Not a Step 1 Class I item.","required":true,"schema":{"type":"number"},"example":"140"},{"in":"query","name":"glucose_mg_dl","description":"Serum glucose in mg/dL (50-1000). Fine Table 2 is mg/dL only. Table 2 +10 when ≥250; 249 does not score. Not a Step 1 Class I item.","required":true,"schema":{"type":"number"},"example":"90"},{"in":"query","name":"hematocrit_percent","description":"Hematocrit percent (10-70). Table 2 +10 when <30; 30 does not score. Not a Step 1 Class I item.","required":true,"schema":{"type":"number"},"example":"42"},{"in":"query","name":"pao2_mm_hg","description":"Arterial PaO2 in mm Hg (20-700). Table 2 +10 when <60; 60 does not score. Not a Step 1 Class I item.","required":true,"schema":{"type":"number"},"example":"90"},{"in":"query","name":"pleural_effusion","description":"Pleural effusion as assigned by the caller. true or false. Table 2 +10 if true. Not a Step 1 Class I item.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"PSI / PORT","operationId":"get_api_calc_psi_port","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, risk_class, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_respiratory_rate: respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.; invalid_temperature: temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_arterial_ph: arterial_ph must be a number from 6.80 to 7.80. Returned before settlement; you are not charged.; invalid_bun: bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.; invalid_sodium: sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.; invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_hematocrit: hematocrit_percent must be a number from 10 to 70. Returned before settlement; you are not charged.; invalid_pao2: pao2_mm_hg must be a number from 20 to 700. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/psi-port"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PSI / PORT (bulk)","operationId":"post_api_calc_psi_port","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_respiratory_rate: respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.; invalid_temperature: temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_arterial_ph: arterial_ph must be a number from 6.80 to 7.80. Returned before settlement; you are not charged.; invalid_bun: bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.; invalid_sodium: sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.; invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_hematocrit: hematocrit_percent must be a number from 10 to 70. Returned before settlement; you are not charged.; invalid_pao2: pao2_mm_hg must be a number from 20 to 700. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/psi-port"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"45","altered_mental_status":"false","arterial_ph":"7.40","bun_mg_dl":"14","cerebrovascular":"false","chf":"false","glucose_mg_dl":"90","heart_rate_bpm":"80","hematocrit_percent":"42","liver_disease":"false","neoplastic":"false","nursing_home":"false","pao2_mm_hg":"90","pleural_effusion":"false","renal_disease":"false","respiratory_rate":"16","sex":"male","sodium_mmol_l":"140","systolic_mm_hg":"120","temperature_c":"37.0"},{"age":"45","altered_mental_status":"false","arterial_ph":"7.40","bun_mg_dl":"14","cerebrovascular":"false","chf":"false","glucose_mg_dl":"90","heart_rate_bpm":"80","hematocrit_percent":"42","liver_disease":"false","neoplastic":"false","nursing_home":"false","pao2_mm_hg":"90","pleural_effusion":"false","renal_disease":"false","respiratory_rate":"16","sex":"male","sodium_mmol_l":"140","systolic_mm_hg":"120","temperature_c":"37.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/phoenix-sepsis":{"get":{"description":"Sum four caller-assigned Schlapbach 2024 Phoenix Sepsis Score organ integers and return sepsis (suspected infection and score ≥2) and septic shock (sepsis with cardiovascular ≥1).\n\nWhen an agent has already assigned Schlapbach 2024 Phoenix table organ integers (not raw labs, P/F, MAP-for-age, or GCS) and needs the published four-organ total with sepsis and septic-shock flags, not adult SOFA and not 2005 Goldstein SIRS sepsis.\n\nNot a medical device. Not a diagnosis of sepsis or septic shock and not an antimicrobial or ICU-admission order.\n\nSchlapbach 2024 Phoenix Sepsis Score (four organs) only. Not Phoenix-8 (endocrine, immunologic, renal, hepatic). Not adult SOFA. Not 2005 Goldstein IPSCC SIRS sepsis. The former term severe sepsis is not used.\n\nCriteria apply to children <18 years with suspected infection. They do not apply to birth hospitalizations, children with post-conceptional age <37 weeks, or age ≥18 years. magent does not take age.\n\nmagent does not interpret raw labs, P/F, S/F, MAP-for-age, vasoactive counts, or GCS; the caller assigns the four published organ integers. Unmeasured variables contribute 0 in the paper; this tool still requires all four integers. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"respiratory","description":"Caller-assigned Schlapbach 2024 Phoenix table respiratory integer 0-3. 0: PaO2/FiO2 ≥400 or SpO2/FiO2 ≥292. 1: PaO2/FiO2 <400 or SpO2/FiO2 <292 on any respiratory support. 2: PaO2/FiO2 100-200 and IMV, or SpO2/FiO2 148-220 and IMV. 3: PaO2/FiO2 <100 and IMV, or SpO2/FiO2 <148 and IMV. magent does not take PaO2, SpO2, FiO2, or ventilation.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"cardiovascular","description":"Caller-assigned Schlapbach 2024 Phoenix table cardiovascular integer 0-6: sum of vasoactives 0-2 (none / 1 / ≥2 of epinephrine, norepinephrine, dopamine, dobutamine, milrinone, vasopressin) + lactate 0-2 (<5 / 5-10.9 / ≥11 mmol/L) + age-adjusted MAP 0-2. magent does not take vasoactive counts, lactate, MAP, or age.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"coagulation","description":"Caller-assigned Schlapbach 2024 Phoenix table coagulation integer 0-2. 1 each for platelets <100 K/μL, INR >1.3, D-dimer >2 mg/L FEU, fibrinogen <100 mg/dL, capped at 2. magent does not take those labs.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"neurologic","description":"Caller-assigned Schlapbach 2024 Phoenix table neurologic integer 0-2. GCS ≤10 scores 1; bilaterally fixed pupils scores 2. magent does not take GCS or pupil exam.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"suspected_infection","description":"Suspected or confirmed infection as assigned by the caller (Schlapbach 2024). Sepsis requires this true and Phoenix Sepsis Score ≥2. true or false.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Phoenix Sepsis Score","operationId":"get_api_calc_phoenix_sepsis","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, phoenix_sepsis_score, sepsis, septic_shock, category, suspected_infection, respiratory, cardiovascular, coagulation, neurologic, components, citation, disclaimer."},"400":{"description":"invalid_phoenix_organ: respiratory must be 0-3, cardiovascular 0-6, coagulation 0-2, and neurologic 0-2 (Schlapbach 2024 Phoenix table). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/phoenix-sepsis"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Phoenix Sepsis Score (bulk)","operationId":"post_api_calc_phoenix_sepsis","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_phoenix_organ: respiratory must be 0-3, cardiovascular 0-6, coagulation 0-2, and neurologic 0-2 (Schlapbach 2024 Phoenix table). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/phoenix-sepsis"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"cardiovascular":"0","coagulation":"0","neurologic":"0","respiratory":"0","suspected_infection":"true"},{"cardiovascular":"0","coagulation":"0","neurologic":"0","respiratory":"0","suspected_infection":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/bode":{"get":{"description":"Sum Celli 2004 BODE points from BMI, FEV1 percent predicted, MMRC dyspnea, and 6-minute walk distance.\n\nWhen an agent needs the published Celli 2004 BODE total and quartile and must not invent a GOLD stage or listing decision.\n\nNot a GOLD COPD stage and not a transplant listing protocol. Quartiles follow Celli 2004 (0-2 / 3-4 / 5-6 / 7-10).\n\nBMI is caller-supplied kg/m^2. magent does not compute BMI from height and weight.\n\nMMRC is the caller-assigned modified Medical Research Council grade 0-4. magent does not interview the patient. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"bmi_kg_m2","description":"Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI from height and weight. Celli 2004: >21 scores 0; <=21 scores 1.","required":true,"schema":{"type":"number"},"example":"24"},{"in":"query","name":"fev1_percent_predicted","description":"FEV1 percent predicted (10-150). Celli 2004 Table 2: >=65 scores 0; 50-64 scores 1; 36-49 scores 2; <=35 scores 3.","required":true,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"mmrc","description":"Modified Medical Research Council dyspnea grade as an integer 0-4 (Celli 2004). 0-1 scores 0; 2 scores 1; 3 scores 2; 4 scores 3. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"six_minute_walk_m","description":"Six-minute walk distance in meters (0-1000). Celli 2004 Table 2: >=350 scores 0; 250-349 scores 1; 150-249 scores 2; <=149 scores 3.","required":true,"schema":{"type":"number"},"example":"400"}],"summary":"BODE","operationId":"get_api_calc_bode","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, quartile, bmi_kg_m2, fev1_percent_predicted, mmrc, six_minute_walk_m, components, citation, disclaimer."},"400":{"description":"invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_fev1_percent: fev1_percent_predicted must be a number from 10 to 150. Returned before settlement; you are not charged.; invalid_mmrc: mmrc must be an integer from 0 to 4. Returned before settlement; you are not charged.; invalid_six_minute_walk_m: six_minute_walk_m must be a number from 0 to 1000. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bode"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"BODE (bulk)","operationId":"post_api_calc_bode","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_fev1_percent: fev1_percent_predicted must be a number from 10 to 150. Returned before settlement; you are not charged.; invalid_mmrc: mmrc must be an integer from 0 to 4. Returned before settlement; you are not charged.; invalid_six_minute_walk_m: six_minute_walk_m must be a number from 0 to 1000. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bode"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bmi_kg_m2":"24","fev1_percent_predicted":"70","mmrc":"0","six_minute_walk_m":"400"},{"bmi_kg_m2":"24","fev1_percent_predicted":"70","mmrc":"0","six_minute_walk_m":"400"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/oesil":{"get":{"description":"Compute the Osservatorio Epidemiologico sulla Sincope nel Lazio (OESIL) risk score as the Colivicchi 2003 arithmetic sum of four predictors: age >65 years, history of cardiovascular disease, syncope without prodromes, and abnormal ECG.\n\nWhen an agent needs the published OESIL point total from caller-assigned flags and must not invent a syncope history, read an ECG, or treat derivation-cohort mortality as an individual prediction.\n\nNot a medical device. Not a disposition protocol, admission order, or syncope diagnosis.\n\nAge 18-120 is an implementation clamp; Colivicchi 2003 scored age >65 (age 65 is 0 points). magent does not apply a high-risk cutoff from later papers.\n\nThe 12-month mortality percents reported in the derivation cohort (0%, 0.8%, 19.6%, 34.7%, 57.1% for scores 0-4) are cohort observations, not this patient's predicted risk, and are not returned on the JSON.\n\nThe caller assigns cardiovascular_disease, syncope_without_prodromes, and abnormal_ecg. magent does not take a history or read an ECG. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Age >65 scores 1; age 65 scores 0. 18 is an implementation clamp.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"cardiovascular_disease","description":"History of cardiovascular disease (Colivicchi 2003, 1 point). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"syncope_without_prodromes","description":"Syncope without prodromes (Colivicchi 2003, 1 point). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"abnormal_ecg","description":"Abnormal ECG (Colivicchi 2003, 1 point). true or false as assigned by the caller. magent does not read an ECG.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"OESIL","operationId":"get_api_calc_oesil","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/oesil"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"OESIL (bulk)","operationId":"post_api_calc_oesil","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/oesil"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"abnormal_ecg":"false","age":"50","cardiovascular_disease":"false","syncope_without_prodromes":"false"},{"abnormal_ecg":"false","age":"50","cardiovascular_disease":"false","syncope_without_prodromes":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/miller-esr":{"get":{"description":"Compute the Miller 1983 adult maximum normal erythrocyte sedimentation rate in mm/h from age and sex. Men: age/2. Women: (age + 10)/2. Returns the threshold only.\n\nWhen an agent needs the published adult maximum normal ESR and must not invent a measured-ESR comparison, CRP, or an elevated/normal diagnosis.\n\nNot a medical device. Not a diagnosis of inflammation, infection, or vasculitis.\n\nmagent does not measure ESR. This tool returns only the Miller 1983 maximum normal threshold (mm/h), not a comparison to a laboratory value.\n\nMiller 1983 is age and sex only. Does not apply Wener 2000 CRP, pediatric ESR, or later population-specific cutoffs. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 20-90). Miller 1983 adult range.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"sex","description":"Sex for the published rule (female or male).","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"}],"summary":"Miller ESR","operationId":"get_api_calc_miller_esr","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age, sex, max_normal_esr, citation, disclaimer."},"400":{"description":"invalid_miller_age: age must be an integer from 20 to 90 (Miller 1983 adult ESR rule). Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/miller-esr"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Miller ESR (bulk)","operationId":"post_api_calc_miller_esr","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_miller_age: age must be an integer from 20 to 90 (Miller 1983 adult ESR rule). Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/miller-esr"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","sex":"male"},{"age":"40","sex":"male"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/gmaws":{"get":{"description":"Sum five caller-assigned McPherson 2012 GMAWS integers (0-2) and return the published total (max 10) and Figure 1 score-group band.\n\nWhen an agent has already assigned McPherson 2012 Figure 1 item integers (tremor, sweating, hallucination, orientation, agitation) and needs the published GMAWS total and score-group band, not a benzodiazepine or treatment order.\n\nNot a medical device and not a benzodiazepine, symptom-triggered, or treatment order.\n\nEach of the five items is a caller-assigned integer 0, 1, or 2 from McPherson 2012 Figure 1. magent does not observe the patient.\n\nTemperature is not an item. McPherson 2012 studied temperature then removed it from the post-temperature GMAWS used here.\n\nReturned bands are McPherson 2012 Figure 1 score groups (zero, 1_to_3, 4_to_8, 9_to_10), not diazepam or chlordiazepoxide treatment orders. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"tremor","description":"Caller-assigned McPherson 2012 Figure 1 tremor (integer 0-2): 0 no tremor; 1 on movement; 2 at rest. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"sweating","description":"Caller-assigned McPherson 2012 Figure 1 sweating (integer 0-2): 0 no sweat visible; 1 moist; 2 drenching sweats. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"hallucination","description":"Caller-assigned McPherson 2012 Figure 1 hallucination (integer 0-2): 0 not present; 1 dissuadable; 2 not dissuadable. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"orientation","description":"Caller-assigned McPherson 2012 Figure 1 orientation (integer 0-2): 0 orientated; 1 vague/detached; 2 disorientated, no contact. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"agitation","description":"Caller-assigned McPherson 2012 Figure 1 agitation (integer 0-2): 0 calm; 1 anxious; 2 panicky. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"GMAWS","operationId":"get_api_calc_gmaws","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, gmaws_band, components, citation, disclaimer."},"400":{"description":"invalid_gmaws: tremor, sweating, hallucination, orientation, and agitation must each be an integer 0, 1, or 2 (McPherson 2012 GMAWS Figure 1). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gmaws"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"GMAWS (bulk)","operationId":"post_api_calc_gmaws","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_gmaws: tremor, sweating, hallucination, orientation, and agitation must each be an integer 0, 1, or 2 (McPherson 2012 GMAWS Figure 1). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gmaws"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"agitation":"0","hallucination":"0","orientation":"0","sweating":"0","tremor":"0"},{"agitation":"0","hallucination":"0","orientation":"0","sweating":"0","tremor":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/orbit":{"get":{"description":"Compute the O'Brien 2015 ORBIT bleeding score from age and caller-assigned anemia, bleeding history, insufficient kidney, and antiplatelet flags.\n\nWhen an agent needs the published ORBIT AF bleeding-risk arithmetic (not HAS-BLED) and must not invent the point total from prose.\n\nNot a diagnosis. magent does not diagnose bleeding or atrial fibrillation.\n\nNot HAS-BLED. This tool is the O'Brien 2015 ORBIT bleeding score only.\n\nNot a treatment or anticoagulation recommendation.\n\nmagent does not take hemoglobin or compute eGFR. Anemia and insufficient kidney (paper eGFR <60) are caller flags. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). ≥75 scores 1 (75 scores; 74 does not).","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"anemia","description":"Anemia as assigned by the caller. true or false. Scores 2. magent does not take hemoglobin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bleeding_history","description":"Bleeding history as assigned by the caller. true or false. Scores 2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"insufficient_kidney","description":"Insufficient kidney function as assigned by the caller (paper eGFR <60). true or false. Scores 1. magent does not compute eGFR.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"antiplatelet","description":"Antiplatelet therapy as assigned by the caller. true or false. Scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"ORBIT bleeding score","operationId":"get_api_calc_orbit","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, orbit_risk, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/orbit"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ORBIT bleeding score (bulk)","operationId":"post_api_calc_orbit","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/orbit"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"70","anemia":"false","antiplatelet":"false","bleeding_history":"false","insufficient_kidney":"false"},{"age":"70","anemia":"false","antiplatelet":"false","bleeding_history":"false","insufficient_kidney":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/sipa":{"get":{"description":"Compute Acker 2015 SIPA as heart rate in bpm divided by cuff systolic pressure in mm Hg, then compare the ratio with the published age-band cutoff.\n\nWhen an agent has caller-assigned age (4-16 years), heart rate, and systolic pressure and needs the published pediatric age-adjusted shock-index ratio and elevated flag.\n\nNot a diagnosis of shock and not a medical device. magent does not measure heart rate or blood pressure; the caller assigns the numbers.\n\nNot the adult shock-index cutoff of greater than 0.9. Acker 2015 SIPA uses age-adjusted cutoffs: greater than 1.22 (ages 4-6), greater than 1.0 (ages 7-12), and greater than 0.9 (ages 13-16).\n\nDo not apply SIPA to infants or to adults 17 years and older. The published cohort is ages 4-16 inclusive. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 4-16). Acker 2015 SIPA cohort only. Ages 4-6 use cutoff 1.22, 7-12 use 1.0, and 13-16 use 0.9. Not for infants or adults 17 and older.","required":true,"schema":{"type":"integer"},"example":"10"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats per minute (integer 30-220). magent does not measure vitals; the caller assigns the number.","required":true,"schema":{"type":"integer"},"example":"80"},{"in":"query","name":"systolic_mm_hg","description":"Cuff systolic blood pressure in mm Hg (50-250). magent does not measure vitals.","required":true,"schema":{"type":"number"},"example":"100"}],"summary":"SIPA","operationId":"get_api_calc_sipa","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age, heart_rate_bpm, systolic_mm_hg, sipa, cutoff, elevated, criteria, citation, disclaimer."},"400":{"description":"invalid_sipa_age: age must be an integer from 4 to 16 (Acker 2015 SIPA cohort). Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sipa"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SIPA (bulk)","operationId":"post_api_calc_sipa","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_sipa_age: age must be an integer from 4 to 16 (Acker 2015 SIPA cohort). Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sipa"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"10","heart_rate_bpm":"80","systolic_mm_hg":"100"},{"age":"10","heart_rate_bpm":"80","systolic_mm_hg":"100"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/hunt-hess":{"get":{"description":"Return the Hunt and Hess 1968 subarachnoid-hemorrhage surgical-risk grade from a caller-assigned grade 1-5, applying the paper's next-less-favorable bump when serious systemic disease is present.\n\nWhen an agent needs the 1968 Hunt and Hess grade (including the systemic-disease increment) and must not invent WFNS, grade 0, or grade 1a.\n\nNot a diagnosis and not a surgical indication. magent does not examine the patient.\n\nThis is Hunt and Hess 1968 grades 1-5 only. It does not implement Hunt and Kosnik 1974 grade 0 or 1a.\n\nSerious systemic disease (as assigned by the caller) increments the grade by 1, capped at 5, as published in 1968. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"grade","description":"Hunt and Hess 1968 clinical grade 1-5 as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"2"},{"in":"query","name":"serious_systemic_disease","description":"true if serious systemic disease is present (hypertension, diabetes, severe arteriosclerosis, chronic pulmonary disease, or severe angiographic vasospasm as assigned by the caller). The 1968 paper places the patient in the next less favorable category.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Hunt-Hess","operationId":"get_api_calc_hunt_hess","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, input_grade, serious_systemic_disease, grade, score, max_score, description, components, citation, disclaimer."},"400":{"description":"invalid_hunt_hess_grade: grade must be an integer from 1 to 5 (Hunt and Hess 1968). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hunt-hess"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Hunt-Hess (bulk)","operationId":"post_api_calc_hunt_hess","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_hunt_hess_grade: grade must be an integer from 1 to 5 (Hunt and Hess 1968). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hunt-hess"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"grade":"2","serious_systemic_disease":"false"},{"grade":"2","serious_systemic_disease":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/manchester":{"get":{"description":"Sum the Cerny 1987 Manchester pretreatment factors for small-cell lung cancer and return good (0–1), intermediate (2–3), or poor (≥4).\n\nWhen an agent needs the published Cerny 1987 Manchester score and prognostic group and must not invent an SCLC diagnosis or stage, must not use the BRCA Manchester score, and must not assay labs or assign Karnofsky performance status.\n\nNot a medical device and not a diagnosis. magent does not examine the patient.\n\nNot the BRCA Manchester scoring system used in hereditary breast and ovarian cancer risk.\n\nmagent does not stage small-cell lung cancer. extensive_stage is caller-assigned (limited versus extensive).\n\nmagent does not assay LDH, sodium, ALP, or bicarbonate, or apply laboratory ULN. ldh_gt_uln and alp_gt_1_5_uln are caller-assigned flags.\n\nmagent does not assign Karnofsky performance status. kps is a caller-assigned Karnofsky 1949 decade 10-100; grade 0 (dead) is not scored.\n\nCerny 1987 three groups only: good (0-1), intermediate (2-3), poor (≥4). This tool does not return 2-year survival percentages. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ldh_gt_uln","description":"LDH exceeds the laboratory upper limit of normal as assigned by the caller (Cerny 1987). true scores 1. magent does not assay LDH or apply ULN.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"sodium_mmol_l","description":"Serum sodium in mmol/L (110-160). Cerny 1987 scores 1 when sodium is <132 mmol/L; 132 scores 0.","required":true,"schema":{"type":"number"},"example":"140"},{"in":"query","name":"alp_gt_1_5_uln","description":"ALP >1.5 × laboratory ULN as assigned by the caller (Cerny 1987). true scores 1. magent does not assay ALP or apply ULN.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bicarbonate_mmol_l","description":"Serum bicarbonate in mmol/L (2-45). Cerny 1987 scores 1 when bicarbonate is <24 mmol/L; 24 scores 0.","required":true,"schema":{"type":"number"},"example":"24"},{"in":"query","name":"kps","description":"Karnofsky 1949 Performance Status 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100 as assigned by the caller. Cerny 1987 scores 1 when kps is <60; 60 scores 0. Grade 0 (dead) is not scored. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"80"},{"in":"query","name":"extensive_stage","description":"Extensive-stage small-cell lung cancer as assigned by the caller (Cerny 1987). true scores 1. magent does not stage the cancer.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Manchester","operationId":"get_api_calc_manchester","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, prognostic_group, sodium_mmol_l, bicarbonate_mmol_l, kps, components, citation, disclaimer."},"400":{"description":"invalid_sodium: sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.; invalid_bicarbonate: bicarbonate_mmol_l must be a number from 2 to 45. Returned before settlement; you are not charged.; invalid_karnofsky: kps must be 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100 (Karnofsky 1949). Grade 0 (dead) is not scored. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/manchester"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Manchester (bulk)","operationId":"post_api_calc_manchester","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_sodium: sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.; invalid_bicarbonate: bicarbonate_mmol_l must be a number from 2 to 45. Returned before settlement; you are not charged.; invalid_karnofsky: kps must be 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100 (Karnofsky 1949). Grade 0 (dead) is not scored. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/manchester"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"alp_gt_1_5_uln":"false","bicarbonate_mmol_l":"24","extensive_stage":"false","kps":"80","ldh_gt_uln":"false","sodium_mmol_l":"140"},{"alp_gt_1_5_uln":"false","bicarbonate_mmol_l":"24","extensive_stage":"false","kps":"80","ldh_gt_uln":"false","sodium_mmol_l":"140"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ripasa":{"get":{"description":"Sum the Chong 2010 RIPASA points from 15 caller-assigned findings and return below_cutoff (<7.5) or at_or_above_cutoff (≥7.5) from the derivation ROC only.\n\nWhen an agent needs the published Chong 2010 RIPASA total and must not invent abdominal findings, laboratory cutoffs, identity-card status, an appendicitis diagnosis, or an operating-room protocol.\n\nNot a medical device. Not an appendicitis diagnosis or operating-room protocol.\n\nFever, raised WCC, and foreign NRIC are caller-assigned flags. magent does not apply a temperature or WBC cutoff and does not read identity documents.\n\nFindings are caller-assigned. magent does not examine the abdomen.\n\nBands are the Chong 2010 derivation ROC cutoff only (<7.5 below_cutoff; ≥7.5 at_or_above_cutoff). magent does not add probable or possible labels from later papers. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years as an integer from 1 to 120 (Chong 2010). <40 scores 1.0; ≥40 scores 0.5 (age 40 is the ≥40 arm). magent does not assign age.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"sex","description":"Caller-assigned sex (Chong 2010). male scores 1.0; female scores 0.5. magent does not assign sex.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"rif_pain","description":"Pain in the right iliac fossa (Chong 2010). true scores 0.5. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"migration_to_rif","description":"Migration of pain to the right iliac fossa (Chong 2010). true scores 0.5. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"nausea_vomiting","description":"Nausea or vomiting (Chong 2010). true scores 1.0. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"anorexia","description":"Anorexia (Chong 2010). true scores 1.0. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"symptoms_lt_48h","description":"true when symptom duration is under 48 hours (Chong 2010 <48h arm, 1.0). false scores 0.5 (the >48h arm; 48 hours is locked to this arm). magent does not timestamp onset.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"rif_tenderness","description":"Right-iliac-fossa tenderness (Chong 2010). true scores 1.0. magent does not examine the abdomen.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"guarding","description":"Guarding (Chong 2010). true scores 2.0. magent does not examine the abdomen.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"rebound_tenderness","description":"Rebound tenderness (Chong 2010). true scores 1.0. magent does not examine the abdomen.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"rovsing_sign","description":"Rovsing sign (Chong 2010). true scores 2.0. magent does not examine the abdomen.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"fever","description":"Caller-assigned fever flag (Chong 2010). true scores 1.0. magent does not apply a °C cutoff.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"raised_wcc","description":"Caller-assigned raised white-cell-count flag (Chong 2010). true scores 1.0. magent does not apply a WBC cutoff.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"negative_urinalysis","description":"Negative urinalysis (Chong 2010). true scores 1.0. magent does not assay urine.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"foreign_nric","description":"Caller-assigned foreign national registration identity card item (Chong 2010). true scores 1.0. magent does not read identity documents.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"RIPASA score","operationId":"get_api_calc_ripasa","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, ripasa_band, age, sex, components, citation, disclaimer."},"400":{"description":"invalid_ripasa_age: age must be an integer from 1 to 120 (Chong 2010 RIPASA). Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ripasa"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"RIPASA score (bulk)","operationId":"post_api_calc_ripasa","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ripasa_age: age must be an integer from 1 to 120 (Chong 2010 RIPASA). Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ripasa"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","anorexia":"false","fever":"false","foreign_nric":"false","guarding":"false","migration_to_rif":"false","nausea_vomiting":"false","negative_urinalysis":"false","raised_wcc":"false","rebound_tenderness":"false","rif_pain":"false","rif_tenderness":"false","rovsing_sign":"false","sex":"female","symptoms_lt_48h":"false"},{"age":"50","anorexia":"false","fever":"false","foreign_nric":"false","guarding":"false","migration_to_rif":"false","nausea_vomiting":"false","negative_urinalysis":"false","raised_wcc":"false","rebound_tenderness":"false","rif_pain":"false","rif_tenderness":"false","rovsing_sign":"false","sex":"female","symptoms_lt_48h":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/msoar":{"get":{"description":"Compute the Abdul-Rahim 2016 modified SOAR (mSOAR) integer score for early mortality after acute stroke from stroke subtype, OCSP, age, prestroke mRS, and caller-assigned NIHSS bands.\n\nWhen an agent has caller-assigned stroke subtype, OCSP class, age, prestroke mRS, and NIHSS total and needs the published mSOAR total and Table 2 derivation early-mortality percents, without inventing an NIHSS item exam or a care-withdrawal decision.\n\nNot a medical device and not a prognosis to withdraw care.\n\nThis is mSOAR (SOAR plus NIHSS), not original SOAR without NIHSS.\n\nThe caller assigns ischemic vs hemorrhagic subtype, OCSP (LACS/PACS/POCS/TACS), prestroke mRS 0-5, and NIHSS total 0-42. magent does not examine the patient or score NIHSS items (that is a separate tool).\n\nDerivation used in-hospital mortality in the Anglia Stroke and Heart Clinical Network; validation used 90-day mortality in Glasgow cohorts (Abdul-Rahim 2016). Table 2 derivation percents are reported for scores 0-1 through 7; scores 8-9 are possible arithmetically and have no tabulated percent.\n\nEven at the paper's preferred cut point, mSOAR is not suitable as the sole basis for therapeutic decisions (Abdul-Rahim 2016 Discussion). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Abdul-Rahim 2016 Table 1: ≤65 scores 0; 66-85 scores 1; >85 scores 2. Age 85 is the 66-85 band.","required":true,"schema":{"type":"integer"},"example":"18"},{"in":"query","name":"stroke_subtype","description":"Caller-assigned stroke subtype (Abdul-Rahim 2016 Methods / Table 1). infarct (ischemic infarction) scores 0; hemorrhage scores 1. Case-insensitive. magent does not read imaging.","required":true,"schema":{"type":"string","enum":["infarct","hemorrhage"]},"example":"infarct"},{"in":"query","name":"ocsp","description":"Caller-assigned Oxfordshire Community Stroke Project class (Abdul-Rahim 2016 Table 1). lacs or pacs scores 0; pocs scores 1; tacs scores 2. Case-insensitive. magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["lacs","pacs","pocs","tacs"]},"example":"lacs"},{"in":"query","name":"prestroke_mrs","description":"Caller-assigned prestroke modified Rankin grade 0-5. SOAR weights used by mSOAR: 0-2 scores 0; 3-4 scores 1; 5 scores 2. Table 1 lists cohort counts as 0-1 / 2-3 / 4-5, not those integer weights. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"nihss","description":"Caller-assigned NIH Stroke Scale total (integer 0-42), not an item exam. Abdul-Rahim 2016 Suppl Table I / Table 1: 0-4 scores 0; 5-10 scores 1; 11-20 and ≥21 both score 2. magent does not compute NIHSS or examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"mSOAR","operationId":"get_api_calc_msoar","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, early_mortality_percent, age_years, stroke_subtype, ocsp, prestroke_mrs, nihss, components, citation, disclaimer."},"400":{"description":"invalid_msoar: mSOAR inputs must match Abdul-Rahim 2016 stroke subtype, OCSP, age, prestroke mRS, and NIHSS bands. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/msoar"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"mSOAR (bulk)","operationId":"post_api_calc_msoar","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_msoar: mSOAR inputs must match Abdul-Rahim 2016 stroke subtype, OCSP, age, prestroke mRS, and NIHSS bands. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/msoar"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"18","nihss":"0","ocsp":"lacs","prestroke_mrs":"0","stroke_subtype":"infarct"},{"age":"18","nihss":"0","ocsp":"lacs","prestroke_mrs":"0","stroke_subtype":"infarct"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/uceis":{"get":{"description":"Sum three caller-assigned Travis 2013 UCEIS descriptors (vascular_pattern 0-2, bleeding 0-3, erosions_ulcers 0-3) scored at the most severely affected flexible-sigmoidoscopy segment and return the total (max 8). Uses the 2013 0-8 recode (normal 0). Does not return activity bands.\n\nWhen an agent has already assigned Travis 2013 vascular pattern, bleeding, and erosions/ulcers at the worst-affected flexible-sigmoidoscopy segment and needs the three-item 0-8 total, not a diagnosis, Mayo DAI, Mayo endoscopic subscore, or the Travis 1996 day-3 steroid rule.\n\nNot a medical device and not a diagnosis of ulcerative colitis or a treatment order.\n\nEach descriptor is a caller-assigned Travis 2013 token. magent does not perform endoscopy. Score the most severely affected segment at flexible sigmoidoscopy as assigned by the caller.\n\nTravis 2013 recoded normality to 0 (range 0-8). This is not the Travis 2012 3-11 numbering (normal scored 1) and not the Travis 1996 day-3 intravenous-steroid rule.\n\nTravis 2013 did not publish mild, moderate, or severe cutoffs for the total score. magent returns score and max_score only and does not apply later UCEIS activity bands.\n\nNot the Mayo DAI, not the Mayo endoscopic subscore (MES), and not Truelove and Witts. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"vascular_pattern","description":"Caller-assigned Travis 2013 UCEIS vascular pattern at the most severely affected flexible-sigmoidoscopy segment: normal (0; arborization of capillaries clearly defined, or blurring or patchy loss of capillary margins), patchy (1; patchy obliteration of vascular pattern), or obliterated (2; complete obliteration). Travis 2013 0-8 recode (normal 0, not Travis 2012 score 1). magent does not perform endoscopy.","required":true,"schema":{"type":"string","enum":["normal","patchy","obliterated"]},"example":"normal"},{"in":"query","name":"bleeding","description":"Caller-assigned Travis 2013 UCEIS bleeding at the most severely affected segment, scored during insertion: none (0; no visible blood), mucosal (1; spots or streaks of coagulated blood on the mucosa ahead of the scope that can be washed away), luminal_mild (2; some free liquid blood in the lumen), or luminal_moderate_or_severe (3; frank blood in the lumen ahead of the endoscope, or visible oozing after washing, or oozing from hemorrhagic mucosa). magent does not perform endoscopy.","required":true,"schema":{"type":"string","enum":["none","mucosal","luminal_mild","luminal_moderate_or_severe"]},"example":"none"},{"in":"query","name":"erosions_ulcers","description":"Caller-assigned Travis 2013 UCEIS erosions and ulcers at the most severely affected segment: none (0; normal mucosa, no visible erosions or ulcers), erosions (1; tiny ≤5 mm white or yellow mucosal defects with a flat edge), superficial_ulcer (2; larger >5 mm discrete fibrin-covered superficial ulcers), or deep_ulcer (3; deeper excavated defects with a slightly raised edge). magent does not perform endoscopy.","required":true,"schema":{"type":"string","enum":["none","erosions","superficial_ulcer","deep_ulcer"]},"example":"none"}],"summary":"UCEIS","operationId":"get_api_calc_uceis","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, vascular_pattern, bleeding, erosions_ulcers, components, citation, disclaimer."},"400":{"description":"invalid_uceis: vascular_pattern must be normal, patchy, or obliterated; bleeding must be none, mucosal, luminal_mild, or luminal_moderate_or_severe; erosions_ulcers must be none, erosions, superficial_ulcer, or deep_ulcer (Travis 2013 UCEIS 0-8). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/uceis"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"UCEIS (bulk)","operationId":"post_api_calc_uceis","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_uceis: vascular_pattern must be normal, patchy, or obliterated; bleeding must be none, mucosal, luminal_mild, or luminal_moderate_or_severe; erosions_ulcers must be none, erosions, superficial_ulcer, or deep_ulcer (Travis 2013 UCEIS 0-8). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/uceis"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bleeding":"none","erosions_ulcers":"none","vascular_pattern":"normal"},{"bleeding":"none","erosions_ulcers":"none","vascular_pattern":"normal"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/bpp":{"get":{"description":"Sum the five Manning 1980 fetal biophysical profile variables, each 2 if the caller assigns normal and 0 if abnormal, and return score 0-10.\n\nWhen an agent already has caller-assigned Manning 1980 normal-or-abnormal flags for the five biophysical variables and needs the published 0-10 total, not a delivery order, ultrasound, or later management band.\n\nNot a medical device and not a delivery, induction, or cesarean order.\n\nmagent does not ultrasound and does not record a nonstress test. Each variable is a caller-assigned normal (true, 2 points) or abnormal (false, 0 points) flag using Manning 1980 definitions.\n\nManning 1980 normal fetal breathing is at least one 60-second episode in 30 minutes; qualitative amniotic fluid is a 1 cm pocket in two perpendicular planes. Later 30-second breathing and 2 cm pocket cuts are not used.\n\nManning 1980 reported perinatal mortality from 0 when all five were normal to 600 per 1,000 when all were abnormal. It did not print later 8-10 / 6 / ≤4 management bands. magent emits score 0-10 and components only. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"fetal_breathing_movements","description":"Manning 1980 fetal breathing movements as assigned by the caller. true if normal: at least one episode of fetal breathing of at least 60 seconds in 30 minutes. false if abnormal: absent or no 60-second episode. Later 30-second breathing is not used. magent does not ultrasound. true or false.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"fetal_movements","description":"Manning 1980 fetal movements as assigned by the caller. true if normal: at least three discrete body or limb movements in 30 minutes. false if abnormal: two or fewer. magent does not ultrasound. true or false.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"fetal_tone","description":"Manning 1980 fetal tone as assigned by the caller. true if normal: at least one episode of active extension of a limb or trunk with return to flexion. false if abnormal: slow extension with return to partial flexion, limb in full extension, or absent fetal movement. magent does not ultrasound. true or false.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"qualitative_amniotic_fluid_volume","description":"Manning 1980 qualitative amniotic fluid volume as assigned by the caller. true if normal: at least one pocket of fluid measuring 1 cm in two perpendicular planes. false if abnormal: no pocket or a pocket smaller than 1 cm. Later 2 cm pocket is not used. magent does not ultrasound. true or false.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"nonstress_test","description":"Manning 1980 nonstress test as assigned by the caller. true if normal (reactive): at least two fetal heart-rate accelerations of at least 15 bpm lasting at least 15 seconds associated with fetal movement in 20 minutes. false if abnormal (nonreactive). magent does not record cardiotocography. true or false.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Fetal biophysical profile","operationId":"get_api_calc_bpp","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_bpp: Fetal biophysical profile inputs must be the five Manning 1980 caller-assigned normal-or-abnormal variables from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bpp"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Fetal biophysical profile (bulk)","operationId":"post_api_calc_bpp","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_bpp: Fetal biophysical profile inputs must be the five Manning 1980 caller-assigned normal-or-abnormal variables from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bpp"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"fetal_breathing_movements":"true","fetal_movements":"true","fetal_tone":"true","nonstress_test":"true","qualitative_amniotic_fluid_volume":"true"},{"fetal_breathing_movements":"true","fetal_movements":"true","fetal_tone":"true","nonstress_test":"true","qualitative_amniotic_fluid_volume":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/nivo":{"get":{"description":"Sum Hartley 2021 NIVO points from chest radiograph consolidation, GCS ≤14, atrial fibrillation, pH <7.25, time to acidaemia >12 h, and eMRCD, and return the validation Table 4 grouped in-hospital mortality band.\n\nWhen an agent needs the published Hartley 2021 NIVO total and Table 4 grouped band for AECOPD with acidaemic hypercapnic respiratory failure treated with assisted ventilation, and must not invent HACOR, DECAF, APACHE II, a weaning prediction, or a per-integer mortality percent.\n\nNot a medical device. Not an intubation, NIV-failure, weaning, or escalation order. Not HACOR, DECAF, or APACHE II.\n\nFlags and eMRCD are caller-assigned. magent does not interpret the chest radiograph, measure GCS, interpret the ECG, measure arterial pH, or clock time from hospital arrival.\n\nIn-hospital mortality percents are Hartley 2021 validation Table 4 grouped bands only (0–2 / 3–4 / 5–6 / 7–9: 5.0 / 16.8 / 41.2 / 71.4). Per-integer percents are not attached.\n\neMRCD 5a and 5b are mutually exclusive; maximum score is 9. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"chest_radiograph_consolidation","description":"Chest radiograph consolidation as assigned by the caller (Hartley 2021). true or false. 1 point if true. magent does not interpret radiographs.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"gcs_le_14","description":"GCS ≤14 prior to ventilation as assigned by the caller (Hartley 2021). true or false. 1 point if true. magent does not measure GCS.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"atrial_fibrillation","description":"Persistent AF, new AF, or paroxysmal AF even if in sinus rhythm at NIV start (Hartley 2021). true or false. 1 point if true. magent does not interpret the ECG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ph_lt_7_25","description":"Arterial pH <7.25 as assigned by the caller (Hartley 2021). true or false. 1 point if true. magent does not measure pH.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"time_to_acidaemia_gt_12h","description":">12 h from hospital arrival to index acidaemia as assigned by the caller (Hartley 2021). true or false. 2 points if true. magent does not clock admission time.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"emrcd","description":"Hartley 2021 extended MRC dyspnoea as assigned by the caller. 1_to_4 scores 0; 5a scores 2; 5b scores 3. 5a and 5b are mutually exclusive. magent does not interview the patient.","required":true,"schema":{"type":"string","enum":["1_to_4","5a","5b"]},"example":"1_to_4"}],"summary":"NIVO","operationId":"get_api_calc_nivo","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, nivo_band, in_hospital_mortality_percent, chest_radiograph_consolidation, gcs_le_14, atrial_fibrillation, ph_lt_7_25, time_to_acidaemia_gt_12h, emrcd, components, citation, disclaimer."},"400":{"description":"invalid_nivo_emrcd: emrcd must be 1_to_4, 5a, or 5b (Hartley 2021 NIVO; 5a and 5b are mutually exclusive). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nivo"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"NIVO (bulk)","operationId":"post_api_calc_nivo","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_nivo_emrcd: emrcd must be 1_to_4, 5a, or 5b (Hartley 2021 NIVO; 5a and 5b are mutually exclusive). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nivo"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"atrial_fibrillation":"false","chest_radiograph_consolidation":"false","emrcd":"1_to_4","gcs_le_14":"false","ph_lt_7_25":"false","time_to_acidaemia_gt_12h":"false"},{"atrial_fibrillation":"false","chest_radiograph_consolidation":"false","emrcd":"1_to_4","gcs_le_14":"false","ph_lt_7_25":"false","time_to_acidaemia_gt_12h":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/eat-sleep-console":{"get":{"description":"Apply the Grossman 2018 Eat, Sleep, Console functional assessment from caller-assigned eat, sleep, and console flags. magent does not examine the infant.\n\nWhen an agent already has Grossman 2018 eat, sleep, and console observations as assigned by the caller and needs the published well_managed result. Not modified Finnegan, not the later ESC Care Tool item list, and not a morphine order.\n\nNot a diagnosis and not a medical device.\n\nNot modified Finnegan NAS scoring.\n\nNot the later ESC Care Tool item list as a second system.\n\nmagent does not observe feeding, sleep, or consolability. All flags are caller-assigned.\n\nNot a pharmacologic order. magent returns needs_increased_treatment as a boolean only; it does not recommend or compute a morphine dose. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"eat_ok","description":"Able to eat ≥1 oz per feed or breastfeed well, as assigned by the caller (Grossman 2018 Eat, Sleep, Console). true or false. magent does not observe feeding.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"sleep_ok","description":"Able to sleep undisturbed ≥1 hour, as assigned by the caller (Grossman 2018 Eat, Sleep, Console). true or false. magent does not observe sleep.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"console_ok","description":"Able to be consoled, if crying, within 10 minutes, as assigned by the caller (Grossman 2018 Eat, Sleep, Console). true or false. magent does not observe consolability.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Eat, Sleep, Console","operationId":"get_api_calc_eat_sleep_console","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, well_managed, needs_increased_treatment, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/eat-sleep-console"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Eat, Sleep, Console (bulk)","operationId":"post_api_calc_eat_sleep_console","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/eat-sleep-console"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"console_ok":"true","eat_ok":"true","sleep_ok":"true"},{"console_ok":"true","eat_ok":"true","sleep_ok":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/save":{"get":{"description":"Sum Schmidt 2015 Table 4 SAVE-score cells including the published constant −6 and return class I–V with hospital survival percents.\n\nWhen an agent has caller-assigned pre-ECMO Table 4 predictors and needs the published integer SAVE-score and class, not a cannulation order and not Chen 2016 modified SAVE.\n\nNot a medical device. magent does not assign VA-ECMO, does not cannulate, and does not examine the patient.\n\nNot a cannulation order, eCPR protocol, or futility determination. Derivation excluded ECMO during CPR.\n\nSchmidt 2015 Table 4 only, plus the published constant −6. Not Chen 2016 modified SAVE (no lactate cell). Not RESP (VV-ECMO).\n\nDiagnoses and acute pre-ECMO organ failures may stack (Table 4: select one or more). Other diagnoses score 0. Acute and chronic renal failure are separate cells.\n\nA score of 0 is approximately 50% hospital survival in the paper text; this tool returns the Table 4 class percent (I 75, II 58, III 42, IV 30, V 18), not a continuous logit.\n\nOrgan-failure flags, PIP, blood pressure, pulse pressure, and bicarbonate are caller-assigned. magent does not measure labs or airway pressure. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Schmidt 2015 Table 4: 18–38 → 7, 39–52 → 4, 53–62 → 3, ≥63 → 0. Adult SAVE-score; magent does not assign pediatric VA-ECMO.","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"weight_kg","description":"Weight in kg (20-400). Table 4 / Table 3 bands: ≤65 → 1, 66–89 → 2, ≥90 → 0. 65 kg scores 1 (≤65 before the 65–89 typeset overlap). Caller-supplied; magent does not weigh the patient.","required":true,"schema":{"type":"number"},"example":"95"},{"in":"query","name":"myocarditis","description":"Acute myocarditis diagnosis (Table 4, +3). Diagnoses are not mutually exclusive (select one or more). true or false. Caller-assigned.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"refractory_vt_vf","description":"Refractory ventricular tachycardia or fibrillation (Table 4, +2). May stack with other diagnosis flags. true or false. Caller-assigned.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"post_heart_or_lung_transplant","description":"Post heart or lung transplantation (Table 4, +3). May stack with other diagnosis flags. true or false. Caller-assigned.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"congenital_heart_disease","description":"Congenital heart disease (Table 4, −3). May stack with other diagnosis flags. true or false. Caller-assigned.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"liver_failure","description":"Acute pre-ECMO liver failure (Table 4, −3). Paper footnote: bilirubin ≥33 µmol/L or ALT or AST >70 U/L. Acute organ failures may stack. true or false. Caller-assigned; magent does not measure labs.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cns_dysfunction","description":"Acute pre-ECMO CNS dysfunction (Table 4, −3): neurotrauma, stroke, encephalopathy, cerebral embolism, seizure or epileptic syndromes. May stack. true or false. Caller-assigned; magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"acute_renal_failure","description":"Acute pre-ECMO renal failure (Table 4, −3): creatinine >1.5 mg/dL with or without RRT. Distinct from chronic_renal_failure. May stack. true or false. Caller-assigned.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"chronic_renal_failure","description":"Chronic renal failure (Table 4, −6): kidney damage or GFR <60 mL/min/1.73 m² for ≥3 months. Distinct from acute_renal_failure. true or false. Caller-assigned.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"intubation_hours","description":"Hours of intubation before ECMO (0-720). Table 4: ≤10 → 0, 11–29 → −2, ≥30 → −4. Caller-supplied; magent does not read a ventilator log.","required":true,"schema":{"type":"number"},"example":"5"},{"in":"query","name":"pip_cmh2o","description":"Peak inspiratory pressure in cmH2O (5-80). Table 4: ≤20 → +3, otherwise 0. Worst value as assigned by the caller. magent does not read airway pressure.","required":true,"schema":{"type":"number"},"example":"25"},{"in":"query","name":"pre_ecmo_cardiac_arrest","description":"Cardiac arrest before ECMO (Table 4, −2). Derivation excluded eCPR during cannulation. true or false. Caller-assigned.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"diastolic_bp_mm_hg","description":"Diastolic blood pressure in mm Hg before ECMO (1-200). Worst value within 6 h of cannulation. Table 4: ≥40 → +3, otherwise 0. magent does not measure blood pressure.","required":true,"schema":{"type":"number"},"example":"35"},{"in":"query","name":"pulse_pressure_mm_hg","description":"Pulse pressure in mm Hg before ECMO (0-200). Worst value within 6 h. Table 4: ≤20 → −2, otherwise 0. Caller-supplied; magent does not subtract systolic minus diastolic.","required":true,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"bicarbonate_mmol_l","description":"Serum bicarbonate in mmol/L before ECMO (1-50). Worst value within 6 h. Table 4: ≤15 → −3, otherwise 0. magent does not measure HCO3.","required":true,"schema":{"type":"number"},"example":"24"}],"summary":"SAVE-score","operationId":"get_api_calc_save","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, min_score, max_score, save_class, hospital_survival_percent, components, citation, disclaimer."},"400":{"description":"invalid_save: SAVE needs Schmidt 2015 pre-ECMO cardiogenic-shock predictors in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/save"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SAVE-score (bulk)","operationId":"post_api_calc_save","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_save: SAVE needs Schmidt 2015 pre-ECMO cardiogenic-shock predictors in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/save"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"acute_renal_failure":"false","age":"70","bicarbonate_mmol_l":"24","chronic_renal_failure":"false","cns_dysfunction":"false","congenital_heart_disease":"false","diastolic_bp_mm_hg":"35","intubation_hours":"5","liver_failure":"false","myocarditis":"false","pip_cmh2o":"25","post_heart_or_lung_transplant":"false","pre_ecmo_cardiac_arrest":"false","pulse_pressure_mm_hg":"40","refractory_vt_vf":"false","weight_kg":"95"},{"acute_renal_failure":"false","age":"70","bicarbonate_mmol_l":"24","chronic_renal_failure":"false","cns_dysfunction":"false","congenital_heart_disease":"false","diastolic_bp_mm_hg":"35","intubation_hours":"5","liver_failure":"false","myocarditis":"false","pip_cmh2o":"25","post_heart_or_lung_transplant":"false","pre_ecmo_cardiac_arrest":"false","pulse_pressure_mm_hg":"40","refractory_vt_vf":"false","weight_kg":"95"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/score2-op":{"get":{"description":"Compute the ESC 2021 SCORE2-OP 10-year fatal plus non-fatal CVD percent for adults aged 70-89 from sex, current smoking, diabetes, systolic blood pressure, non-HDL cholesterol, and European geographic risk region.\n\nWhen an agent already has those SCORE2-OP 2021 predictors for a person aged 70-89 without prior CVD and needs that paper's region-calibrated 10-year CVD percent. Not a diagnosis, statin order, SCORE2 (age 40-69), SCORE2-Diabetes, 2013 pooled-cohort equation, or PREVENT.\n\nNot a medical device. Not a diagnosis of cardiovascular disease. Not a statin order or treatment recommendation.\n\nSCORE2-OP 2021 for ages 70-89 only. Not SCORE2 (age 40-69). Not SCORE2-Diabetes (no HbA1c, age at diagnosis, or eGFR). Diabetes is a yes/no term in SCORE2-OP.\n\nNot the 2013 ACC/AHA pooled-cohort equations. Not PREVENT. european_risk_region is the paper's geographic calibration (low, moderate, high, very_high), not race or ethnicity.\n\nCharts display non-HDL. The published equation uses total and HDL cholesterol; magent evaluates it at the paper's HDL centering 1.4 mmol/L (TC = non-HDL + 1.4), matching the printed 75-year-old example (non-HDL 4.5).\n\nCaller assigns age, sex, smoking, diabetes, blood pressure, non-HDL, and European risk region. magent does not assay lipids and does not measure blood pressure. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 70-89). SCORE2-OP 2021 is for ages 70-89. Not SCORE2 (age 40-69).","required":true,"schema":{"type":"integer"},"example":75},{"in":"query","name":"sex","description":"Sex used by the sex-specific SCORE2-OP 2021 Table 2 coefficients (female or male).","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"smoker","description":"Current cigarette smoking as assigned by the caller (true or false). magent does not take a smoking history.","required":true,"schema":{"type":"boolean"},"example":true},{"in":"query","name":"diabetes","description":"History of diabetes as assigned by the caller (true or false). SCORE2-OP includes diabetes. Not SCORE2-Diabetes (no HbA1c, age at diagnosis, or eGFR).","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"sbp_mm_hg","description":"Systolic blood pressure in mm Hg (50-250). Enters as (SBP-150)/10. magent does not measure blood pressure.","required":true,"schema":{"type":"number"},"example":150},{"in":"query","name":"non_hdl_mmol_l","description":"Non-HDL cholesterol in mmol/L (1-12). SCORE2-OP charts display non-HDL. The published equation uses TC and HDL at the paper HDL centering 1.4 mmol/L (TC = non-HDL + 1.4). The printed 75-year-old example is non-HDL 4.5 mmol/L. magent does not assay lipids.","required":true,"schema":{"type":"number"},"example":4.5},{"in":"query","name":"european_risk_region","description":"Geographic SCORE2-OP 2021 calibration region (low, moderate, high, or very_high) as printed in that paper. Not race. Not ethnicity.","required":true,"schema":{"type":"string","enum":["low","moderate","high","very_high"]},"example":"low"}],"summary":"SCORE2-OP 10-year CVD risk","operationId":"get_api_calc_score2_op","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age, sex, smoker, diabetes, sbp_mm_hg, non_hdl_mmol_l, total_cholesterol_mmol_l, hdl_mmol_l, european_risk_region, linear_predictor, risk_10y_percent, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_score2_region: european_risk_region must be low, moderate, high, or very_high as printed in SCORE2 2021 (geographic calibration, not race). Returned before settlement; you are not charged.; invalid_score2_op: SCORE2-OP 2021 inputs must match that paper's age 70-89, sex, smoking, diabetes, systolic BP, non-HDL cholesterol, and European risk region. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/score2-op"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SCORE2-OP 10-year CVD risk (bulk)","operationId":"post_api_calc_score2_op","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_score2_region: european_risk_region must be low, moderate, high, or very_high as printed in SCORE2 2021 (geographic calibration, not race). Returned before settlement; you are not charged.; invalid_score2_op: SCORE2-OP 2021 inputs must match that paper's age 70-89, sex, smoking, diabetes, systolic BP, non-HDL cholesterol, and European risk region. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/score2-op"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"75","diabetes":"false","european_risk_region":"low","non_hdl_mmol_l":"4.5","sbp_mm_hg":"150","sex":"male","smoker":"true"},{"age":"75","diabetes":"false","european_risk_region":"low","non_hdl_mmol_l":"4.5","sbp_mm_hg":"150","sex":"male","smoker":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pgcs":{"get":{"description":"Compute the Reilly 1988 paediatric Glasgow Coma Scale as the sum of caller-assigned eye (1-4), verbal (1-5), and motor (1-6) integers. Max 15.\n\nWhen an agent already has paediatric eye, verbal, and motor integers after applying age-appropriate descriptors and needs the published PGCS total. magent does not observe the child, take age, or pick wording.\n\nNot a medical device. Not a diagnosis, trauma triage, or intubation order.\n\nNot adult GCS 1974 five-point motor (Teasdale-Jennett 1974 motor 1-5, max 14). This is Reilly 1988 paediatric GCS with 1976-style motor 1-6 (max 15).\n\nmagent does not observe the patient and does not pick age-specific wording. The caller assigns eye, verbal, and motor after applying age-appropriate paediatric descriptors.\n\nmagent does not take age and does not implement an age-max expected-normal table. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"eye","description":"Eye opening (E). Integer 1-4 as assigned by the caller after age-appropriate paediatric descriptors. magent does not observe the child.","required":true,"schema":{"type":"integer"},"example":"4"},{"in":"query","name":"verbal","description":"Verbal response (V). Integer 1-5 as assigned by the caller after age-appropriate paediatric descriptors. magent does not observe the child.","required":true,"schema":{"type":"integer"},"example":"5"},{"in":"query","name":"motor","description":"Motor response (M). Integer 1-6 as assigned by the caller after age-appropriate paediatric descriptors. magent does not observe the child.","required":true,"schema":{"type":"integer"},"example":"6"}],"summary":"Paediatric Glasgow Coma Scale","operationId":"get_api_calc_pgcs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_pgcs_component: eye must be an integer 1-4, verbal 1-5, and motor 1-6 (Reilly 1988 paediatric GCS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pgcs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Paediatric Glasgow Coma Scale (bulk)","operationId":"post_api_calc_pgcs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pgcs_component: eye must be an integer 1-4, verbal 1-5, and motor 1-6 (Reilly 1988 paediatric GCS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pgcs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"eye":"4","motor":"6","verbal":"5"},{"eye":"4","motor":"6","verbal":"5"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/r-iss":{"get":{"description":"Apply the Palumbo 2015 Revised International Staging System for multiple myeloma from ISS (beta-2 microglobulin and albumin), caller-assigned high-risk cytogenetic abnormalities, and LDH above the upper limit of normal.\n\nWhen an agent has caller-supplied serum beta-2 microglobulin, albumin, high-risk iFISH CA, and LDH versus ULN and needs the published Palumbo 2015 R-ISS stage, not R2-ISS, not Durie-Salmon, and not a treatment recommendation.\n\nNot a medical device. magent does not examine the patient and does not assay beta-2 microglobulin, albumin, LDH, or cytogenetics.\n\nNot a myeloma diagnosis or treatment choice. This is Palumbo 2015 R-ISS only, not R2-ISS and not Durie-Salmon.\n\nThe caller assigns high_risk_ca (del(17p) and/or t(4;14) and/or t(14;16) by iFISH) and ldh_gt_uln (serum LDH > ULN). magent does not FISH or assign ULN.\n\nThis is not trauma ISS (Baker 1974 Injury Severity Score) and not Greipp 2005 ISS alone. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"beta2_microglobulin_mg_l","description":"Serum beta-2 microglobulin in mg/L (0.2-40). Greipp 2005 / Palumbo 2015 ISS. Stage I requires < 3.5; stage III when >= 5.5. magent does not assay beta-2 microglobulin.","required":true,"schema":{"type":"number"},"example":"2.0"},{"in":"query","name":"albumin_g_dl","description":"Serum albumin in g/dL (1-6). Provide this or albumin_g_l, not both. ISS uses g/dL. Stage I requires albumin >= 3.5 when Sβ2M < 3.5. Ignored when Sβ2M >= 5.5.","required":false,"schema":{"type":"number"},"example":"4.0"},{"in":"query","name":"albumin_g_l","description":"Serum albumin in g/L (10-60). Converted as g/dL = g/L / 10. Provide this or albumin_g_dl, not both.","required":false,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"high_risk_ca","description":"High-risk cytogenetic abnormalities as assigned by the caller: true iff del(17p) and/or t(4;14) and/or t(14;16) by iFISH (Palumbo 2015). magent does not FISH.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ldh_gt_uln","description":"Serum LDH greater than the upper limit of normal as assigned by the caller (Palumbo 2015: high LDH is > ULN). magent does not assay LDH or assign ULN.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"R-ISS","operationId":"get_api_calc_r_iss","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, beta2_microglobulin_mg_l, albumin_g_dl, high_risk_ca, ldh_gt_uln, iss_stage, iss_stage_label, riss_stage, riss_stage_label, citation, disclaimer."},"400":{"description":"invalid_beta2_microglobulin: beta2_microglobulin_mg_l must be a number from 0.2 to 40 (Greipp 2005 ISS). Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/r-iss"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"R-ISS (bulk)","operationId":"post_api_calc_r_iss","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_beta2_microglobulin: beta2_microglobulin_mg_l must be a number from 0.2 to 40 (Greipp 2005 ISS). Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/r-iss"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"albumin_g_dl":"4.0","beta2_microglobulin_mg_l":"2.0","high_risk_ca":"false","ldh_gt_uln":"false"},{"albumin_g_dl":"4.0","beta2_microglobulin_mg_l":"2.0","high_risk_ca":"false","ldh_gt_uln":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/glasgow-blatchford":{"get":{"description":"Compute the Blatchford 2000 Glasgow-Blatchford score from urea, haemoglobin, systolic BP, heart rate, and four clinical flags.\n\nWhen an agent needs the Blatchford 2000 Glasgow-Blatchford arithmetic for upper-gastrointestinal haemorrhage and must not invent Rockall, AIMS65, or extra GBS risk bands.\n\nNot a diagnosis of the cause or severity of bleeding.\n\nNot Rockall (full or pre-endoscopy) and not AIMS65.\n\nScore 0 is the published low-risk screen for needing treatment; magent does not invent other GBS bands.\n\nUrea may be mmol/L or BUN mg/dL (÷ 2.8); haemoglobin may be g/L or g/dL (× 10). Points use unrounded converted SI values.\n\nAdults as in Blatchford 2000. The caller assigns findings; magent does not examine the patient. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sex","description":"Sex (female or male). Haemoglobin points use the Blatchford 2000 sex-specific table.","required":true,"schema":{"type":"string"},"example":"male"},{"in":"query","name":"urea_mmol_l","description":"Blood urea in mmol/L (1-50). Provide this or bun_mg_dl, not both. <6.5 scores 0; 6.5–7.9 scores 2; 8.0–9.9 scores 3; 10.0–24.9 scores 4; ≥25.0 scores 6.","required":false,"schema":{"type":"number"},"example":"5.0"},{"in":"query","name":"bun_mg_dl","description":"BUN in mg/dL (3-140). Converted as urea_mmol_l = bun_mg_dl / 2.8. Provide this or urea_mmol_l, not both.","required":false,"schema":{"type":"number"},"example":"14"},{"in":"query","name":"hemoglobin_g_l","description":"Haemoglobin in g/L (30-220). Provide this or hemoglobin_g_dl, not both. Men: <100 → 6; 100–119 → 3; 120–129 → 1; ≥130 → 0. Women: <100 → 6; 100–119 → 1; ≥120 → 0.","required":false,"schema":{"type":"number"},"example":"140"},{"in":"query","name":"hemoglobin_g_dl","description":"Haemoglobin in g/dL (3-22). Converted as hemoglobin_g_l = hemoglobin_g_dl × 10. Provide this or hemoglobin_g_l, not both.","required":false,"schema":{"type":"number"},"example":"14.0"},{"in":"query","name":"systolic_mm_hg","description":"Systolic blood pressure in mm Hg (50-250). <90 scores 3; 90–99 scores 2; 100–109 scores 1; ≥110 scores 0.","required":true,"schema":{"type":"number"},"example":"120"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats per minute (integer 30-220). Scores 1 when ≥100; 99 does not score.","required":true,"schema":{"type":"integer"},"example":"80"},{"in":"query","name":"melena","description":"Melena as assigned by the caller. true or false. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"syncope","description":"Syncope as assigned by the caller. true or false. 2 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hepatic_disease","description":"Hepatic disease as assigned by the caller. true or false. 2 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cardiac_failure","description":"Cardiac failure as assigned by the caller. true or false. 2 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Glasgow-Blatchford score","operationId":"get_api_calc_glasgow_blatchford","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, gbs_risk, urea_mmol_l, hemoglobin_g_l, sex, systolic_mm_hg, heart_rate_bpm, components, citation, disclaimer."},"400":{"description":"invalid_urea: urea_mmol_l (1-50) or bun_mg_dl (3-140) is required, not both. Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/glasgow-blatchford"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Glasgow-Blatchford score (bulk)","operationId":"post_api_calc_glasgow_blatchford","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_urea: urea_mmol_l (1-50) or bun_mg_dl (3-140) is required, not both. Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/glasgow-blatchford"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"cardiac_failure":"false","heart_rate_bpm":"80","hemoglobin_g_l":"140","hepatic_disease":"false","melena":"false","sex":"male","syncope":"false","systolic_mm_hg":"120","urea_mmol_l":"5.0"},{"cardiac_failure":"false","heart_rate_bpm":"80","hemoglobin_g_l":"140","hepatic_disease":"false","melena":"false","sex":"male","syncope":"false","systolic_mm_hg":"120","urea_mmol_l":"5.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/brue-2":{"get":{"description":"Compute the Nama 2022 Supplemental Table 7 logistic probabilities of a serious underlying diagnosis and of event recurrence from age in days, similar-event history, abnormal medical history, prematurity, event clusters, color change, abnormal respiratory pattern, and tone change.\n\nWhen an agent already has a brief resolved unexplained event and needs the published Nama 2022 probabilities. Do not invent an admission cutoff. magent does not examine the infant.\n\nNot a medical device. Not a diagnosis.\n\nNama 2022 Supplemental Table 7 logistic models only. magent does not apply a definition box and does not invent an admission cutoff.\n\nThe caller assigns that the infant already meets a brief resolved unexplained event and assigns every flag. magent does not examine the infant or take a history.\n\nAge is 0-364 days. Recurrence in the derivation cohort was during the index emergency or hospital visit.\n\nAbnormal respiratory pattern and tone change have negative recurrence coefficients as published. Nama 2022 publishes no low or high percent cutoff. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_days","description":"Age in days (0-364). Nama 2022 Supplemental Table 7 serious-diagnosis model: +0.0025 per day. Recurrence model does not use age. magent does not examine the infant.","required":true,"schema":{"type":"integer"},"example":"90"},{"in":"query","name":"history_of_similar_event","description":"History of a similar event before the index presentation (Nama 2022 Supplemental Table 7). true or false as assigned by the caller. Serious-diagnosis +0.56; recurrence +0.58. magent does not examine the infant.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"abnormal_medical_history","description":"Abnormal medical history such as previous hospitalization or an underlying medical condition (Nama 2022 Supplemental Table 7). true or false as assigned by the caller. Serious-diagnosis +0.65. Recurrence model does not use this flag.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"prematurity","description":"Prematurity as published: born <32 weeks, or born between 32 and 38 weeks and corrected to <45 weeks (Nama 2022 Supplemental Table 7). true or false as assigned by the caller. Recurrence +0.46.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"history_of_event_clusters","description":"History of multiple events or event clusters before presentation (Nama 2022 Supplemental Table 7). true or false as assigned by the caller. Recurrence +1.17.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"color_change","description":"Color change (cyanosis or pallor) during the event (Nama 2022 Supplemental Table 7). true or false as assigned by the caller. Recurrence +0.36. magent does not examine the infant.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"abnormal_respiratory_pattern","description":"Abnormal respiratory pattern (absent, decreased, or irregular breathing) during the event (Nama 2022 Supplemental Table 7). true or false as assigned by the caller. Recurrence -0.32.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"tone_change","description":"Marked change in tone (hypertonia or hypotonia) during the event (Nama 2022 Supplemental Table 7). true or false as assigned by the caller. Recurrence -0.31.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"BRUE 2.0","operationId":"get_api_calc_brue_2","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_days, history_of_similar_event, abnormal_medical_history, prematurity, history_of_event_clusters, color_change, abnormal_respiratory_pattern, tone_change, serious_diagnosis_logit, estimated_serious_diagnosis_percent, event_recurrence_logit, estimated_event_recurrence_percent, citation, disclaimer."},"400":{"description":"invalid_brue_2: BRUE 2.0 needs the published infant event criteria as true or false or the paper's tokens. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/brue-2"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"BRUE 2.0 (bulk)","operationId":"post_api_calc_brue_2","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_brue_2: BRUE 2.0 needs the published infant event criteria as true or false or the paper's tokens. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/brue-2"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"abnormal_medical_history":"false","abnormal_respiratory_pattern":"false","age_days":"90","color_change":"false","history_of_event_clusters":"false","history_of_similar_event":"false","prematurity":"false","tone_change":"false"},{"abnormal_medical_history":"false","abnormal_respiratory_pattern":"false","age_days":"90","color_change":"false","history_of_event_clusters":"false","history_of_similar_event":"false","prematurity":"false","tone_change":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ganzoni":{"get":{"description":"Compute the Ganzoni 1970 iron deficit from weight, measured hemoglobin, a caller-supplied target hemoglobin, and depot iron stores.\n\nWhen an agent needs the published Ganzoni milligram deficit and must not invent a target hemoglobin, depot iron, or an IV iron product order.\n\nNot an IV iron product dose or order. magent does not pick target hemoglobin or depot iron.\n\nNot a diagnosis of iron deficiency. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"weight_kg","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"weight_lb","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"schema":{"type":"number"},"example":"154.32"},{"in":"query","name":"hemoglobin_g_dl","description":"Measured hemoglobin in g/dL (3-22). This tool does not accept g/L.","required":true,"schema":{"type":"number"},"example":"8"},{"in":"query","name":"target_hemoglobin_g_dl","description":"Target hemoglobin in g/dL (7-18). Must be strictly greater than hemoglobin_g_dl. magent does not pick a target.","required":true,"schema":{"type":"number"},"example":"15"},{"in":"query","name":"iron_stores_mg","description":"Depot iron stores in mg (0-2000). Required; magent does not default a depot.","required":true,"schema":{"type":"number"},"example":"500"}],"summary":"Ganzoni iron deficit","operationId":"get_api_calc_ganzoni","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, weight_kg, hemoglobin_g_dl, target_hemoglobin_g_dl, iron_stores_mg, iron_deficit_mg, citation, disclaimer."},"400":{"description":"invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_target_hemoglobin: target_hemoglobin_g_dl must be 7-18 and strictly greater than hemoglobin_g_dl. Returned before settlement; you are not charged.; invalid_iron_stores: iron_stores_mg must be a number from 0 to 2000. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ganzoni"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Ganzoni iron deficit (bulk)","operationId":"post_api_calc_ganzoni","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_target_hemoglobin: target_hemoglobin_g_dl must be 7-18 and strictly greater than hemoglobin_g_dl. Returned before settlement; you are not charged.; invalid_iron_stores: iron_stores_mg must be a number from 0 to 2000. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ganzoni"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"hemoglobin_g_dl":"8","iron_stores_mg":"500","target_hemoglobin_g_dl":"15","weight_kg":"70"},{"hemoglobin_g_dl":"8","iron_stores_mg":"500","target_hemoglobin_g_dl":"15","weight_kg":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pasi":{"get":{"description":"Compute Fredriksson 1978 PASI from four body regions. For each region the caller assigns area 0-6 and three intensity signs (erythema, induration, scaling) each 0-4. Region score = (sum of 3 signs) × area × adult weight. Total PASI is the sum (max 72).\n\nWhen an agent already has caller-assigned Fredriksson 1978 PASI region area and sign integers and needs the published adult-weight total. magent does not examine the skin, diagnose psoriasis, apply pediatric region weights, or assign Investigator Global Assessment or later mild-moderate-severe PASI cutoffs. Not EASI (EASI uses four signs 0-3 including edema).\n\nNot a medical device and not a diagnosis of psoriasis or a treatment order. magent does not examine the skin. Each area (0-6) and sign (0-4) is a caller-assigned integer.\n\nmagent uses the published adult area weights (head 0.1, upper extremities 0.2, trunk 0.3, lower extremities 0.4). It does not apply later pediatric head 0.2 and lower-extremity 0.3 multipliers.\n\nFredriksson 1978 published no Investigator Global Assessment or mild-moderate-severe PASI cutoffs. magent returns the numeric PASI only.\n\nEach sign is a caller-assigned integer 0-4 (0 none, 1 slight, 2 moderate, 3 severe, 4 very severe). magent does not accept half-point grades. PASI uses three signs, not EASI's four signs 0-3 including edema. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"head_area","description":"Caller-assigned Fredriksson 1978 PASI area of involvement for this body region (integer 0-6): 0 none, 1 <10%, 2 10-29%, 3 30-49%, 4 50-69%, 5 70-89%, 6 90-100%. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4,5,6]},"example":"0"},{"in":"query","name":"head_erythema","description":"Caller-assigned Fredriksson 1978 PASI erythema for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"head_induration","description":"Caller-assigned Fredriksson 1978 PASI induration for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"head_scaling","description":"Caller-assigned Fredriksson 1978 PASI scaling for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"upper_extremities_area","description":"Caller-assigned Fredriksson 1978 PASI area of involvement for this body region (integer 0-6): 0 none, 1 <10%, 2 10-29%, 3 30-49%, 4 50-69%, 5 70-89%, 6 90-100%. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4,5,6]},"example":"0"},{"in":"query","name":"upper_extremities_erythema","description":"Caller-assigned Fredriksson 1978 PASI erythema for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"upper_extremities_induration","description":"Caller-assigned Fredriksson 1978 PASI induration for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"upper_extremities_scaling","description":"Caller-assigned Fredriksson 1978 PASI scaling for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"trunk_area","description":"Caller-assigned Fredriksson 1978 PASI area of involvement for this body region (integer 0-6): 0 none, 1 <10%, 2 10-29%, 3 30-49%, 4 50-69%, 5 70-89%, 6 90-100%. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4,5,6]},"example":"0"},{"in":"query","name":"trunk_erythema","description":"Caller-assigned Fredriksson 1978 PASI erythema for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"trunk_induration","description":"Caller-assigned Fredriksson 1978 PASI induration for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"trunk_scaling","description":"Caller-assigned Fredriksson 1978 PASI scaling for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"lower_extremities_area","description":"Caller-assigned Fredriksson 1978 PASI area of involvement for this body region (integer 0-6): 0 none, 1 <10%, 2 10-29%, 3 30-49%, 4 50-69%, 5 70-89%, 6 90-100%. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4,5,6]},"example":"0"},{"in":"query","name":"lower_extremities_erythema","description":"Caller-assigned Fredriksson 1978 PASI erythema for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"lower_extremities_induration","description":"Caller-assigned Fredriksson 1978 PASI induration for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"lower_extremities_scaling","description":"Caller-assigned Fredriksson 1978 PASI scaling for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"}],"summary":"PASI","operationId":"get_api_calc_pasi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, head_score, upper_extremities_score, trunk_score, lower_extremities_score, components, citation, disclaimer."},"400":{"description":"invalid_pasi: each PASI region needs area 0-6 and erythema, induration, and scaling 0-4 (Fredriksson 1978). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pasi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PASI (bulk)","operationId":"post_api_calc_pasi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pasi: each PASI region needs area 0-6 and erythema, induration, and scaling 0-4 (Fredriksson 1978). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pasi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"head_area":"0","head_erythema":"0","head_induration":"0","head_scaling":"0","lower_extremities_area":"0","lower_extremities_erythema":"0","lower_extremities_induration":"0","lower_extremities_scaling":"0","trunk_area":"0","trunk_erythema":"0","trunk_induration":"0","trunk_scaling":"0","upper_extremities_area":"0","upper_extremities_erythema":"0","upper_extremities_induration":"0","upper_extremities_scaling":"0"},{"head_area":"0","head_erythema":"0","head_induration":"0","head_scaling":"0","lower_extremities_area":"0","lower_extremities_erythema":"0","lower_extremities_induration":"0","lower_extremities_scaling":"0","trunk_area":"0","trunk_erythema":"0","trunk_induration":"0","trunk_scaling":"0","upper_extremities_area":"0","upper_extremities_erythema":"0","upper_extremities_induration":"0","upper_extremities_scaling":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/cambridge-diabetes":{"get":{"description":"Compute the Griffin 2000 Cambridge logistic probability of undetected type 2 diabetes from age, sex, BMI, prescribed antihypertensive medication, prescribed steroids, first-degree family history, and smoking.\n\nWhen an agent has those routinely collected Griffin 2000 predictors as assigned by the caller and needs the published logistic probability of undetected type 2 diabetes. Not FINDRISC points, not the ADA risk test, and not a glucose assay.\n\nNot a medical device. magent does not diagnose type 2 diabetes and does not assay glucose.\n\nGriffin 2000 logistic model of undetected (prevalent) type 2 diabetes. Not a 10-year incidence model. Not FINDRISC points. Not the ADA diabetes risk test.\n\nAge is clamped to 40-64 years, the Griffin 2000 derivation range. BMI 10-80 is a magent clamp; magent does not compute BMI from height and weight.\n\nantihypertensive, steroids, family_history, and smoking are caller-assigned. magent does not read a medication list, take a pedigree, or take a smoking history.\n\nReturns probability on 0-1. Griffin 2000 does not print a screening cutoff; later papers' 0.11 / 0.15 / 0.37 thresholds are not this tool.\n\nIntercept is -6.322 as published. magent does not invert the sign of the intercept. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years. Griffin 2000 derivation was ages 40-64; magent accepts that published range only. Continuous linear predictor at 0.063 per year.","required":true,"schema":{"type":"integer"},"example":50},{"in":"query","name":"sex","description":"female or male. Griffin 2000 female coefficient is -0.879; male is the reference (0).","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"bmi_kg_m2","description":"Body-mass index in kg/m^2 (10-80, magent clamp). Caller-supplied; magent does not compute BMI from height and weight. Griffin 2000: <25 -> 0; >=25 and <27.5 -> 0.699; >=27.5 and <30 -> 1.97; >=30 -> 2.518.","required":true,"schema":{"type":"number"},"example":24},{"in":"query","name":"antihypertensive","description":"Prescribed antihypertensive medication as assigned by the caller (Griffin 2000). true adds 1.222; false adds 0. magent does not read a medication list.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"steroids","description":"Prescribed steroids as assigned by the caller (Griffin 2000). true adds 2.191; false adds 0. magent does not read a medication list.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"family_history","description":"First-degree family history of diabetes (Griffin 2000). none 0; parent_or_sibling 0.728 (parent or sibling, not both); parent_and_sibling 0.753 (parent and sibling). magent does not take a pedigree.","required":true,"schema":{"type":"string","enum":["none","parent_or_sibling","parent_and_sibling"]},"example":"none"},{"in":"query","name":"smoking","description":"Smoking history (Griffin 2000). never (nonsmoker) 0; former (ex-smoker) -0.218; current 0.855. magent does not take a smoking history.","required":true,"schema":{"type":"string","enum":["never","former","current"]},"example":"never"}],"summary":"Cambridge diabetes","operationId":"get_api_calc_cambridge_diabetes","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, sex, bmi_kg_m2, antihypertensive, steroids, family_history, smoking, linear_predictor, probability, citation, disclaimer."},"400":{"description":"invalid_cambridge_diabetes: Cambridge diabetes risk inputs must match Griffin 2000 age, sex, BMI, medications, family history, and smoking. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cambridge-diabetes"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Cambridge diabetes (bulk)","operationId":"post_api_calc_cambridge_diabetes","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_cambridge_diabetes: Cambridge diabetes risk inputs must match Griffin 2000 age, sex, BMI, medications, family history, and smoking. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cambridge-diabetes"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","antihypertensive":"false","bmi_kg_m2":"24","family_history":"none","sex":"male","smoking":"never","steroids":"false"},{"age":"50","antihypertensive":"false","bmi_kg_m2":"24","family_history":"none","sex":"male","smoking":"never","steroids":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/simplified-bishop":{"get":{"description":"Return the Laughon 2011 simplified Bishop score as the sum of three caller-assigned Bishop 1964 integers (dilation, station, effacement; each 0-3; max 9) and whether the score is >5.\n\nWhen an agent already has Bishop 1964 dilation, station, and effacement point integers and needs the published Laughon 2011 simplified total and the >5 favorable cut. magent does not examine the cervix or assign the three components from a narrative.\n\nNot a medical device and not a cervical exam, induction order, or labor-progress decision. magent does not examine the cervix.\n\nInputs are caller-assigned Bishop 1964 point integers (dilation 0-3, station 0-3, effacement 0-3), not centimeters, percent, or station in centimeters. Paper bins: dilation 0 / 1-2 / 3-4 / 5-6 cm; station -3 / -2 / -1 or 0 / +1 or +2; effacement 0-30 / 40-50 / 60-70 / 80%.\n\nSimplified total is 0-9 from three components only. magent does not add consistency or position and does not implement a cervical-length modified Bishop. Laughon 2011 compared simplified >5 with original Bishop >8 (PPV 87.7% in that paper). Score of 5 is not favorable. favorable is that published cut, not an obstetric-risk class. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"dilation","description":"Caller-assigned Bishop 1964 dilation points 0-3 (paper bins: 0 cm → 0; 1-2 cm → 1; 3-4 cm → 2; 5-6 cm → 3). magent does not measure dilation.","required":true,"schema":{"type":"integer"},"example":"3"},{"in":"query","name":"station","description":"Caller-assigned Bishop 1964 station points 0-3 (paper bins: -3 → 0; -2 → 1; -1 or 0 → 2; +1 or +2 → 3). magent does not assign station.","required":true,"schema":{"type":"integer"},"example":"2"},{"in":"query","name":"effacement","description":"Caller-assigned Bishop 1964 effacement points 0-3 (paper bins: 0-30% → 0; 40-50% → 1; 60-70% → 2; 80% → 3). magent does not measure effacement.","required":true,"schema":{"type":"integer"},"example":"2"}],"summary":"simplified Bishop score","operationId":"get_api_calc_simplified_bishop","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, favorable, components, citation, disclaimer."},"400":{"description":"invalid_simplified_bishop: Simplified Bishop inputs must be caller-assigned integers in the Bishop 1964 0-3 range for dilation, station, and effacement. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/simplified-bishop"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"simplified Bishop score (bulk)","operationId":"post_api_calc_simplified_bishop","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_simplified_bishop: Simplified Bishop inputs must be caller-assigned integers in the Bishop 1964 0-3 range for dilation, station, and effacement. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/simplified-bishop"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"dilation":"3","effacement":"2","station":"2"},{"dilation":"3","effacement":"2","station":"2"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/hcc-ld":{"get":{"description":"Apply the Citterio 2016 JAMA Surgery hierarchic three-class rule to caller-assigned portal hypertension, planned major hepatectomy, and MELD, and return risk low, intermediate, or high with the published liver-decompensation and liver-related mortality percents.\n\nWhen an agent already has caller-assigned portal hypertension, planned resection extent, and a MELD score, and needs the published Citterio 2016 HCC-resection decompensation class. magent does not compute MELD or HVPG.\n\nNot a medical device and not a diagnosis of hepatocellular carcinoma or liver decompensation.\n\nNot a surgical indication and not a transplant listing protocol.\n\nCitterio 2016 JAMA Surgery published classes only. High is portal hypertension plus major hepatectomy. Low is no portal hypertension, minor resection, and MELD ≤ 9. All other combinations are intermediate.\n\nportal_hypertension, major_hepatectomy, and meld are caller-assigned. magent does not measure HVPG, choose extent of resection, or compute MELD.\n\nNot ALBI. This tool does not implement Johnson 2015 albumin-bilirubin grade. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"portal_hypertension","description":"Clinically significant portal hypertension as assigned by the caller (Citterio 2016). true or false. magent does not measure HVPG or assign portal hypertension.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"major_hepatectomy","description":"Planned major hepatectomy as assigned by the caller (Citterio 2016). true or false. magent does not choose extent of resection.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"meld","description":"Caller-assigned MELD integer 6-40 (Citterio 2016). Low requires meld ≤ 9 when portal hypertension and major hepatectomy are both false. magent does not compute MELD.","required":true,"schema":{"type":"integer"},"example":"8"}],"summary":"HCC-LD","operationId":"get_api_calc_hcc_ld","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, portal_hypertension, major_hepatectomy, meld, risk, ld_rate_percent, liver_related_mortality_percent, criteria, citation, disclaimer."},"400":{"description":"invalid_meld_score: meld must be an integer from 6 to 40 (Citterio 2016 caller-assigned MELD; magent does not recompute MELD). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hcc-ld"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HCC-LD (bulk)","operationId":"post_api_calc_hcc_ld","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_meld_score: meld must be an integer from 6 to 40 (Citterio 2016 caller-assigned MELD; magent does not recompute MELD). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hcc-ld"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"major_hepatectomy":"false","meld":"8","portal_hypertension":"false"},{"major_hepatectomy":"false","meld":"8","portal_hypertension":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/race":{"get":{"description":"Sum Pérez de la Ossa 2014 Rapid Arterial oCclusion Evaluation (RACE) scale points from caller-assigned facial palsy, arm motor, leg motor, head and gaze deviation, and cortical signs (aphasia if right hemiparesis, agnosia if left) and return whether the total suggests large arterial occlusion (score ≥5).\n\nWhen an agent has caller-assigned Pérez de la Ossa 2014 RACE scale items and needs the published 0-9 total and score ≥5 LVO flag, not a stroke diagnosis, transfer order, or race-based equation.\n\nNot a medical device. magent does not examine the patient. Facial palsy, arm motor, leg motor, gaze deviation, hemiparesis side, and cortical points are caller-assigned Pérez de la Ossa 2014 integers.\n\nNot a stroke diagnosis and not a transfer or thrombolysis order.\n\nThis is the Rapid Arterial oCclusion Evaluation (RACE) scale, not a race-based or ethnicity equation. Cortical points are aphasia when hemiparesis_side is right and agnosia when left (Table 1).\n\nlvo_suggested is true iff score ≥ 5 (this paper's cutoff). Sensitivity, PPV, and other operating-point statistics are not returned. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"facial_palsy","description":"Caller-assigned Pérez de la Ossa 2014 RACE facial palsy (integer 0-2): 0 absent, 1 mild, 2 moderate to severe. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"arm_motor","description":"Caller-assigned Pérez de la Ossa 2014 RACE arm motor (integer 0-2): 0 normal to mild, 1 moderate, 2 severe. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"leg_motor","description":"Caller-assigned Pérez de la Ossa 2014 RACE leg motor (integer 0-2): 0 normal to mild, 1 moderate, 2 severe. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"gaze_deviation","description":"Caller-assigned Pérez de la Ossa 2014 RACE head and gaze deviation (integer 0-1): 0 absent, 1 present. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1]},"example":"0"},{"in":"query","name":"hemiparesis_side","description":"Caller-assigned hemiparesis side (right or left). Right scores cortical as aphasia (close eyes / make a fist). Left scores cortical as agnosia (recognizes arm and impairment). magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["right","left"]},"example":"right"},{"in":"query","name":"cortical","description":"Caller-assigned Pérez de la Ossa 2014 cortical points (integer 0-2). Right hemiparesis: aphasia, close eyes and make a fist (0 both, 1 one, 2 neither). Left hemiparesis: agnosia, recognizes arm and impairment (0 both, 1 one, 2 neither). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"}],"summary":"RACE scale","operationId":"get_api_calc_race","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, lvo_suggested, facial_palsy, arm_motor, leg_motor, gaze_deviation, hemiparesis_side, cortical, components, citation, disclaimer."},"400":{"description":"invalid_race: facial_palsy, arm_motor, and leg_motor 0-2; gaze_deviation 0-1; cortical 0-2 (Pérez de la Ossa 2014). Returned before settlement; you are not charged.; invalid_hemiparesis_side: hemiparesis_side must be right or left (Pérez de la Ossa 2014). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/race"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"RACE scale (bulk)","operationId":"post_api_calc_race","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_race: facial_palsy, arm_motor, and leg_motor 0-2; gaze_deviation 0-1; cortical 0-2 (Pérez de la Ossa 2014). Returned before settlement; you are not charged.; invalid_hemiparesis_side: hemiparesis_side must be right or left (Pérez de la Ossa 2014). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/race"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"arm_motor":"0","cortical":"0","facial_palsy":"0","gaze_deviation":"0","hemiparesis_side":"right","leg_motor":"0"},{"arm_motor":"0","cortical":"0","facial_palsy":"0","gaze_deviation":"0","hemiparesis_side":"right","leg_motor":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/allowable-blood-loss":{"get":{"description":"Compute Gross 1983 dilution-corrected allowable blood loss from a caller-supplied estimated blood volume and initial versus target hematocrit.\n\nWhen an agent needs published Gross ABL and must not invent milliliters, compute Nadler EBV inside this tool, or use the uncorrected EBV*(Hi-Hf)/Hi form.\n\nNot a transfusion trigger or order. magent does not choose a product, rate, or threshold.\n\nEstimated blood volume is caller-supplied. This tool does not compute Nadler EBV from height, weight, or sex.\n\nDilution-corrected Gross 1983 only. Not the uncorrected EBV * (Hi - Hf) / Hi form. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"estimated_blood_volume_ml","description":"Caller-supplied estimated blood volume in mL (50-15000). Required. magent does not compute Nadler EBV.","required":true,"schema":{"type":"number"},"example":"5000"},{"in":"query","name":"hct_initial_percent","description":"Initial hematocrit as a percent (10-70).","required":true,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"hct_target_percent","description":"Target hematocrit as a percent (10-70). Must be strictly less than hct_initial_percent.","required":true,"schema":{"type":"number"},"example":"30"}],"summary":"Allowable blood loss","operationId":"get_api_calc_allowable_blood_loss","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, estimated_blood_volume_ml, hct_initial_percent, hct_target_percent, abl_ml, citation, disclaimer."},"400":{"description":"invalid_estimated_blood_volume: estimated_blood_volume_ml must be a number from 50 to 15000. Returned before settlement; you are not charged.; invalid_hematocrit: hematocrit_percent must be a number from 10 to 70. Returned before settlement; you are not charged.; invalid_target_hematocrit: hct_target_percent must be 10-70 and strictly less than hct_initial_percent. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/allowable-blood-loss"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Allowable blood loss (bulk)","operationId":"post_api_calc_allowable_blood_loss","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_estimated_blood_volume: estimated_blood_volume_ml must be a number from 50 to 15000. Returned before settlement; you are not charged.; invalid_hematocrit: hematocrit_percent must be a number from 10 to 70. Returned before settlement; you are not charged.; invalid_target_hematocrit: hct_target_percent must be 10-70 and strictly less than hct_initial_percent. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/allowable-blood-loss"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"estimated_blood_volume_ml":"5000","hct_initial_percent":"40","hct_target_percent":"30"},{"estimated_blood_volume_ml":"5000","hct_initial_percent":"40","hct_target_percent":"30"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/piro-cap":{"get":{"description":"Sum the Rello 2009 PIRO features for ICU community-acquired pneumonia and return the 0-8 score and published band.\n\nWhen an agent has caller-assigned Rello 2009 PIRO inputs obtained within 24 h of ICU admission for community-acquired pneumonia and needs the published total and band, not CURB-65, PSI, or APACHE II.\n\nNot a medical device. Not a diagnosis of pneumonia and not a treatment, ICU-admission, or site-of-care order.\n\nRello 2009 PIRO for ICU CAP only (score obtained within 24 h of ICU admission). Not CURB-65, not PSI/PORT, not APACHE II.\n\nComorbidities (COPD or immunocompromise) count as one feature: 1 point if either is true, not 1 each.\n\nAge >70 scores 1; age 70 does not. magent does not interpret a chest radiograph; multilobar_opacities is a caller-assigned flag. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120). Age >70 scores 1 (Rello 2009). Age 70 does not score. magent does not compute age from a date of birth.","required":true,"schema":{"type":"integer"},"example":"75"},{"in":"query","name":"copd","description":"Chronic obstructive pulmonary disease as assigned by the caller (Rello 2009 comorbidity feature with immunocompromise). true or false. COPD or immunocompromise scores 1 together, not 1 each. magent does not diagnose COPD.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"immunocompromise","description":"Immunocompromise as assigned by the caller (Rello 2009 comorbidity feature with COPD). true or false. COPD or immunocompromise scores 1 together, not 1 each. magent does not assign immune status.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"multilobar_opacities","description":"Multilobar opacities on chest radiograph as assigned by the caller (Rello 2009). true or false. 1 point if true. magent does not interpret a chest radiograph.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"shock","description":"Shock as assigned by the caller (Rello 2009). true or false. 1 point if true. magent does not measure blood pressure or diagnose shock.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"severe_hypoxemia","description":"Severe hypoxemia as assigned by the caller (Rello 2009). true or false. 1 point if true. magent does not measure PaO2 or FiO2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"acute_renal_failure","description":"Acute renal failure as assigned by the caller (Rello 2009). true or false. 1 point if true. magent does not assay creatinine.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bacteremia","description":"Bacteremia as assigned by the caller (Rello 2009). true or false. 1 point if true. magent does not interpret cultures.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ards","description":"Acute respiratory distress syndrome as assigned by the caller (Rello 2009). true or false. 1 point if true. magent does not diagnose ARDS.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"PIRO-CAP","operationId":"get_api_calc_piro_cap","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, band, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/piro-cap"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PIRO-CAP (bulk)","operationId":"post_api_calc_piro_cap","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/piro-cap"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"acute_renal_failure":"false","age":"75","ards":"false","bacteremia":"false","copd":"false","immunocompromise":"false","multilobar_opacities":"true","severe_hypoxemia":"false","shock":"true"},{"acute_renal_failure":"false","age":"75","ards":"false","bacteremia":"false","copd":"false","immunocompromise":"false","multilobar_opacities":"true","severe_hypoxemia":"false","shock":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/imdc":{"get":{"description":"Sum the Heng 2009 IMDC adverse factors for metastatic RCC treated with VEGF-targeted agents and return favorable (0), intermediate (1–2), or poor (3–6). Heng 2009 reported 2-year OS 75% (median not reached), 53% (median 27 months), and 7% (median 8.8 months) in those groups.\n\nWhen an agent needs the published Heng 2009 IMDC point total and risk group and must not invent an RCC diagnosis or treatment recommendation, and must not assign KPS or compare labs to institutional LLN/ULN.\n\nNot a medical device and not an RCC diagnosis or treatment recommendation. magent does not examine the patient.\n\nHeng 2009 overall-survival figures are published cohort results, not a treatment choice.\n\nmagent does not assign Karnofsky performance status or compare hemoglobin, corrected calcium, neutrophils, or platelets to institutional LLN/ULN. All six inputs are caller-assigned flags. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"kps_lt_80","description":"Karnofsky performance status <80 as assigned by the caller (Heng 2009). true scores 1. magent does not assign KPS.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"diagnosis_to_treatment_lt_1_year","description":"Time from diagnosis to systemic treatment <1 year as assigned by the caller (Heng 2009). true scores 1. magent does not date the interval.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hemoglobin_lt_lln","description":"Hemoglobin below the institutional lower limit of normal as assigned by the caller (Heng 2009). true scores 1. magent does not assay hemoglobin or apply LLN.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"corrected_calcium_gt_uln","description":"Corrected calcium above the institutional upper limit of normal as assigned by the caller (Heng 2009). true scores 1. magent does not assay calcium or apply ULN.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"neutrophils_gt_uln","description":"Neutrophils above the institutional upper limit of normal as assigned by the caller (Heng 2009). true scores 1. magent does not assay ANC or apply ULN.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"platelets_gt_uln","description":"Platelets above the institutional upper limit of normal as assigned by the caller (Heng 2009). true scores 1. magent does not assay platelets or apply ULN.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"IMDC","operationId":"get_api_calc_imdc","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, imdc_band, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/imdc"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"IMDC (bulk)","operationId":"post_api_calc_imdc","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/imdc"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"corrected_calcium_gt_uln":"false","diagnosis_to_treatment_lt_1_year":"false","hemoglobin_lt_lln":"false","kps_lt_80":"false","neutrophils_gt_uln":"false","platelets_gt_uln":"false"},{"corrected_calcium_gt_uln":"false","diagnosis_to_treatment_lt_1_year":"false","hemoglobin_lt_lln":"false","kps_lt_80":"false","neutrophils_gt_uln":"false","platelets_gt_uln":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/hep":{"get":{"description":"Sum the Cuker 2010 HIT Expert Probability (HEP) eight clinical features with published signed integer weights and return the 2010 cutoff-2 and cutoff-5 operating points.\n\nWhen an agent has already applied the Cuker 2010 HEP table and needs the published signed total, not a 4Ts score, HIT antibody result, SRA, or ELISA.\n\nNot a medical device. Not a diagnosis of HIT.\n\nThis is the Cuker 2010 HEP score, not the 4Ts score (Lo 2006) and not a HIT antibody, SRA, or ELISA result.\n\nItems are caller-assigned from the published 2010 table. magent does not grade platelet counts, day of onset, or assay SRA/ELISA.\n\nCutoff 2 (100% sensitive / 60% specific vs expert panel) and cutoff 5 (86% / 88%) are 2010 operating-characteristic points, not a HIT diagnosis. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"magnitude","description":"Caller-assigned Cuker 2010 magnitude of platelet fall (peak to nadir since heparin exposure). lt_30 (<30%) scores -1; 30_to_50 (30-50%) scores 1; gt_50 (>50%) scores 3. magent does not grade platelet counts.","required":true,"schema":{"type":"string"},"example":"gt_50"},{"in":"query","name":"timing","description":"Caller-assigned Cuker 2010 timing. Typical-onset: typical_lt_4 (fall begins <4 days) -2; typical_day_4 (day 4) 2; typical_5_10 (days 5-10) 3; typical_11_14 (days 11-14) 2; typical_gt_14 (>14 days) -1. Rapid-onset after re-exposure within 100 days: rapid_lt_48h (<48 h) 2; rapid_gt_48h (>48 h) -1. magent does not infer day of onset.","required":true,"schema":{"type":"string"},"example":"typical_5_10"},{"in":"query","name":"nadir","description":"Caller-assigned Cuker 2010 nadir platelet count. le_20 (≤20 ×10^9/L) scores -2; gt_20 (>20 ×10^9/L) scores 2. magent does not take a raw platelet count.","required":true,"schema":{"type":"string"},"example":"gt_20"},{"in":"query","name":"thrombosis","description":"Caller-assigned Cuker 2010 thrombosis (select at most one). none scores 0. Typical-onset: typical_new_ge_4d (new VTE or ATE ≥4 days after heparin) 3; typical_progression (progression of preexisting VTE or ATE while receiving heparin) 2. Rapid-onset: rapid_new (new VTE or ATE after heparin) 3; rapid_progression 2.","required":true,"schema":{"type":"string"},"example":"typical_new_ge_4d"},{"in":"query","name":"skin_necrosis","description":"Skin necrosis at subcutaneous heparin injection sites (Cuker 2010). true scores 3; false scores 0. magent does not examine the skin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"systemic_reaction","description":"Acute systemic reaction after intravenous heparin bolus (Cuker 2010). true scores 2; false scores 0.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bleeding","description":"Presence of bleeding, petechiae, or extensive bruising (Cuker 2010). true scores -1; false scores 0.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"chronic_thrombocytopenia","description":"Presence of a chronic thrombocytopenic disorder (Cuker 2010 other causes; select all that apply). true scores -1. Mutually exclusive with no_other_cause true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"new_drug_thrombocytopenia","description":"Newly initiated non-heparin medication known to cause thrombocytopenia (Cuker 2010). true scores -2. Mutually exclusive with no_other_cause true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"severe_infection","description":"Severe infection as an other cause of thrombocytopenia (Cuker 2010). true scores -2. Mutually exclusive with no_other_cause true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"overt_dic","description":"Overt DIC as assigned by the caller (Cuker 2010: fibrinogen <100 mg/dL and D-dimer >5.0 μg/mL). true scores -2. magent does not assay fibrinogen or D-dimer. Mutually exclusive with no_other_cause true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"intra_arterial_device","description":"Indwelling intra-arterial device (Cuker 2010 examples: IABP, VAD, ECMO). true scores -2. Mutually exclusive with no_other_cause true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cpb_96h","description":"Cardiopulmonary bypass within the previous 96 hours (Cuker 2010). true scores -1. Mutually exclusive with no_other_cause true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"no_other_cause","description":"No other apparent cause of thrombocytopenia (Cuker 2010). true scores 3. Must be false if any other-cause flag is true.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"HEP score","operationId":"get_api_calc_hep","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, score_ge_2, score_ge_5, components, citation, disclaimer."},"400":{"description":"invalid_hep: HEP items must use Cuker 2010 Table point values (signed integers as published; not the 4Ts score). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hep"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HEP score (bulk)","operationId":"post_api_calc_hep","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_hep: HEP items must use Cuker 2010 Table point values (signed integers as published; not the 4Ts score). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hep"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bleeding":"false","chronic_thrombocytopenia":"false","cpb_96h":"false","intra_arterial_device":"false","magnitude":"gt_50","nadir":"gt_20","new_drug_thrombocytopenia":"false","no_other_cause":"true","overt_dic":"false","severe_infection":"false","skin_necrosis":"false","systemic_reaction":"false","thrombosis":"typical_new_ge_4d","timing":"typical_5_10"},{"bleeding":"false","chronic_thrombocytopenia":"false","cpb_96h":"false","intra_arterial_device":"false","magnitude":"gt_50","nadir":"gt_20","new_drug_thrombocytopenia":"false","no_other_cause":"true","overt_dic":"false","severe_infection":"false","skin_necrosis":"false","systemic_reaction":"false","thrombosis":"typical_new_ge_4d","timing":"typical_5_10"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/wound-class":{"get":{"description":"Return the caller-assigned CDC/HICPAC surgical wound class 1-4 with the published class label and Table 7 description (Mangram 1999). magent does not inspect the wound. Not SSI rates. Not AMP selection.\n\nWhen an agent already has a CDC/HICPAC surgical wound class 1-4 as assigned by the caller and needs the canonical label (e.g. I/Clean) and Mangram 1999 Table 7 wording. magent does not inspect the wound or assign the class. Not a diagnosis of infection and not antimicrobial prophylaxis selection.\n\nNot a medical device. Not a diagnosis of infection. Not antimicrobial prophylaxis (AMP) selection.\n\nThe caller assigns wound_class 1-4. magent does not inspect the wound.\n\nMangram 1999 Table 7 CDC/HICPAC surgical wound classification only. Does not invent SSI percentage rates (not in Table 7). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"wound_class","description":"CDC/HICPAC surgical wound class 1-4 as assigned by the caller (Mangram 1999 Table 7: 1 Class I/Clean, uninfected operative wound, no inflammation, respiratory/alimentary/genital/uninfected urinary tract not entered; 2 Class II/Clean-Contaminated, those tracts entered under controlled conditions without unusual contamination; 3 Class III/Contaminated, open fresh accidental wounds, major break in technique, GI spillage, or acute nonpurulent inflammation; 4 Class IV/Dirty-Infected, old traumatic wounds with retained devitalized tissue, existing clinical infection, or perforated viscera). Integer 1-4 only; reject 0, 5, 1.5, and roman I. magent does not inspect the wound. Not SSI rates. Not AMP selection.","required":true,"schema":{"type":"integer"},"example":"1"}],"summary":"Wound class","operationId":"get_api_calc_wound_class","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, wound_class, class_label, description, components, citation, disclaimer."},"400":{"description":"invalid_wound_class: wound_class must be 1, 2, 3, or 4 (Mangram 1999 CDC/HICPAC Table 7 Class I-IV). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/wound-class"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Wound class (bulk)","operationId":"post_api_calc_wound_class","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_wound_class: wound_class must be 1, 2, 3, or 4 (Mangram 1999 CDC/HICPAC Table 7 Class I-IV). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/wound-class"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"wound_class":"1"},{"wound_class":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/puqe":{"get":{"description":"Sum three caller-assigned Koren 2002 12-hour PUQE items (nausea_duration, vomiting_episodes, retching_episodes; each integer 1-5) and return the published 3-15 total. Does not apply later 24-hour, trimester-long, or 3-6 / 7-12 / ≥13 cuts.\n\nWhen an agent already has Koren 2002 last-12-hour 1-5 integers for nausea duration, vomiting episodes, and retching episodes and needs the published total. magent does not interview the patient, order an antiemetic, or score a later 24-hour or trimester-long form.\n\nNot a medical device and not an antiemetic order.\n\nEach of the three items is a caller-assigned integer 1-5 from the Koren 2002 last-12-hour table. magent does not interview the patient.\n\nThis is Koren 2002 12-hour PUQE only (nausea duration, vomiting episodes, retching episodes; total 3-15). magent does not score later 24-hour or trimester-long forms.\n\nKoren 2002 published no 3-6 / 7-12 / ≥13 total-score severity bands. This tool returns score and max_score only. It does not apply later website or review cuts. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"nausea_duration","description":"Caller-assigned Koren 2002 PUQE nausea duration in the last 12 hours (integer 1-5): 1 not at all; 2 1 hour or less; 3 2-3 hours; 4 4-6 hours; 5 more than 6 hours. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"vomiting_episodes","description":"Caller-assigned Koren 2002 PUQE vomiting episodes in the last 12 hours (integer 1-5): 1 did not throw up; 2 1-2 times; 3 3-4 times; 4 5-6 times; 5 7 or more times. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"retching_episodes","description":"Caller-assigned Koren 2002 PUQE retching or dry heaves without bringing anything up in the last 12 hours (integer 1-5): 1 no time; 2 1-2 times; 3 3-4 times; 4 5-6 times; 5 7 or more times. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"1"}],"summary":"PUQE","operationId":"get_api_calc_puqe","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_puqe: PUQE inputs must match Koren 2002 nausea duration, vomiting episodes, and retching episodes from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/puqe"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PUQE (bulk)","operationId":"post_api_calc_puqe","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_puqe: PUQE inputs must match Koren 2002 nausea duration, vomiting episodes, and retching episodes from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/puqe"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"nausea_duration":"1","retching_episodes":"1","vomiting_episodes":"1"},{"nausea_duration":"1","retching_episodes":"1","vomiting_episodes":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/sins":{"get":{"description":"Sum the Fisher 2010 Spinal Instability Neoplastic Score from six caller-assigned items and return the published 0–18 integer total. Not later SOSG stability strata and not an operative order.\n\nWhen an agent has already assigned Fisher 2010 SINS items for neoplastic spinal disease and needs the published integer sum, not TLICS (trauma), not an operative order, and not later SOSG 0–6 / 7–12 / 13–18 stability strata.\n\nNot a medical device. magent does not read imaging. Location, pain, bone lesion quality, alignment, vertebral body collapse, and posterolateral involvement are caller-assigned.\n\nNot an operative order. The returned value is the Fisher 2010 integer sum only.\n\nNot TLICS. This tool is the Spine Oncology Study Group neoplastic score, not Vaccaro 2005 trauma classification.\n\nFisher 2010 Table 8 sum only (max 18). magent does not apply later SOSG stability strata (0–6 / 7–12 / 13–18). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"location","description":"Caller-assigned SINS location (Fisher 2010 Table 8). junctional (occiput-C2, C7–T2, T11–L1, L5–S1) scores 3; mobile (C3–C6, L2–L4) scores 2; semirigid (T3–T10) scores 1; rigid (S2–S5) scores 0. magent does not read imaging.","required":true,"schema":{"type":"string","enum":["junctional","mobile","semirigid","rigid"]},"example":"rigid"},{"in":"query","name":"pain","description":"Caller-assigned pain (Fisher 2010): pain relief with recumbency and/or pain with movement/loading. mechanical (yes) scores 3; occasional_not_mechanical (occasional pain but not mechanical) scores 1; pain_free scores 0. magent does not interview the patient.","required":true,"schema":{"type":"string","enum":["mechanical","occasional_not_mechanical","pain_free"]},"example":"pain_free"},{"in":"query","name":"bone","description":"Caller-assigned bone lesion quality (Fisher 2010). lytic scores 2; mixed scores 1; blastic scores 0. magent does not read imaging.","required":true,"schema":{"type":"string","enum":["lytic","mixed","blastic"]},"example":"blastic"},{"in":"query","name":"alignment","description":"Caller-assigned radiographic spinal alignment (Fisher 2010). subluxation_translation scores 4; de_novo_deformity (kyphosis/scoliosis) scores 2; normal scores 0. magent does not read imaging.","required":true,"schema":{"type":"string","enum":["subluxation_translation","de_novo_deformity","normal"]},"example":"normal"},{"in":"query","name":"collapse","description":"Caller-assigned vertebral body collapse (Fisher 2010). gt_50 (>50% collapse) scores 3; le_50 (≤50% collapse) scores 2; no_collapse_gt_50pct_body (no collapse with >50% body involved) scores 1; none scores 0. magent does not read imaging.","required":true,"schema":{"type":"string","enum":["gt_50","le_50","no_collapse_gt_50pct_body","none"]},"example":"none"},{"in":"query","name":"posterolateral","description":"Caller-assigned posterolateral involvement of spinal elements (facet, pedicle, or costovertebral joint fracture or replacement with tumor; Fisher 2010). bilateral scores 3; unilateral scores 1; none scores 0. magent does not read imaging.","required":true,"schema":{"type":"string","enum":["bilateral","unilateral","none"]},"example":"none"}],"summary":"SINS","operationId":"get_api_calc_sins","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, location, pain, bone, alignment, collapse, posterolateral, components, citation, disclaimer."},"400":{"description":"invalid_sins: SINS items must use Fisher 2010 values (location junctional/mobile/semirigid/rigid; pain mechanical/occasional_not_mechanical/pain_free; bone lytic/mixed/blastic; alignment subluxation_translation/de_novo_deformity/normal; collapse gt_50/le_50/no_collapse_gt_50pct_body/none; posterolateral bilateral/unilateral/none). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sins"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SINS (bulk)","operationId":"post_api_calc_sins","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_sins: SINS items must use Fisher 2010 values (location junctional/mobile/semirigid/rigid; pain mechanical/occasional_not_mechanical/pain_free; bone lytic/mixed/blastic; alignment subluxation_translation/de_novo_deformity/normal; collapse gt_50/le_50/no_collapse_gt_50pct_body/none; posterolateral bilateral/unilateral/none). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sins"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"alignment":"normal","bone":"blastic","collapse":"none","location":"rigid","pain":"pain_free","posterolateral":"none"},{"alignment":"normal","bone":"blastic","collapse":"none","location":"rigid","pain":"pain_free","posterolateral":"none"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/truelove-witts":{"get":{"description":"Apply the Truelove and Witts 1955 ulcerative colitis severity table and return mild, moderately_severe, or severe from stools_per_day and five caller-assigned flags.\n\nWhen an agent already has the 1955 stool count and blood/systemic flags and needs that paper's mild / moderately severe / severe classification. magent does not examine the patient.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose ulcerative colitis or assign a treatment order.\n\nThe caller assigns stools_per_day and each blood/systemic flag from the 1955 mild and severe columns. magent does not examine the patient or measure temperature, pulse, haemoglobin, or ESR.\n\nThis tool is the 1955 BMJ table only (mild: four or less motions a day, no more than small amounts of macroscopic blood, no fever, no tachycardia, anaemia not severe, ESR not above 30 mm in one hour; severe: six or more motions with macroscopic blood and systemic upset). Moderately severe is intermediate. Not Mayo UC. Not PUCAI. Not later ASUC restatements that use haemoglobin 10.5 g/dL as the anaemia cut. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"stools_per_day","description":"Number of stools (motions) per day as assigned by the caller (integer 0-40). The 1955 mild column is four or less; the severe column is six or more. magent does not count stools.","required":true,"schema":{"type":"integer"},"example":"2"},{"in":"query","name":"macroscopic_blood","description":"Macroscopic blood in stools as in the 1955 severe column (with macroscopic blood). true or false as assigned by the caller. The 1955 mild column allows no more than small amounts; assign false when blood is absent or no more than small amounts. magent does not examine the stool.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"fever","description":"Fever as assigned by the caller using the 1955 definition: mean evening temperature more than 99.5 F (37.5 C), or a temperature of 100 F (37.8 C) or more on at least two days out of four. true or false. magent does not measure temperature.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"tachycardia","description":"Tachycardia as assigned by the caller using the 1955 definition: mean pulse rate more than 90 per minute. true or false. magent does not measure pulse.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"anemia","description":"Anaemia as assigned by the caller using the 1955 definition: haemoglobin 75% or less, allowance made for recent transfusion. true or false. Not the later 10.5 g/dL restatement. magent does not measure haemoglobin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"esr_raised","description":"E.S.R. much raised as assigned by the caller using the 1955 definition: more than 30 mm in one hour. true or false. magent does not measure ESR.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Truelove and Witts","operationId":"get_api_calc_truelove_witts","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, severity, stools_per_day, systemic_features_met, criteria, citation, disclaimer."},"400":{"description":"invalid_truelove_stools: stools_per_day must be an integer from 0 to 40 (Truelove and Witts 1955). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/truelove-witts"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Truelove and Witts (bulk)","operationId":"post_api_calc_truelove_witts","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_truelove_stools: stools_per_day must be an integer from 0 to 40 (Truelove and Witts 1955). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/truelove-witts"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"anemia":"false","esr_raised":"false","fever":"false","macroscopic_blood":"false","stools_per_day":"2","tachycardia":"false"},{"anemia":"false","esr_raised":"false","fever":"false","macroscopic_blood":"false","stools_per_day":"2","tachycardia":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ibw":{"get":{"description":"Compute Devine ideal body weight and 0.4 adjusted body weight from height, sex, and actual weight.\n\nWhen a label or protocol still cites Devine IBW or 0.4 AdjBW and an agent must not invent the kilograms.\n\nNot a dosing recommendation. magent does not apply IBW to Cockcroft–Gault unless you call CrCl separately with that weight.\n\nDevine is undefined below 60 inches in the original table; this implementation still evaluates the linear formula. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"height_cm","description":"Height in centimeters. Provide height_cm or height_in.","required":false,"schema":{"type":"number"},"example":"177.8"},{"in":"query","name":"height_in","description":"Height in inches. Devine uses inches: IBW adds 2.3 kg per inch over 60.","required":false,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"sex","description":"Sex used by Devine (50 kg male, 45.5 kg female base).","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"weight_kg","description":"Actual total body weight in kilograms. Provide weight_kg or weight_lb.","required":false,"schema":{"type":"number"},"example":"90"},{"in":"query","name":"weight_lb","description":"Actual total body weight in pounds.","required":false,"schema":{"type":"number"},"example":"198"}],"summary":"Devine IBW","operationId":"get_api_calc_ibw","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, sex, height_cm, height_in, actual_weight_kg, ibw_kg, adjbw_kg, adjbw_factor, citation, disclaimer."},"400":{"description":"invalid_height: height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ibw"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Devine IBW (bulk)","operationId":"post_api_calc_ibw","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_height: height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ibw"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"height_in":"70","sex":"male","weight_kg":"90"},{"height_in":"70","sex":"male","weight_kg":"90"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/news":{"get":{"description":"Compute the RCP 2012 National Early Warning Score from respiratory rate, SpO2, supplemental oxygen, temperature, systolic BP, heart rate, and caller-assigned AVPU.\n\nWhen an agent needs the published RCP NEWS 2012 Chart 1 total and Chart 2 clinical risk and must not substitute NEWS2 or treat the score as an ICU-admission order.\n\nNot a medical device and not an ICU-admission, HDU, or monitoring order. magent does not examine the patient.\n\nThis is RCP NEWS 2012 Chart 1 only. It is not NEWS2 (2017), Scale 2 oxygen saturations, or new-confusion scoring.\n\nAVPU is caller-assigned (alert, voice, pain, or unresponsive). Voice, pain, and unresponsive each score 3. magent does not compute GCS here.\n\nTemperature is in °C as published. magent does not convert Fahrenheit.\n\nclinical_risk follows RCP 2012 Chart 2 (low / medium / high). A single parameter scoring 3 is a RED score and is medium unless the aggregate is ≥7 (high). It is not an ICU-admission order. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"systolic_mm_hg","description":"Systolic blood pressure in mm Hg (integer 0-300). RCP NEWS 2012 Chart 1: ≤90 → 3, 91-100 → 2, 101-110 → 1, 111-219 → 0, ≥220 → 3.","required":true,"schema":{"type":"integer"},"example":"120"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats/min (integer 30-220). RCP NEWS 2012 Chart 1: ≤40 → 3, 41-50 → 1, 51-90 → 0, 91-110 → 1, 111-130 → 2, ≥131 → 3.","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"respiratory_rate","description":"Respiratory rate in breaths/min (integer 0-80). RCP NEWS 2012 Chart 1: ≤8 → 3, 9-11 → 1, 12-20 → 0, 21-24 → 2, ≥25 → 3.","required":true,"schema":{"type":"integer"},"example":"16"},{"in":"query","name":"temperature_c","description":"Temperature in °C (30.0-45.0). RCP NEWS 2012 Chart 1: ≤35.0 → 3, 35.1-36.0 → 1, 36.1-38.0 → 0, 38.1-39.0 → 1, ≥39.1 → 2. magent does not convert Fahrenheit.","required":true,"schema":{"type":"number"},"example":"37.0"},{"in":"query","name":"spo2_percent","description":"Oxygen saturation percent (50-100). RCP NEWS 2012 Chart 1 Scale 1: ≤91 → 3, 92-93 → 2, 94-95 → 1, ≥96 → 0. Not NEWS2 Scale 2.","required":true,"schema":{"type":"number"},"example":"98"},{"in":"query","name":"supplemental_oxygen","description":"Any supplemental oxygen as assigned by the caller (true or false). RCP NEWS 2012 Chart 1: true → 2, false → 0.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"avpu","description":"Caller-assigned AVPU (alert, voice, pain, or unresponsive). RCP NEWS 2012 Chart 1: alert → 0; voice, pain, or unresponsive → 3 each. magent does not compute GCS here.","required":true,"schema":{"type":"string","enum":["alert","voice","pain","unresponsive"]},"example":"alert"}],"summary":"NEWS","operationId":"get_api_calc_news","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, clinical_risk, red_score, systolic_mm_hg, heart_rate_bpm, respiratory_rate, temperature_c, spo2_percent, supplemental_oxygen, avpu, components, citation, disclaimer."},"400":{"description":"invalid_rts_systolic: systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_rts_respiratory_rate: respiratory_rate must be an integer from 0 to 80. Returned before settlement; you are not charged.; invalid_temperature: temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_news_avpu: avpu must be alert, voice, pain, or unresponsive (RCP NEWS 2012). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/news"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"NEWS (bulk)","operationId":"post_api_calc_news","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rts_systolic: systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_rts_respiratory_rate: respiratory_rate must be an integer from 0 to 80. Returned before settlement; you are not charged.; invalid_temperature: temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_news_avpu: avpu must be alert, voice, pain, or unresponsive (RCP NEWS 2012). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/news"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"avpu":"alert","heart_rate_bpm":"70","respiratory_rate":"16","spo2_percent":"98","supplemental_oxygen":"false","systolic_mm_hg":"120","temperature_c":"37.0"},{"avpu":"alert","heart_rate_bpm":"70","respiratory_rate":"16","spo2_percent":"98","supplemental_oxygen":"false","systolic_mm_hg":"120","temperature_c":"37.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/gps":{"get":{"description":"Apply the Forrest 2003 original Glasgow Prognostic Score (GPS) from caller-supplied CRP in mg/L and albumin.\n\nWhen an agent has CRP in mg/L and albumin and needs the published Forrest 2003 original GPS (0–2), not mGPS, not hs-mGPS, and not a cancer diagnosis or treatment order.\n\nNot a medical device. magent does not examine the patient and does not assay CRP or albumin.\n\nThis is Forrest 2003 original GPS only. Isolated hypoalbuminaemia scores 1. It is not mGPS (which scores hypoalbuminaemia alone as 0) and not hs-mGPS.\n\nNot a cancer diagnosis or treatment order. Does not return survival months or percents. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"crp_mg_l","description":"C-reactive protein in mg/L (0-500), not mg/dL. Forrest 2003 elevated CRP is >10 mg/L. CRP = 10 is not elevated. magent does not assay CRP.","required":true,"schema":{"type":"number"},"example":"5"},{"in":"query","name":"albumin_g_l","description":"Serum albumin in g/L (10-60). Provide this or albumin_g_dl, not both. Forrest 2003 hypoalbuminaemia is <35 g/L (35 is not low). Isolated hypoalbuminaemia scores GPS 1. magent does not assay albumin.","required":false,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"albumin_g_dl","description":"Serum albumin in g/dL (1-6). Converted as g/L = g/dL × 10. Provide this or albumin_g_l, not both.","required":false,"schema":{"type":"number"},"example":"4.0"}],"summary":"GPS","operationId":"get_api_calc_gps","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, crp_mg_l, albumin_g_l, gps, citation, disclaimer."},"400":{"description":"invalid_crp: crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gps"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"GPS (bulk)","operationId":"post_api_calc_gps","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_crp: crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gps"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"albumin_g_l":"40","crp_mg_l":"5"},{"albumin_g_l":"40","crp_mg_l":"5"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pregnancy-due-dates":{"get":{"description":"Return ACOG Committee Opinion 700 Naegele estimated due date in days from a certain last menstrual period, adjusting the 280-day interval when cycle length is not 28 days.\n\nWhen an agent already has numeric days since LMP and cycle length and must not treat the result as a dating ultrasound, imaging interpretation, or a delivery date order.\n\nNot a medical device. Not a dating ultrasound. magent does not interpret imaging. Not a delivery date order.\n\nInputs are numeric days_since_lmp (0-294 inclusive) and cycle_length_days (21-35 inclusive). Those ranges are magent clamps; ACOG 700 publishes the 280-day Naegele interval and cycle-length adjustment, not those input bands. No calendar dates or names.\n\nFor a certain LMP and a 28-day cycle, EDD is 280 days from the first day of the LMP (Naegele as used by ACOG 700). When cycle_length_days is not 28, edd_days_from_lmp = 280 + (cycle_length_days - 28). gestational_age_days = days_since_lmp. days_until_edd may be negative if past EDD.\n\nACOG 700 Table 1 ultrasound redating discrepancies are not applied. magent implements LMP and cycle-length conversion only and does not redate from imaging.\n\nCaller supplies days since LMP and cycle length. magent does not take a menstrual history or assign a delivery date. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"days_since_lmp","description":"Completed days since the first day of a certain last menstrual period (integer 0-294 inclusive). magent clamp; ACOG 700 publishes the 280-day Naegele interval, not this input band. Numeric days only. Not a calendar date.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"cycle_length_days","description":"Usual cycle length in days (integer 21-35 inclusive). magent clamp; ACOG 700 adjusts the 280-day interval by (cycle_length_days - 28) and does not publish this input band. 28 is the Naegele reference cycle.","required":true,"schema":{"type":"integer"},"example":"28"}],"summary":"Pregnancy due date from LMP","operationId":"get_api_calc_pregnancy_due_dates","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, days_since_lmp, cycle_length_days, edd_days_from_lmp, gestational_age_days, days_until_edd, citation, disclaimer."},"400":{"description":"invalid_due_date: Due-date inputs must match ACOG Committee Opinion 700 cycle length and days since LMP from that opinion. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pregnancy-due-dates"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Pregnancy due date from LMP (bulk)","operationId":"post_api_calc_pregnancy_due_dates","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_due_date: Due-date inputs must match ACOG Committee Opinion 700 cycle length and days since LMP from that opinion. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pregnancy-due-dates"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"cycle_length_days":"28","days_since_lmp":"0"},{"cycle_length_days":"28","days_since_lmp":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/priest":{"get":{"description":"Sum the Goodacre 2021 PRIEST points from NEWS2 Chart 1 Scale 1 vitals, alertness, inspired oxygen, age, sex, and performance status, and return whether the total is ≤4.\n\nWhen an agent already has NEWS2 Scale 1 vitals, age, sex, and performance and needs the published Goodacre 2021 PRIEST total and the ≤4 low adverse-outcome flag, not NEWS2, 4C, or an admission order.\n\nNot a medical device and not an admission, discharge, or treatment order. magent does not measure vitals or examine the patient.\n\nSpO2 uses NEWS2 Chart 1 Scale 1 only. magent does not implement NEWS2 SpO2 Scale 2 (prescribed 88-92% target in hypercapnic respiratory failure).\n\nThis is not NEWS2 and not the ISARIC 4C Mortality Score. Alertness is caller-assigned alert (0) or confused_or_not_alert (3); it is not full ACVPU and not GCS.\n\nAge is 16-120 years as published for PRIEST adults. Age 80 scores 3; age >80 scores 4.\n\nlow_adverse_outcome_risk is true only when the total is ≤4 (Goodacre 2021: scores of four or less). magent does not invent named high-risk groups or mortality percents. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_years","description":"Age in years (integer 16-120). Goodacre 2021 PRIEST: 16-49 → 0; 50-65 → 2; 66-80 → 3; >80 → 4. Age 80 scores 3; age 81 scores 4.","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"sex","description":"Sex (female or male). Goodacre 2021 PRIEST: female → 0; male → 1.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"respiratory_rate","description":"Respiratory rate in breaths/min (integer 0-80). NEWS2 Chart 1 Scale 1 as used in PRIEST: 12-20 → 0; 9-11 → 1; 21-24 → 2; <9 or >24 → 3.","required":true,"schema":{"type":"integer"},"example":"16"},{"in":"query","name":"spo2_percent","description":"Oxygen saturation percent (50-100). NEWS2 Chart 1 Scale 1 only: >95 → 0; 94-95 → 1; 92-93 → 2; <92 → 3. magent does not implement NEWS2 SpO2 Scale 2.","required":true,"schema":{"type":"number"},"example":"98"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats/min (integer 30-220). NEWS2 Chart 1: 51-90 → 0; 41-50 or 91-110 → 1; 111-130 → 2; <41 or >130 → 3.","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"systolic_mm_hg","description":"Systolic blood pressure in mm Hg (integer 0-300). NEWS2 Chart 1: 111-219 → 0; 101-110 → 1; 91-100 → 2; <91 or >219 → 3.","required":true,"schema":{"type":"integer"},"example":"120"},{"in":"query","name":"temperature_c","description":"Temperature in °C (30.0-45.0). NEWS2 Chart 1: 36.1-38.0 → 0; 35.1-36.0 or 38.1-39.0 → 1; >39.0 → 2; <35.1 → 3. magent does not convert Fahrenheit.","required":true,"schema":{"type":"number"},"example":"37.0"},{"in":"query","name":"alertness","description":"Caller-assigned alertness (alert or confused_or_not_alert). Goodacre 2021 PRIEST: alert → 0; confused_or_not_alert → 3. Not full ACVPU and not GCS.","required":true,"schema":{"type":"string","enum":["alert","confused_or_not_alert"]},"example":"alert"},{"in":"query","name":"supplemental_oxygen","description":"Any supplemental oxygen as assigned by the caller (true or false). NEWS2 Chart 1 inspired oxygen: air/false → 0; supplemental/true → 2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"performance_status","description":"Caller-assigned performance (unrestricted, limited_strenuous, limited_activity, limited_self_care, or bed_chair_bound). Goodacre 2021: unrestricted → 0; limited strenuous activity, can do light activity → 1; limited activity, can self-care → 2; limited self-care → 3; bed/chair bound, no self-care → 4.","required":true,"schema":{"type":"string","enum":["unrestricted","limited_strenuous","limited_activity","limited_self_care","bed_chair_bound"]},"example":"unrestricted"}],"summary":"PRIEST","operationId":"get_api_calc_priest","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, low_adverse_outcome_risk, age_years, sex, respiratory_rate, spo2_percent, heart_rate_bpm, systolic_mm_hg, temperature_c, alertness, supplemental_oxygen, performance_status, components, citation, disclaimer."},"400":{"description":"invalid_priest_age: age_years must be an integer from 16 to 120 (Goodacre 2021 PRIEST adults). Returned before settlement; you are not charged.; invalid_priest_performance: performance_status must be unrestricted, limited_strenuous, limited_activity, limited_self_care, or bed_chair_bound (Goodacre 2021 PRIEST). Returned before settlement; you are not charged.; invalid_priest_alertness: alertness must be alert or confused_or_not_alert (Goodacre 2021 PRIEST). Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_rts_respiratory_rate: respiratory_rate must be an integer from 0 to 80. Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_temperature: temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.; invalid_rts_systolic: systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/priest"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PRIEST (bulk)","operationId":"post_api_calc_priest","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_priest_age: age_years must be an integer from 16 to 120 (Goodacre 2021 PRIEST adults). Returned before settlement; you are not charged.; invalid_priest_performance: performance_status must be unrestricted, limited_strenuous, limited_activity, limited_self_care, or bed_chair_bound (Goodacre 2021 PRIEST). Returned before settlement; you are not charged.; invalid_priest_alertness: alertness must be alert or confused_or_not_alert (Goodacre 2021 PRIEST). Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_rts_respiratory_rate: respiratory_rate must be an integer from 0 to 80. Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_temperature: temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.; invalid_rts_systolic: systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/priest"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_years":"70","alertness":"alert","heart_rate_bpm":"70","performance_status":"unrestricted","respiratory_rate":"16","sex":"male","spo2_percent":"98","supplemental_oxygen":"false","systolic_mm_hg":"120","temperature_c":"37.0"},{"age_years":"70","alertness":"alert","heart_rate_bpm":"70","performance_status":"unrestricted","respiratory_rate":"16","sex":"male","spo2_percent":"98","supplemental_oxygen":"false","systolic_mm_hg":"120","temperature_c":"37.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/bishop":{"get":{"description":"Return the Bishop 1964 pelvic score as the sum of five caller-assigned integer components (dilation, effacement, station, consistency, position).\n\nWhen an agent already has Bishop 1964 component points and needs the published total. magent does not examine the cervix or assign the five components from a narrative.\n\nNot a medical device and not a cervical exam, induction order, or labor-progress decision. magent does not examine the cervix.\n\nInputs are caller-assigned Bishop 1964 point integers (dilation 0-3, effacement 0-3, station 0-3, consistency 0-2, position 0-2), not centimeters, percent, or station in centimeters. Paper bins: dilation 0 / 1-2 / 3-4 / 5-6 cm; effacement 0-30 / 40-50 / 60-70 / 80%; station -3 / -2 / -1 or 0 / +1 or +2; consistency firm/medium/soft; position posterior/mid/anterior.\n\nBishop 1964 total is 0-13. magent does not add later favorable/unfavorable cutoffs, modified Bishop, cervical length, or nulliparous extensions. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"dilation","description":"Caller-assigned Bishop 1964 dilation points 0-3 (paper bins: 0 cm → 0; 1-2 cm → 1; 3-4 cm → 2; 5-6 cm → 3). magent does not measure dilation.","required":true,"schema":{"type":"integer"},"example":"2"},{"in":"query","name":"effacement","description":"Caller-assigned Bishop 1964 effacement points 0-3 (paper bins: 0-30% → 0; 40-50% → 1; 60-70% → 2; 80% → 3). magent does not measure effacement.","required":true,"schema":{"type":"integer"},"example":"2"},{"in":"query","name":"station","description":"Caller-assigned Bishop 1964 station points 0-3 (paper bins: -3 → 0; -2 → 1; -1 or 0 → 2; +1 or +2 → 3). magent does not assign station.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"consistency","description":"Caller-assigned Bishop 1964 consistency points 0-2 (paper bins: firm → 0; medium → 1; soft → 2). magent does not palpate the cervix.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"position","description":"Caller-assigned Bishop 1964 position points 0-2 (paper bins: posterior → 0; mid → 1; anterior → 2). magent does not examine cervical position.","required":true,"schema":{"type":"integer"},"example":"1"}],"summary":"Bishop score","operationId":"get_api_calc_bishop","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_bishop: Bishop 1964 components: dilation 0-3, effacement 0-3, station 0-3, consistency 0-2, position 0-2 (caller-assigned points). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bishop"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Bishop score (bulk)","operationId":"post_api_calc_bishop","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_bishop: Bishop 1964 components: dilation 0-3, effacement 0-3, station 0-3, consistency 0-2, position 0-2 (caller-assigned points). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bishop"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"consistency":"1","dilation":"2","effacement":"2","position":"1","station":"1"},{"consistency":"1","dilation":"2","effacement":"2","position":"1","station":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-ii-ibs":{"get":{"description":"Apply the Thompson 1999 Rome II IBS diagnostic criteria and return supporting_features_met (0-3) and whether the published IBS box holds (rome_ii_ibs).\n\nWhen an agent already has the four caller-assigned Rome II IBS flags as in Thompson 1999 and needs whether the published IBS box holds. magent does not examine the patient.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose irritable bowel syndrome.\n\nThe caller assigns the four flags. magent does not examine the patient.\n\nThis tool is the Thompson 1999 Rome II IBS diagnostic box only. Not Rome III (pain or discomfort at least 3 days per month), not Rome IV (pain at least 1 day per week), not Manning criteria, and not IBS-C/D/M subtype. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"pain_or_discomfort_12_weeks_of_12_months","description":"At least 12 weeks (need not be consecutive) in the preceding 12 months of abdominal discomfort or pain (Thompson 1999). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"relieved_with_defecation","description":"Abdominal discomfort or pain relieved with defecation (one of three supporting features; at least two required). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"onset_change_stool_frequency","description":"Onset associated with a change in frequency of stool (one of three supporting features; at least two required). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"onset_change_stool_form","description":"Onset associated with a change in form (appearance) of stool (one of three supporting features; at least two required). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Rome II IBS","operationId":"get_api_calc_rome_ii_ibs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, supporting_features_met, rome_ii_ibs, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-ii-ibs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome II IBS (bulk)","operationId":"post_api_calc_rome_ii_ibs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-ii-ibs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"onset_change_stool_form":"false","onset_change_stool_frequency":"true","pain_or_discomfort_12_weeks_of_12_months":"true","relieved_with_defecation":"true"},{"onset_change_stool_form":"false","onset_change_stool_frequency":"true","pain_or_discomfort_12_weeks_of_12_months":"true","relieved_with_defecation":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ciwa-ar":{"get":{"description":"Sum the ten Sullivan 1989 CIWA-Ar items (nine caller-assigned 0-7 plus orientation 0-4) and return the published total (max 67).\n\nWhen an agent has already assigned Sullivan 1989 item integers and needs the published CIWA-Ar total, not a later benzodiazepine protocol cutoff.\n\nNot a diagnosis and not a benzodiazepine, symptom-triggered, or treatment order.\n\nItems are caller-assigned Sullivan 1989 integers. magent does not observe the patient.\n\nNine items (nausea_vomiting, tremor, paroxysmal_sweats, anxiety, agitation, tactile, auditory, visual, headache) are 0-7. orientation is 0-4 and is not a 0-7 item.\n\nSullivan 1989 published the instrument and item ranges only. magent does not apply later protocol treatment cutoffs. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"nausea_vomiting","description":"Caller-assigned Sullivan 1989 nausea and vomiting points (integer 0-7). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"tremor","description":"Caller-assigned Sullivan 1989 tremor points (integer 0-7). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"paroxysmal_sweats","description":"Caller-assigned Sullivan 1989 paroxysmal sweats points (integer 0-7). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"anxiety","description":"Caller-assigned Sullivan 1989 anxiety points (integer 0-7). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"agitation","description":"Caller-assigned Sullivan 1989 agitation points (integer 0-7). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"tactile","description":"Caller-assigned Sullivan 1989 tactile disturbances points (integer 0-7). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"auditory","description":"Caller-assigned Sullivan 1989 auditory disturbances points (integer 0-7). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"visual","description":"Caller-assigned Sullivan 1989 visual disturbances points (integer 0-7). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"headache","description":"Caller-assigned Sullivan 1989 headache / fullness in head points (integer 0-7). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"orientation","description":"Caller-assigned Sullivan 1989 orientation and clouding of sensorium (integer 0-4). This item is not 0-7. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"CIWA-Ar","operationId":"get_api_calc_ciwa_ar","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_ciwa_item: nausea_vomiting, tremor, paroxysmal_sweats, anxiety, agitation, tactile, auditory, visual, and headache must each be an integer from 0 to 7 (Sullivan 1989). Returned before settlement; you are not charged.; invalid_ciwa_orientation: orientation must be an integer from 0 to 4 (Sullivan 1989). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ciwa-ar"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CIWA-Ar (bulk)","operationId":"post_api_calc_ciwa_ar","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ciwa_item: nausea_vomiting, tremor, paroxysmal_sweats, anxiety, agitation, tactile, auditory, visual, and headache must each be an integer from 0 to 7 (Sullivan 1989). Returned before settlement; you are not charged.; invalid_ciwa_orientation: orientation must be an integer from 0 to 4 (Sullivan 1989). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ciwa-ar"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"agitation":"0","anxiety":"0","auditory":"0","headache":"0","nausea_vomiting":"0","orientation":"0","paroxysmal_sweats":"0","tactile":"0","tremor":"0","visual":"0"},{"agitation":"0","anxiety":"0","auditory":"0","headache":"0","nausea_vomiting":"0","orientation":"0","paroxysmal_sweats":"0","tactile":"0","tremor":"0","visual":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/must":{"get":{"description":"Sum Stratton 2004 MUST (BMI, unplanned weight-loss percent, and acute disease with no nutritional intake >5 days) and return score 0–6 with risk low, medium, or high.\n\nWhen an agent has caller-supplied adult BMI and unplanned weight-loss percent and needs the published MUST point total and risk band, not a malnutrition diagnosis, diet order, or MUAC measurement.\n\nNot a medical device. Not a malnutrition diagnosis or diet order. magent does not weigh the patient.\n\nCaller supplies BMI (kg/m^2) and unplanned weight-loss percent over 3–6 months. magent does not compute BMI from height and weight.\n\nAdult MUST as in Stratton 2004 (Elia 2003 BAPEN scoring cited therein). Does not use MUAC alternative measurements.\n\nBMI 20.0 scores 1; 20.1 scores 0. Unplanned weight loss 10% scores 1, not 2. Risk is 0 low, 1 medium, ≥2 high. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"bmi_kg_m2","description":"Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not weigh the patient or compute BMI. Stratton 2004 MUST: >20 scores 0; 18.5-20 inclusive scores 1; <18.5 scores 2. BMI 20.0 scores 1; 20.1 scores 0.","required":true,"schema":{"type":"number"},"example":"22"},{"in":"query","name":"weight_loss_percent","description":"Unplanned weight loss percent over the last 3-6 months (0-50). Caller-supplied; magent does not weigh the patient. Stratton 2004 MUST: <5 scores 0; 5-10 inclusive scores 1; >10 scores 2. 10% scores 1, not 2.","required":true,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"acute_disease_no_intake_gt_5_days","description":"Acute disease with no nutritional intake for more than 5 days (Stratton 2004 MUST). true scores 2; false scores 0.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"MUST","operationId":"get_api_calc_must","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, bmi_score, weight_loss_score, acute_disease_score, risk, bmi_kg_m2, weight_loss_percent, components, citation, disclaimer."},"400":{"description":"invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_weight_loss_percent: weight_loss_percent must be a number from 0 to 50 (unplanned percent loss over 3-6 months). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/must"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"MUST (bulk)","operationId":"post_api_calc_must","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_weight_loss_percent: weight_loss_percent must be a number from 0 to 50 (unplanned percent loss over 3-6 months). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/must"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"acute_disease_no_intake_gt_5_days":"false","bmi_kg_m2":"22","weight_loss_percent":"0"},{"acute_disease_no_intake_gt_5_days":"false","bmi_kg_m2":"22","weight_loss_percent":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ndi":{"get":{"description":"Sum ten caller-assigned Vernon 1991 Neck Disability Index sections (each integer 0-5) and return the published 0-50 total with that paper's raw-score disability bands.\n\nWhen an agent already has Vernon 1991 integers 0-5 for the ten NDI sections and needs the published total and raw 0-50 bands. magent does not interview the patient, diagnose neck disease, score Oswestry, or apply later percentage website cutoffs.\n\nNot a medical device and not a diagnosis of neck pathology or a treatment order.\n\nEach of the ten sections is a caller-assigned integer 0-5. magent does not interview the patient.\n\nVernon 1991 scored the raw 0-50 total. Bands are 0-4 none, 5-14 mild, 15-24 moderate, 25-34 severe, and >34 complete. magent does not convert to a 0-100 percent or apply later 0-8%/10-28% website percentage bands.\n\nThis is Vernon 1991 NDI only. magent does not score the Oswestry Low Back Pain Disability Questionnaire. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"pain_intensity","description":"Caller-assigned Vernon 1991 NDI pain intensity (integer 0-5): 0 no pain at the moment through 5 worst imaginable pain at the moment. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"personal_care","description":"Caller-assigned Vernon 1991 NDI personal care (washing, dressing) (integer 0-5): 0 looks after self normally without extra pain through 5 does not get dressed, washes with difficulty and stays in bed. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"lifting","description":"Caller-assigned Vernon 1991 NDI lifting (integer 0-5): 0 can lift heavy weights without extra pain through 5 cannot lift or carry anything. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"reading","description":"Caller-assigned Vernon 1991 NDI reading (integer 0-5): 0 can read as much as wanted with no neck pain through 5 cannot read at all. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"headaches","description":"Caller-assigned Vernon 1991 NDI headaches (integer 0-5): 0 no headaches through 5 headaches almost all the time. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"concentration","description":"Caller-assigned Vernon 1991 NDI concentration (integer 0-5): 0 can concentrate fully with no difficulty through 5 cannot concentrate at all. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"work","description":"Caller-assigned Vernon 1991 NDI work (integer 0-5): 0 can do as much work as wanted through 5 cannot do any work at all. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"driving","description":"Caller-assigned Vernon 1991 NDI driving (integer 0-5): 0 can drive without neck pain through 5 cannot drive at all. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"sleeping","description":"Caller-assigned Vernon 1991 NDI sleeping (integer 0-5): 0 no trouble sleeping through 5 sleep completely disturbed (5-7 hours sleepless). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"recreation","description":"Caller-assigned Vernon 1991 NDI recreation (integer 0-5): 0 can engage in all recreation activities with no neck pain through 5 cannot do any recreation activities. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"NDI","operationId":"get_api_calc_ndi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, disability, components, citation, disclaimer."},"400":{"description":"invalid_ndi: NDI needs the ten Vernon 1991 sections each as an integer 0-5. Returned before settlement; you are not charged.; invalid_ndi_item: each NDI section must be an integer from 0 to 5 (Vernon 1991). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ndi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"NDI (bulk)","operationId":"post_api_calc_ndi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ndi: NDI needs the ten Vernon 1991 sections each as an integer 0-5. Returned before settlement; you are not charged.; invalid_ndi_item: each NDI section must be an integer from 0 to 5 (Vernon 1991). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ndi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"concentration":"0","driving":"0","headaches":"0","lifting":"0","pain_intensity":"0","personal_care":"0","reading":"0","recreation":"0","sleeping":"0","work":"0"},{"concentration":"0","driving":"0","headaches":"0","lifting":"0","pain_intensity":"0","personal_care":"0","reading":"0","recreation":"0","sleeping":"0","work":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/isth-dic":{"get":{"description":"Sum the four Taylor 2001 ISTH SSC overt DIC laboratory items (platelets, fibrin-related marker, PT prolongation, fibrinogen) and return the published <5 / >=5 band.\n\nWhen an agent needs the published ISTH overt DIC point total and band from laboratory items and must not invent a DIC diagnosis, a D-dimer grade, or the non-overt serial score.\n\nNot a medical device.\n\nNot a diagnosis of DIC without an underlying disorder associated with DIC. The ISTH prerequisite (an underlying disorder known to be associated with DIC) is caller-side; magent scores the four laboratory items only.\n\nNot the ISTH non-overt serial DIC algorithm.\n\nmagent does not grade D-dimer assays. fibrin_related_marker is a caller-assigned none, moderate, or strong value.\n\nDoes not return mortality percents. Band >=5 is compatible with overt DIC; band <5 is not compatible with overt DIC. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"platelets_10e9_l","description":"Platelet count ×10^9/L (1-2000). >=100 scores 0; 50 to <100 scores 1; <50 scores 2. 100 scores 0; 50 scores 1; 49 scores 2 (Taylor 2001).","required":true,"schema":{"type":"number"},"example":"180"},{"in":"query","name":"fibrin_related_marker","description":"Caller-assigned ISTH fibrin-related marker (Taylor 2001). none scores 0; moderate scores 2; strong scores 3. magent does not grade D-dimer assays.","required":true,"schema":{"type":"string","enum":["none","moderate","strong"]},"example":"none"},{"in":"query","name":"pt_prolongation_sec","description":"Prothrombin time prolongation in seconds above the laboratory ULN (0-30). <3 scores 0; >=3 and <6 scores 1; >=6 scores 2. 3.0 and 5.9 score 1; 6.0 scores 2; 2.9 scores 0 (Taylor 2001 table gaps filled at 3 and 6).","required":true,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"fibrinogen_g_l","description":"Fibrinogen in g/L (0.1-10). Provide this or fibrinogen_mg_dl, not both. >=1.0 scores 0; <1.0 scores 1. 1.0 scores 0 (Taylor 2001).","required":false,"schema":{"type":"number"},"example":"2.5"},{"in":"query","name":"fibrinogen_mg_dl","description":"Fibrinogen in mg/dL (10-1000). Converted as g/L = mg/dL / 100. Provide this or fibrinogen_g_l, not both.","required":false,"schema":{"type":"number"},"example":"250"}],"summary":"ISTH overt DIC","operationId":"get_api_calc_isth_dic","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, isth_dic_band, platelets_10e9_l, fibrin_related_marker, pt_prolongation_sec, fibrinogen_g_l, components, citation, disclaimer."},"400":{"description":"invalid_platelets: platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.; invalid_fibrin_marker: fibrin_related_marker must be none, moderate, or strong (Taylor 2001 ISTH DIC). Returned before settlement; you are not charged.; invalid_pt_prolongation: pt_prolongation_sec must be a number from 0 to 30 (seconds above ULN; Taylor 2001). Returned before settlement; you are not charged.; invalid_fibrinogen: fibrinogen_g_l (0.1-10) or fibrinogen_mg_dl (10-1000) is required, not both. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/isth-dic"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ISTH overt DIC (bulk)","operationId":"post_api_calc_isth_dic","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_platelets: platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.; invalid_fibrin_marker: fibrin_related_marker must be none, moderate, or strong (Taylor 2001 ISTH DIC). Returned before settlement; you are not charged.; invalid_pt_prolongation: pt_prolongation_sec must be a number from 0 to 30 (seconds above ULN; Taylor 2001). Returned before settlement; you are not charged.; invalid_fibrinogen: fibrinogen_g_l (0.1-10) or fibrinogen_mg_dl (10-1000) is required, not both. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/isth-dic"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"fibrin_related_marker":"none","fibrinogen_g_l":"2.5","platelets_10e9_l":"180","pt_prolongation_sec":"1.0"},{"fibrin_related_marker":"none","fibrinogen_g_l":"2.5","platelets_10e9_l":"180","pt_prolongation_sec":"1.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ottawa-sah":{"get":{"description":"Apply the Perry 2013 Ottawa SAH Rule and return whether investigation is indicated from age and five caller-assigned high-risk findings.\n\nWhen an agent has caller-assigned findings for acute headache and needs the published six-variable investigation rule, not a diagnosis of SAH.\n\nNot a diagnosis of subarachnoid hemorrhage. magent does not examine the neck.\n\nNot Hunt-Hess grade and not Fisher grade.\n\nInclusion as published is alert, neurologically intact adults with nontraumatic headache peaking within 1 hour. magent does not take GCS or time-to-peak; the caller applies inclusion.\n\nLimited neck flexion is an examination finding assigned by the caller.\n\nThunderclap headache means instantly peaking pain as published. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Age ≥40 meets this criterion; 39 does not.","required":true,"schema":{"type":"integer"},"example":"30"},{"in":"query","name":"neck_pain_or_stiffness","description":"Neck pain or stiffness as assigned by the caller. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"witnessed_loc","description":"Witnessed loss of consciousness. true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"onset_during_exertion","description":"Onset during exertion. true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"thunderclap_headache","description":"Thunderclap headache (instantly peaking pain as published). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"limited_neck_flexion","description":"Limited neck flexion on examination as assigned by the caller. true or false. magent does not examine the neck.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Ottawa SAH Rule","operationId":"get_api_calc_ottawa_sah","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, investigation_indicated, age_years, criteria, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ottawa-sah"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Ottawa SAH Rule (bulk)","operationId":"post_api_calc_ottawa_sah","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ottawa-sah"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"30","limited_neck_flexion":"false","neck_pain_or_stiffness":"false","onset_during_exertion":"false","thunderclap_headache":"false","witnessed_loc":"false"},{"age":"30","limited_neck_flexion":"false","neck_pain_or_stiffness":"false","onset_during_exertion":"false","thunderclap_headache":"false","witnessed_loc":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/r-factor":{"get":{"description":"Compute the Bénichou 1990 / CIOMS R ratio from ALT, ALP, and their laboratory upper limits of normal, then classify hepatocellular (R ≥ 5), cholestatic (R ≤ 2), or mixed (2 < R < 5).\n\nWhen an agent needs the published CIOMS enzyme pattern from ALT and ALP and must not invent a RUCAM causality score or a DILI diagnosis.\n\nNot a medical device. Not a DILI diagnosis or causality assessment.\n\nmagent does not assay enzymes. Caller supplies ALT, ALP, and laboratory ULNs.\n\nR is the enzyme pattern only (hepatocellular, cholestatic, or mixed). magent does not compute RUCAM causality points. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"alt_u_l","description":"Alanine aminotransferase in U/L (1-10000).","required":true,"schema":{"type":"number"},"example":"200"},{"in":"query","name":"alp_u_l","description":"Alkaline phosphatase in U/L (1-10000). Must be greater than 0.","required":true,"schema":{"type":"number"},"example":"100"},{"in":"query","name":"alt_uln_u_l","description":"Laboratory ALT upper limit of normal in U/L (5-200). Required; magent does not assume 40.","required":true,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"alp_uln_u_l","description":"Laboratory ALP upper limit of normal in U/L (20-500). Required; must be greater than 0.","required":true,"schema":{"type":"number"},"example":"100"}],"summary":"R factor","operationId":"get_api_calc_r_factor","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, alt_u_l, alp_u_l, alt_uln_u_l, alp_uln_u_l, r_ratio, pattern, citation, disclaimer."},"400":{"description":"invalid_alt: alt_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.; invalid_alp: alp_u_l must be a number from 1 to 10000 (Bénichou 1990). Returned before settlement; you are not charged.; invalid_alt_uln: alt_uln_u_l must be a number from 5 to 200. Returned before settlement; you are not charged.; invalid_alp_uln: alp_uln_u_l must be a number from 20 to 500. Returned before settlement; you are not charged.; invalid_r_ratio: ALP and ALP ULN must be greater than 0 so R is defined (Bénichou 1990). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/r-factor"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"R factor (bulk)","operationId":"post_api_calc_r_factor","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_alt: alt_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.; invalid_alp: alp_u_l must be a number from 1 to 10000 (Bénichou 1990). Returned before settlement; you are not charged.; invalid_alt_uln: alt_uln_u_l must be a number from 5 to 200. Returned before settlement; you are not charged.; invalid_alp_uln: alp_uln_u_l must be a number from 20 to 500. Returned before settlement; you are not charged.; invalid_r_ratio: ALP and ALP ULN must be greater than 0 so R is defined (Bénichou 1990). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/r-factor"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"alp_u_l":"100","alp_uln_u_l":"100","alt_u_l":"200","alt_uln_u_l":"40"},{"alp_u_l":"100","alp_uln_u_l":"100","alt_u_l":"200","alt_uln_u_l":"40"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/vexus":{"get":{"description":"Apply Beaubien-Souligny 2020 VExUS prototype C and return vexus_grade 0-3 from a caller-assigned IVC dilatation flag and hepatic, portal, and intra-renal venous Doppler grades.\n\nWhen an agent already has a caller-assigned IVC dilatation flag (maximal diameter ≥2 cm) and hepatic, portal, and intra-renal venous Doppler grades (normal, mild, or severe) and needs the published VExUS C grade. magent does not perform ultrasound.\n\nNot a medical device.\n\nVExUS C only. Does not implement prototypes A, B, D, or E.\n\nThe caller assigns ivc_dilated and the three Doppler grades. magent does not perform ultrasound or measure IVC.\n\nNot an AKI diagnosis. Does not report AKI probability percents.\n\nNot a fluid-order. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ivc_dilated","description":"Whether the IVC is dilated as assigned by the caller. Dilated iff maximal IVC diameter ≥2 cm (Beaubien-Souligny 2020). true or false. Grade 0 whenever this is false, regardless of Doppler. magent does not measure IVC.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hepatic","description":"Hepatic-vein Doppler grade as assigned by the caller (Beaubien-Souligny 2020 Figure 1): normal (not mild and not severe; triphasic S > D toward the liver); mild (S component lower in magnitude than D but still toward the liver); severe (S component reversed, toward the heart). magent does not perform ultrasound.","required":true,"schema":{"type":"string","enum":["normal","mild","severe"]},"example":"normal"},{"in":"query","name":"portal","description":"Portal-vein Doppler grade as assigned by the caller (Beaubien-Souligny 2020 Figure 1 caption): normal (pulsatility fraction not in the mild or severe bands); mild (velocity variation 30 to <50%); severe (variation ≥50%). magent does not perform ultrasound.","required":true,"schema":{"type":"string","enum":["normal","mild","severe"]},"example":"normal"},{"in":"query","name":"renal","description":"Intra-renal venous Doppler grade as assigned by the caller (Beaubien-Souligny 2020 Figure 1): normal (continuous flow); mild (discontinuous with a systolic and a diastolic phase); severe (discontinuous with only a diastolic phase during the cardiac cycle). magent does not perform ultrasound.","required":true,"schema":{"type":"string","enum":["normal","mild","severe"]},"example":"normal"}],"summary":"VExUS C","operationId":"get_api_calc_vexus","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, vexus_grade, severe_doppler_count, ivc_dilated, hepatic, portal, renal, components, citation, disclaimer."},"400":{"description":"invalid_vexus: hepatic, portal, and renal must each be normal, mild, or severe (Beaubien-Souligny 2020 VExUS C Doppler grades). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/vexus"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"VExUS C (bulk)","operationId":"post_api_calc_vexus","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_vexus: hepatic, portal, and renal must each be normal, mild, or severe (Beaubien-Souligny 2020 VExUS C Doppler grades). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/vexus"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"hepatic":"normal","ivc_dilated":"false","portal":"normal","renal":"normal"},{"hepatic":"normal","ivc_dilated":"false","portal":"normal","renal":"normal"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/apgar":{"get":{"description":"Compute the Apgar newborn evaluation score as the sum of five caller-assigned 0-2 signs.\n\nWhen an agent needs the published Apgar total from five signs and must not invent the sum.\n\nNot a diagnosis and not a resuscitation, prognosis, or discharge recommendation.\n\nEach sign is a caller-supplied integer 0-2. magent does not observe color, heart rate, reflex, tone, or respiration.\n\nApgar 1953 defines the five signs and 0-2 points; it does not publish later 0-3 / 4-6 / 7-10 interpretation bands. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"appearance","description":"Color (A). Integer 0, 1, or 2 as assigned by the caller.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"pulse","description":"Heart rate (P). Integer 0, 1, or 2 as assigned by the caller.","required":true,"schema":{"type":"integer"},"example":"2"},{"in":"query","name":"grimace","description":"Reflex irritability (G). Integer 0, 1, or 2 as assigned by the caller.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"activity","description":"Muscle tone (A). Integer 0, 1, or 2 as assigned by the caller.","required":true,"schema":{"type":"integer"},"example":"2"},{"in":"query","name":"respiration","description":"Respiratory effort (R). Integer 0, 1, or 2 as assigned by the caller.","required":true,"schema":{"type":"integer"},"example":"2"}],"summary":"Apgar score","operationId":"get_api_calc_apgar","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_apgar_component: appearance, pulse, grimace, activity, and respiration must each be 0, 1, or 2. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/apgar"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Apgar score (bulk)","operationId":"post_api_calc_apgar","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_apgar_component: appearance, pulse, grimace, activity, and respiration must each be 0, 1, or 2. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/apgar"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"activity":"2","appearance":"1","grimace":"1","pulse":"2","respiration":"2"},{"activity":"2","appearance":"1","grimace":"1","pulse":"2","respiration":"2"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/leiden-arthritis":{"get":{"description":"Sum the van der Helm-van Mil 2007 simplified Leiden prediction score for recent-onset undifferentiated arthritis and return the paper’s ≤6 / 6–8 / ≥8 decision band.\n\nWhen an agent already has age, sex, caller-assigned joint-distribution flags, 100-mm morning-stiffness VAS, tender and swollen joint counts, CRP in mg/L, and RF/anti-CCP flags and needs the published Leiden UA score, not an RA diagnosis.\n\nNot a medical device and not a diagnosis of rheumatoid arthritis or a treatment order.\n\nmagent does not examine joints or assay serologies. Age, sex, distribution flags, 100-mm VAS, joint counts, CRP, RF, and anti-CCP are caller-assigned.\n\nMorning stiffness is the published 100-mm VAS severity, not duration in minutes.\n\nIf upper_and_lower_extremities is true, the 1-point upper_extremities row is ignored (1.5 only). Small-joint and symmetric rows may stack with that extremity row.\n\nThe total is rounded to the nearest number ending in .0 or .5 (paper Table 3). Bands are the paper decision cutoffs: ≤6 low, >6 and <8 indeterminate, ≥8 high. max_score 14. Not a classification of RA. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years as an integer from 18 to 120 (van der Helm-van Mil 2007). Scores age_years × 0.02. magent does not assign age.","required":true,"schema":{"type":"integer"},"example":"48"},{"in":"query","name":"sex","description":"Caller-assigned sex (van der Helm-van Mil 2007). female scores 1; male scores 0. magent does not assign sex.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"small_joints_hands_feet","description":"Involvement of small joints of the hands or feet (van der Helm-van Mil 2007). true scores 0.5 and may stack with symmetric and the extremity row. magent does not examine joints.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"symmetric","description":"Symmetric joint involvement (van der Helm-van Mil 2007). true scores 0.5 and may stack with small-joint and extremity rows. magent does not examine joints.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"upper_extremities","description":"Involvement of upper extremities only (van der Helm-van Mil 2007). true scores 1 unless upper_and_lower_extremities is true, in which case this row is ignored. Mutually exclusive with the 1.5 upper-and-lower row. magent does not examine joints.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"upper_and_lower_extremities","description":"Involvement of upper and lower extremities (van der Helm-van Mil 2007). true scores 1.5 and ignores upper_extremities. magent does not examine joints.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"morning_stiffness_vas_mm","description":"Morning-stiffness severity on a 100-mm VAS (van der Helm-van Mil 2007), not duration in minutes. Number 0–100. 0–25 scores 0; 26–90 scores 1; >90 scores 2. magent does not take a history.","required":true,"schema":{"type":"number"},"example":"50"},{"in":"query","name":"tender_joint_count","description":"Caller-assigned tender joint count (van der Helm-van Mil 2007). Integer 0–68. <4 scores 0; 4–10 scores 0.5; ≥11 scores 1. magent does not examine joints.","required":true,"schema":{"type":"integer"},"example":"8"},{"in":"query","name":"swollen_joint_count","description":"Caller-assigned swollen joint count (van der Helm-van Mil 2007). Integer 0–66. <4 scores 0; 4–10 scores 0.5; ≥11 scores 1. magent does not examine joints.","required":true,"schema":{"type":"integer"},"example":"8"},{"in":"query","name":"crp_mg_l","description":"Caller-assigned C-reactive protein in mg/L (van der Helm-van Mil 2007). Number 0–500. 0–4 scores 0; 5–50 scores 0.5; ≥51 scores 1.5. magent does not assay CRP.","required":true,"schema":{"type":"number"},"example":"60"},{"in":"query","name":"rheumatoid_factor_positive","description":"Caller-assigned rheumatoid factor positivity (van der Helm-van Mil 2007). true scores 1. magent does not assay serologies.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"anti_ccp_positive","description":"Caller-assigned anti-CCP (ACPA) positivity (van der Helm-van Mil 2007). true scores 2. magent does not assay serologies.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Leiden UA rule","operationId":"get_api_calc_leiden_arthritis","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, leiden_band, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_leiden: morning_stiffness_vas_mm must be 0–100; tender_joint_count an integer 0–68; swollen_joint_count an integer 0–66; crp_mg_l a number 0–500 (van der Helm-van Mil 2007 Leiden UA rule). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/leiden-arthritis"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Leiden UA rule (bulk)","operationId":"post_api_calc_leiden_arthritis","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_leiden: morning_stiffness_vas_mm must be 0–100; tender_joint_count an integer 0–68; swollen_joint_count an integer 0–66; crp_mg_l a number 0–500 (van der Helm-van Mil 2007 Leiden UA rule). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/leiden-arthritis"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"48","anti_ccp_positive":"false","crp_mg_l":"60","morning_stiffness_vas_mm":"50","rheumatoid_factor_positive":"false","sex":"female","small_joints_hands_feet":"true","swollen_joint_count":"8","symmetric":"true","tender_joint_count":"8","upper_and_lower_extremities":"false","upper_extremities":"true"},{"age":"48","anti_ccp_positive":"false","crp_mg_l":"60","morning_stiffness_vas_mm":"50","rheumatoid_factor_positive":"false","sex":"female","small_joints_hands_feet":"true","swollen_joint_count":"8","symmetric":"true","tender_joint_count":"8","upper_and_lower_extremities":"false","upper_extremities":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/face-drops":{"get":{"description":"Sum the seven McEntire 2025 FACE DROPS criteria from caller-assigned flags and return whether the total favors Bell palsy (score ≤4), is indeterminate (5–6), or favors Lyme disease-associated facial palsy (score ≥7).\n\nWhen an agent already has the seven McEntire 2025 FACE DROPS items assigned as present or absent and needs the published −1 to 28 total and the paper's ≤4 / 5–6 / ≥7 classification, not a Lyme test, serology order, facial examination, or stroke mimic score.\n\nNot a medical device. Not a Lyme test and not a diagnosis of Bell palsy or Lyme disease-associated facial palsy. magent does not examine the face or order serology.\n\nEach item is a caller-assigned boolean. Scores ≤4 predicted Bell palsy and scores ≥7 predicted Lyme disease-associated facial palsy in McEntire 2025; 5–6 is indeterminate. magent does not invent extra cutoffs or probabilities.\n\nThis is the McEntire 2025 seven-criterion FACE DROPS instrument only, not the 2024 abstract FACE DROP weights and not a stroke FACE-DROPS mimic score. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"fever","description":"Fever (McEntire 2025, +8 if true). true or false as assigned by the caller. magent does not examine the patient or measure temperature.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"aches","description":"Arthralgia or myalgia (McEntire 2025, +6 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cephalalgia","description":"Headache / cephalalgia (McEntire 2025, +3 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"exhaustion","description":"Unusual fatigue / exhaustion (McEntire 2025, +4 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"dermatomal_or_radicular","description":"Dermatomal or radicular pattern (transverse myelitis or radiculitis) (McEntire 2025, +4 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"otalgia_or_postauricular_pain","description":"Otalgia or postauricular pain (McEntire 2025, −1 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"stiff_neck","description":"Stiff neck / nuchal rigidity (McEntire 2025, +3 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"FACE DROPS","operationId":"get_api_calc_face_drops","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, classification, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/face-drops"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"FACE DROPS (bulk)","operationId":"post_api_calc_face_drops","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/face-drops"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"aches":"false","cephalalgia":"false","dermatomal_or_radicular":"false","exhaustion":"false","fever":"false","otalgia_or_postauricular_pain":"false","stiff_neck":"false"},{"aches":"false","cephalalgia":"false","dermatomal_or_radicular":"false","exhaustion":"false","fever":"false","otalgia_or_postauricular_pain":"false","stiff_neck":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mallampati":{"get":{"description":"Return the Samsoon 1987 modified Mallampati class 1-4 from a caller-assigned integer, with a stable label.\n\nWhen an agent already has a modified Mallampati class 1-4 as in Samsoon 1987 and needs the published score and label. magent does not look in the mouth or assign a class. Not original Mallampati 1985 three-class. Not a Cormack-Lehane grade.\n\nNot a medical device and not an airway exam or intubation order. magent does not look in the mouth.\n\nSamsoon 1987 modified four-class scale only (class IV added). Not original Mallampati 1985 three-class. Not a Cormack-Lehane grade.\n\nThe caller assigns mallampati 1-4. magent does not examine the airway or invent an intubation-failure probability or difficult-airway cutoff. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"mallampati","description":"Samsoon 1987 modified Mallampati class 1-4 as assigned by the caller (1: soft palate, fauces, uvula, pillars; 2: soft palate, fauces, uvula; 3: soft palate, base of uvula; 4: soft palate not visible at all). Not original Mallampati 1985 three-class. Not a Cormack-Lehane grade. magent does not look in the mouth.","required":true,"schema":{"type":"integer"},"example":"1"}],"summary":"Mallampati","operationId":"get_api_calc_mallampati","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, mallampati, mallampati_label, components, citation, disclaimer."},"400":{"description":"invalid_mallampati: mallampati must be 1, 2, 3, or 4 (Samsoon 1987 modified Mallampati). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mallampati"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Mallampati (bulk)","operationId":"post_api_calc_mallampati","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_mallampati: mallampati must be 1, 2, 3, or 4 (Samsoon 1987 modified Mallampati). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mallampati"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"mallampati":"1"},{"mallampati":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/steroid-conversion":{"get":{"description":"Convert a glucocorticoid dose among hydrocortisone, prednisone, and dexamethasone using Meikle 1977 equivalent doses (20 mg : 5 mg : 0.75 mg).\n\nWhen an agent needs a published equivalent dose among those three agents and must not invent a conversion table or add unpublished steroids.\n\nNot a taper or stress-dose protocol.\n\nMineralocorticoid activity is not converted.\n\nOnly hydrocortisone, prednisone, and dexamethasone as published by Meikle 1977.\n\nmagent does not recommend a regimen. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"from","description":"Source glucocorticoid. hydrocortisone, prednisone, or dexamethasone (Meikle 1977).","required":true,"schema":{"type":"string","enum":["hydrocortisone","prednisone","dexamethasone"]},"example":"hydrocortisone"},{"in":"query","name":"to","description":"Target glucocorticoid. hydrocortisone, prednisone, or dexamethasone (Meikle 1977).","required":true,"schema":{"type":"string","enum":["hydrocortisone","prednisone","dexamethasone"]},"example":"prednisone"},{"in":"query","name":"dose_mg","description":"Dose of the source glucocorticoid in milligrams (0.1-5000).","required":true,"schema":{"type":"number"},"example":"20"}],"summary":"Glucocorticoid dose conversion","operationId":"get_api_calc_steroid_conversion","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, from, to, dose_mg, equivalent_dose_mg, from_equivalent_mg, to_equivalent_mg, citation, disclaimer."},"400":{"description":"invalid_steroid: from and to must be hydrocortisone, prednisone, or dexamethasone. Returned before settlement; you are not charged.; invalid_steroid_dose: dose_mg must be a number from 0.1 to 5000. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/steroid-conversion"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Glucocorticoid dose conversion (bulk)","operationId":"post_api_calc_steroid_conversion","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_steroid: from and to must be hydrocortisone, prednisone, or dexamethasone. Returned before settlement; you are not charged.; invalid_steroid_dose: dose_mg must be a number from 0.1 to 5000. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/steroid-conversion"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"dose_mg":"20","from":"hydrocortisone","to":"prednisone"},{"dose_mg":"20","from":"hydrocortisone","to":"prednisone"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/nri":{"get":{"description":"Apply the VA TPN Cooperative Study 1991 Nutritional Risk Index from caller-supplied albumin and current/usual weight.\n\nWhen an agent has serum albumin and current and usual weights and needs the published VA TPN 1991 NRI screening and strata, not GNRI, not PNI, and not a malnutrition diagnosis or TPN order.\n\nNot a medical device. magent does not assay albumin or weigh the patient.\n\nNot a malnutrition diagnosis or TPN order.\n\nVA TPN 1991 NRI only. This is not GNRI and not PNI. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"albumin_g_l","description":"Serum albumin in g/L (10-60). Provide this or albumin_g_dl, not both. VA TPN 1991 NRI uses g/L. magent does not assay albumin.","required":false,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"albumin_g_dl","description":"Serum albumin in g/dL (1-6). Converted as g/L = g/dL × 10. Provide this or albumin_g_l, not both.","required":false,"schema":{"type":"number"},"example":"4.0"},{"in":"query","name":"current_weight_kg","description":"Current weight in kg (1-500). Not capped at usual weight. magent does not weigh the patient.","required":true,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"usual_weight_kg","description":"Usual weight in kg (1-500). Must be greater than 0. magent does not weigh the patient.","required":true,"schema":{"type":"number"},"example":"70"}],"summary":"NRI","operationId":"get_api_calc_nri","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, albumin_g_l, current_weight_kg, usual_weight_kg, nri, screening, stratification, citation, disclaimer."},"400":{"description":"invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_usual_weight: usual_weight_kg must be a number from 1 to 500 (VA TPN 1991 NRI). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nri"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"NRI (bulk)","operationId":"post_api_calc_nri","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_usual_weight: usual_weight_kg must be a number from 1 to 500 (VA TPN 1991 NRI). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nri"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"albumin_g_l":"40","current_weight_kg":"70","usual_weight_kg":"70"},{"albumin_g_l":"40","current_weight_kg":"70","usual_weight_kg":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/maps":{"get":{"description":"Sum the Pardanani 2018 MAPS hybrid clinical-molecular (Figure 3) points for systemic mastocytosis and return low (≤2), intermediate_1 (3), intermediate_2 (4), or high (≥5).\n\nWhen an agent needs the published MAPS hybrid clinical-molecular point total and risk band and must not invent a mastocytosis diagnosis, WHO SM criteria, ICC SM, or the clinical-only MAPS Figure 1.\n\nNot a medical device and not a diagnosis of systemic mastocytosis. magent does not examine the patient.\n\nThis is Pardanani 2018 hybrid clinical-molecular Figure 3 only (HR-weighted). Not the clinical-only MAPS Figure 1 (unweighted count with anemia instead of mutations).\n\nNot WHO SM diagnostic criteria (who-sm). Not ICC SM.\n\nmagent does not sequence. adverse_mutations (ASXL1, RUNX1, or NRAS) is caller-assigned.\n\nmagent does not assay ALP or platelets. alp_above_unl and platelets_10e9_l are caller-supplied. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sm_category","description":"Caller-assigned SM category for Pardanani 2018 hybrid Figure 3. indolent (ISM/SSM) scores 0. advanced (ASM, SM-AHN, or MCL) scores 2. Other tokens are invalid_maps. Not WHO SM criteria. magent does not assign WHO or ICC SM.","required":true,"schema":{"type":"string"},"example":"advanced"},{"in":"query","name":"age","description":"Age in years (18-120, Params.age). >60 scores 1 (Pardanani 2018 Figure 3). 60 is the ≤60 arm and scores 0.","required":true,"schema":{"type":"integer"},"example":"65"},{"in":"query","name":"platelets_10e9_l","description":"Platelet count in 10^9/L (1-2000). <150 scores 1 (Pardanani 2018 Figure 3). 150.0 is the ≥150 arm and scores 0. magent does not assay platelets.","required":true,"schema":{"type":"number"},"example":"100"},{"in":"query","name":"alp_above_unl","description":"Serum alkaline phosphatase above the upper normal limit as assigned by the caller (Pardanani 2018 Figure 3). true scores 1. magent does not assay ALP.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"adverse_mutations","description":"ASXL1, RUNX1, or NRAS as assigned by the caller (Pardanani 2018 hybrid Figure 3). true scores 1. magent does not sequence.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"MAPS","operationId":"get_api_calc_maps","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk_band, sm_category, age, platelets_10e9_l, alp_above_unl, adverse_mutations, components, citation, disclaimer."},"400":{"description":"invalid_maps: sm_category must be indolent or advanced (Pardanani 2018 MAPS hybrid Figure 3: ISM/SSM vs advanced SM). Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_platelets: platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/maps"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"MAPS (bulk)","operationId":"post_api_calc_maps","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_maps: sm_category must be indolent or advanced (Pardanani 2018 MAPS hybrid Figure 3: ISM/SSM vs advanced SM). Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_platelets: platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/maps"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"adverse_mutations":"false","age":"65","alp_above_unl":"true","platelets_10e9_l":"100","sm_category":"advanced"},{"adverse_mutations":"false","age":"65","alp_above_unl":"true","platelets_10e9_l":"100","sm_category":"advanced"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/chosen":{"get":{"description":"Sum the Levine 2020 CHOSEN (COVID Home Safely Now) Figure 2 points from age, oxygen saturation, and serum albumin in g/dL, and return whether the total is at or above the printed cutpoint of 30.\n\nWhen an agent already has adult age, SpO2, and albumin in g/dL and needs the published three-item CHOSEN total (0–55) and the ≥30 cutpoint flag, not a discharge order and not a competing model that adds sex or respiratory rate.\n\nNot a medical device.\n\nNot a discharge order. magent does not decide disposition, prescribe oxygen, or examine the patient.\n\nThe derivation outcome is a 14-day composite of hypoxia (need for supplemental oxygen), ICU admission, and death in March–April 2020 Mass General Brigham adults with COVID-19. A higher score favored event-free status in that cohort.\n\nFigure 2 is the three-item model (age, SpO2, albumin g/dL). Sex and respiratory rate are not scored here.\n\nCutpoint 30 is the printed derivation threshold (sensitivity 83%, specificity 82%). magent does not convert the total into an individual probability. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120). Levine 2020 Figure 2: 18-45 → 5; 46-59 → 2; 60-73 → 1; >73 → 0. Age 73 scores 1; age 74 scores 0. Adults as in the derivation cohort.","required":true,"schema":{"type":"integer"},"example":40},{"in":"query","name":"spo2_percent","description":"Oxygen saturation percent (50-100). Levine 2020 Figure 2: <94 → 0; 94-96 → 9; 97-98 → 14; >98 → 21. magent does not measure SpO2.","required":true,"schema":{"type":"number"},"example":99},{"in":"query","name":"albumin_g_dl","description":"Serum albumin in g/dL (1.0-6.0). Levine 2020 Figure 2: <2.8 → 0; 2.8-3.3 → 5; 3.4-3.7 → 15; >3.7 → 29. Not g/L. magent does not assay albumin.","required":true,"schema":{"type":"number"},"example":4.0}],"summary":"CHOSEN","operationId":"get_api_calc_chosen","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, cutpoint, at_or_above_cutpoint, age, spo2_percent, albumin_g_dl, components, citation, disclaimer."},"400":{"description":"invalid_chosen: CHOSEN inputs must match Levine 2020 age, oxygen saturation, and albumin bands. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/chosen"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CHOSEN (bulk)","operationId":"post_api_calc_chosen","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_chosen: CHOSEN inputs must match Levine 2020 age, oxygen saturation, and albumin bands. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/chosen"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","albumin_g_dl":"4.0","spo2_percent":"99"},{"age":"40","albumin_g_dl":"4.0","spo2_percent":"99"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/acef-ii":{"get":{"description":"Compute the Ranucci 2018 ACEF II score from age, left-ventricular ejection fraction, serum creatinine, emergency surgery, and hematocrit.\n\nWhen an agent needs the published Ranucci 2018 ACEF II score for cardiac surgery and must not substitute original ACEF 2009, invent predicted mortality, or issue an operative clearance.\n\nNot a medical device. Not an operative clearance, cancellation, or monitoring order.\n\nRanucci 2018 ACEF II only. This is not original ACEF 2009 (age/EF + 1 if creatinine > 2.0 mg/dL).\n\nReturns the published ACEF II score only. Does not apply a logistic predicted-mortality equation and does not invent risk bands.\n\nCreatinine extra 2.0 only when serum creatinine is strictly greater than 2.0 mg/dL; 2.0 scores 0 extra.\n\nHematocrit ≥ 36% contributes 0; each percentage point below 36 adds 0.2. magent clamps ejection fraction 10-80, hematocrit 15-60, and age 18-120.\n\nmagent does not examine the patient or assign emergency status from an operative note. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). magent clamp; Ranucci 2018 uses age in years.","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"ejection_fraction_percent","description":"Left-ventricular ejection fraction in percent (10-80). magent clamp. Denominator of age/EF.","required":true,"schema":{"type":"number"},"example":"50"},{"in":"query","name":"creatinine_mg_dl","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l, not both. Extra 2.0 only when strictly greater than 2.0 mg/dL (Ranucci 2018).","required":false,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"creatinine_umol_l","description":"Serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42.","required":false,"schema":{"type":"number"},"example":"88.42"},{"in":"query","name":"emergency_surgery","description":"true if the operation is emergency cardiac surgery (Ranucci 2018 +3.0). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hematocrit_percent","description":"Preoperative hematocrit in percent (15-60). magent clamp. HCT ≥ 36 contributes 0; each percentage point below 36 adds 0.2.","required":true,"schema":{"type":"number"},"example":"40"}],"summary":"ACEF II","operationId":"get_api_calc_acef_ii","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, ejection_fraction_percent, creatinine_mg_dl, emergency_surgery, hematocrit_percent, score, citation, disclaimer."},"400":{"description":"invalid_acef_ii: ejection_fraction_percent 10-80, creatinine_mg_dl 0.1-20, and hematocrit_percent 15-60 (Ranucci 2018; magent clamps). Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/acef-ii"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ACEF II (bulk)","operationId":"post_api_calc_acef_ii","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_acef_ii: ejection_fraction_percent 10-80, creatinine_mg_dl 0.1-20, and hematocrit_percent 15-60 (Ranucci 2018; magent clamps). Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/acef-ii"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"70","creatinine_mg_dl":"1.0","ejection_fraction_percent":"50","emergency_surgery":"false","hematocrit_percent":"40"},{"age":"70","creatinine_mg_dl":"1.0","ejection_fraction_percent":"50","emergency_surgery":"false","hematocrit_percent":"40"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pars":{"get":{"description":"Sum the Biagini Myers 2019 Table III Pediatric Asthma Risk Score weights and return the Fig E1 integer predicted risk of asthma by age 7.\n\nWhen an agent has caller-assigned parental asthma, eczema before age 3, wheezing apart from colds, wheezing before age 3, African American race as used in Biagini Myers 2019, and SPT ≥2 aeroallergen and/or food allergen flags, and needs the published PARS total and Fig E1 percent rather than API, mAPI, or a named risk band.\n\nNot a medical device and not an asthma diagnosis. magent does not examine the child.\n\nafrican_american is caller-assigned African American race as used in Biagini Myers 2019. magent does not assign race.\n\nNot the Castro-Rodriguez 2000 Asthma Predictive Index (API) and not the modified Asthma Predictive Index (mAPI).\n\nmagent does not perform skin prick testing. spt_ge_2 is a caller-assigned flag for SPT positive to ≥2 aeroallergens and/or food allergens.\n\nFig E1 reports predicted risk of asthma by age 7 as integers for attainable scores 0, 2-12, and 14. Scores 1 and 13 are unattainable given Table III weights. magent does not invent percents for unattainable scores and does not return named low/moderate/high bands. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"parental_asthma","description":"Parental asthma as assigned by the caller (Biagini Myers 2019 Table III). true scores 2. magent does not take a family history. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"eczema_before_age_3","description":"Eczema before age 3 years as assigned by the caller (Biagini Myers 2019 Table III). true scores 2. magent does not examine the child. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"wheezing_apart_from_colds","description":"Wheezing apart from colds as assigned by the caller (Biagini Myers 2019 Table III). true scores 3. magent does not auscultate. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"wheezing_before_age_3","description":"Wheezing before age 3 years as assigned by the caller (Biagini Myers 2019 Table III). true scores 3. magent does not auscultate. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"african_american","description":"Caller-assigned African American race as used in Biagini Myers 2019 Table III. true scores 2. magent does not assign race. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"spt_ge_2","description":"Skin prick test positive to ≥2 aeroallergens and/or food allergens as assigned by the caller (Biagini Myers 2019 Table III). true scores 2. magent does not perform SPT. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"PARS","operationId":"get_api_calc_pars","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, predicted_asthma_percent, components, citation, disclaimer."},"400":{"description":"invalid_pars: PARS flags must be true or false as in Biagini Myers 2019 Table III / Fig E1. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pars"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PARS (bulk)","operationId":"post_api_calc_pars","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pars: PARS flags must be true or false as in Biagini Myers 2019 Table III / Fig E1. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pars"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"african_american":"false","eczema_before_age_3":"false","parental_asthma":"false","spt_ge_2":"false","wheezing_apart_from_colds":"false","wheezing_before_age_3":"false"},{"african_american":"false","eczema_before_age_3":"false","parental_asthma":"false","spt_ge_2":"false","wheezing_apart_from_colds":"false","wheezing_before_age_3":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/alc":{"get":{"description":"Compute absolute lymphocyte count from WBC and lymphocyte percent, plus Shapiro 1998 published ALC cutoffs that predict CD4 < 200 or CD4 ≥ 200.\n\nWhen an agent needs Shapiro 1998 ALC from a CBC differential and must not invent a CD4 count.\n\nNot a medical device. Not a CD4 count, HIV staging tool, or diagnosis. magent does not measure the CBC.\n\nShapiro 1998 published ALC cutoffs only: ALC < 1000 cells/mm^3 predicts CD4 < 200; ALC ≥ 2000 predicts CD4 ≥ 200. magent does not estimate a CD4 count or invent other bands.\n\nALC = WBC × lymphocyte percent / 100, rounded to the nearest integer cells/µL (same as ANC). Provide wbc_k_ul or wbc_ul, and lymphocyte_percent (0.1-99). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"wbc_k_ul","description":"WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500.","required":false,"schema":{"type":"number"},"example":"6.0"},{"in":"query","name":"wbc_ul","description":"WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000.","required":false,"schema":{"type":"number"},"example":"6000"},{"in":"query","name":"lymphocyte_percent","description":"Lymphocytes as a percent of WBC (0.1-99). Shapiro 1998 uses the CBC lymphocyte percentage.","required":true,"schema":{"type":"number"},"example":"50"}],"summary":"ALC","operationId":"get_api_calc_alc","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, wbc_per_ul, lymphocyte_percent, alc_per_ul, shapiro_alc_band, citation, disclaimer."},"400":{"description":"invalid_alc_inputs: ALC needs wbc_k_ul or wbc_ul and lymphocyte_percent as used in Shapiro 1998 (WBC times lymphocyte percent). Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_lymphocyte_percent: lymphocyte_percent must be a number from 0.1 to 99. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/alc"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ALC (bulk)","operationId":"post_api_calc_alc","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_alc_inputs: ALC needs wbc_k_ul or wbc_ul and lymphocyte_percent as used in Shapiro 1998 (WBC times lymphocyte percent). Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_lymphocyte_percent: lymphocyte_percent must be a number from 0.1 to 99. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/alc"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"lymphocyte_percent":"50","wbc_k_ul":"6.0"},{"lymphocyte_percent":"50","wbc_k_ul":"6.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/alvarado":{"get":{"description":"Compute the Alvarado 1986 MANTRELS score from caller-assigned findings, temperature, WBC, and neutrophil percent.\n\nWhen an agent needs the published Alvarado 1986 total and must not invent abdominal findings or treat the total as an operating-room protocol.\n\nNot a diagnosis or operating-room protocol. Original discussion used 1-4; score 0 is grouped with 0-4 and is not a diagnosis.\n\nFindings are caller-assigned. magent does not examine the abdomen.\n\nThis is Alvarado 1986 (MANTRELS), not RIPASA and not the pediatric Appendicitis Score. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"migration","description":"Pain migration to the right lower quadrant (M). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"anorexia","description":"Anorexia (A). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"nausea_vomiting","description":"Nausea or vomiting (N). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"rlq_tenderness","description":"Right-lower-quadrant tenderness (T). true scores 2; false scores 0.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"rebound","description":"Rebound tenderness (R). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"temperature_c","description":"Temperature in °C (30.0-45.0). ≥37.3 scores 1 (37.3 scores; 37.2 does not).","required":true,"schema":{"type":"number"},"example":"37.0"},{"in":"query","name":"wbc_k_ul","description":"WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500. >10000/µL scores 2.","required":false,"schema":{"type":"number"},"example":"8.0"},{"in":"query","name":"wbc_ul","description":"WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000. >10000 scores 2 (10000 does not; 10001 does).","required":false,"schema":{"type":"number"},"example":"8000"},{"in":"query","name":"neutrophil_percent","description":"Neutrophil percent (0-100). Left shift scores 1 if >75 (75.0 does not; 75.1 does).","required":true,"schema":{"type":"number"},"example":"60"}],"summary":"Alvarado score","operationId":"get_api_calc_alvarado","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, alvarado_band, wbc_ul, temperature_c, neutrophil_percent, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_temperature: temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_neutrophil_percent: neutrophil_percent must be a number from 0 to 100 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/alvarado"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Alvarado score (bulk)","operationId":"post_api_calc_alvarado","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_temperature: temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_neutrophil_percent: neutrophil_percent must be a number from 0 to 100 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/alvarado"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"anorexia":"false","migration":"false","nausea_vomiting":"false","neutrophil_percent":"60","rebound":"false","rlq_tenderness":"false","temperature_c":"37.0","wbc_ul":"8000"},{"anorexia":"false","migration":"false","nausea_vomiting":"false","neutrophil_percent":"60","rebound":"false","rlq_tenderness":"false","temperature_c":"37.0","wbc_ul":"8000"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rcri":{"get":{"description":"Sum the six Lee 1999 revised cardiac risk index factors and return class I–IV.\n\nWhen an agent needs the published RCRI point total and must not invent an operative-clearance decision.\n\nNot an operative clearance, cancellation, or monitoring order. Classes I–IV follow Lee 1999 (0 / 1 / 2 / ≥3 factors).\n\nDoes not include age. Does not convert creatinine units; creatinine_gt_2 is the published >2.0 mg/dL cutoff as a flag. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"high_risk_surgery","description":"Intraperitoneal, intrathoracic, or suprainguinal vascular surgery (Lee 1999). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ischemic_heart_disease","description":"History of myocardial infarction, positive exercise test, current chest pain from ischemia, nitrate use, or Q waves (Lee 1999). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"congestive_heart_failure","description":"History of heart failure, pulmonary edema, PND, rales, S3, or chest radiograph with vascular redistribution (Lee 1999). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cerebrovascular_disease","description":"History of stroke or TIA (Lee 1999). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"insulin_diabetes","description":"Preoperative insulin therapy for diabetes (Lee 1999). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"creatinine_gt_2","description":"Preoperative serum creatinine >2.0 mg/dL (Lee 1999). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"RCRI","operationId":"get_api_calc_rcri","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, rcri_class, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rcri"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"RCRI (bulk)","operationId":"post_api_calc_rcri","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rcri"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"cerebrovascular_disease":"false","congestive_heart_failure":"false","creatinine_gt_2":"false","high_risk_surgery":"false","insulin_diabetes":"false","ischemic_heart_disease":"false"},{"cerebrovascular_disease":"false","congestive_heart_failure":"false","creatinine_gt_2":"false","high_risk_surgery":"false","insulin_diabetes":"false","ischemic_heart_disease":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/cdc-imm":{"get":{"description":"Return the printed ACIP 2025 catch-up Table 2 minimum age and previous-dose interval for a caller-assigned antigen and dose, and whether that age and interval are met.\n\nWhen an agent already has a caller-assigned antigen, dose number, completed age in months, and weeks since the previous dose (omitted for dose 1) and needs the numeric catch-up Table 2 cell rather than the routine age bars or a vaccine order.\n\nNot a medical device. Not a vaccine order. magent does not immunize.\n\nCatch-up Table 2 numeric minimum age and previous-dose interval cells only. Not the full routine schedule (Table 1) and not Table 3 medical-indication rows.\n\nHepB dose 3 (8 weeks and 16 weeks after dose 1), Hib, PCV, rotavirus max ages, 6-month intervals, the 4-day grace period, and live-virus spacing beyond this table are not implemented.\n\nDTaP is the 4-month-through-6-year section (age_months < 84). 6 weeks is stored as 1.5 months. Age is caller-assigned completed months; magent does not derive chronological age. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"vaccine","description":"Caller-assigned antigen with a numeric Table 2 minimum age and/or previous-dose interval: hepb, mmr, dtap, ipv, hepa, var, or tdap. Not a vaccine order.","required":true,"schema":{"type":"string","enum":["hepb","mmr","dtap","ipv","hepa","var","tdap"]},"example":"hepb"},{"in":"query","name":"dose_number","description":"Dose number in the series as printed (integer 1-5). Only rows with a numeric minimum age and/or interval are implemented; other dose numbers are rejected.","required":true,"schema":{"type":"integer"},"example":2},{"in":"query","name":"age_months","description":"Caller-assigned completed age in months (integer 0-216; 18 years or younger). magent does not derive chronological age.","required":true,"schema":{"type":"integer"},"example":4},{"in":"query","name":"weeks_since_previous_dose","description":"Whole weeks since the previous dose (integer 0-520). Required for dose 2 and later. Must be omitted for dose 1 as Table 2 prints no previous-dose interval.","required":false,"schema":{"type":"integer"},"example":4}],"summary":"CDC catch-up immunization interval (ACIP)","operationId":"get_api_calc_cdc_imm","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, vaccine, dose_number, age_months, weeks_since_previous_dose, minimum_age_months, minimum_interval_weeks, eligible, components, citation, disclaimer."},"400":{"description":"invalid_cdc_imm: CDC catch-up immunization inputs must match the printed vaccine, dose number, age, and interval columns. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cdc-imm"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CDC catch-up immunization interval (ACIP) (bulk)","operationId":"post_api_calc_cdc_imm","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_cdc_imm: CDC catch-up immunization inputs must match the printed vaccine, dose number, age, and interval columns. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cdc-imm"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_months":"4","dose_number":"2","vaccine":"hepb","weeks_since_previous_dose":"4"},{"age_months":"4","dose_number":"2","vaccine":"hepb","weeks_since_previous_dose":"4"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/west-haven":{"get":{"description":"Return the Conn 1977 (West Haven / Conn score) hepatic encephalopathy grade 0-4 from a caller-assigned integer.\n\nWhen an agent needs the Conn 1977 West Haven grade and must not invent ISHEN covert/overt bins or psychometric minimal-HE tests.\n\nNot a diagnosis of hepatic encephalopathy. magent does not examine the patient.\n\nThis is Conn 1977 grades 0-4 only. It does not implement ISHEN covert/overt grouping or psychometric tests for minimal HE.\n\nGrade 1 is caller-assigned; magent does not apply a mini-mental status exam. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"grade","description":"Conn 1977 / West Haven hepatic encephalopathy grade 0-4 as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"West Haven","operationId":"get_api_calc_west_haven","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, grade, score, max_score, description, components, citation, disclaimer."},"400":{"description":"invalid_west_haven_grade: grade must be an integer from 0 to 4 (Conn 1977). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/west-haven"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"West Haven (bulk)","operationId":"post_api_calc_west_haven","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_west_haven_grade: grade must be an integer from 0 to 4 (Conn 1977). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/west-haven"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"grade":"0"},{"grade":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/fistula-risk":{"get":{"description":"Sum the Callery 2013 Fistula Risk Score from caller-assigned gland texture, pathology, pancreatic duct diameter, and estimated blood loss, and return the published 0–10 total and fistula band.\n\nWhen an agent has already assigned Callery 2013 intraoperative inputs after pancreatoduodenectomy and needs the published integer FRS total and band, not a CR-POPF diagnosis, ISGPS grade, Ranson, or BISAP score.\n\nNot a medical device. magent does not palpate the gland or measure EBL. Gland texture, pathology, duct diameter, and EBL are caller-assigned intraoperative values.\n\nIntraoperative assignment: Callery 2013 is scored at pancreatoduodenectomy, not from a preoperative chart.\n\nDoes not grade CR-POPF and is not an ISGPS grade. The score is a published risk total, not a fistula diagnosis.\n\nNot Ranson and not BISAP. This tool is the Callery 2013 Fistula Risk Score only. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"gland_texture","description":"Caller-assigned pancreatic gland texture at pancreatoduodenectomy (Callery 2013). firm or soft. firm scores 0; soft scores 2. magent does not palpate the gland.","required":true,"schema":{"type":"string","enum":["firm","soft"]},"example":"firm"},{"in":"query","name":"pathology","description":"Caller-assigned pathology (Callery 2013). pdac_or_pancreatitis (pancreatic ductal adenocarcinoma or pancreatitis) scores 0. other (ampullary, duodenal, cystic, or islet cell) scores 1.","required":true,"schema":{"type":"string","enum":["pdac_or_pancreatitis","other"]},"example":"pdac_or_pancreatitis"},{"in":"query","name":"duct_mm","description":"Caller-assigned pancreatic duct diameter in mm, number 0.5–20 (Callery 2013 integer-mm table). ≥5 scores 0; ≥4 scores 1; ≥3 scores 2; ≥2 scores 3; else 4 (so 4.0–4.999 scores 1; 1.5 and ≤1 score 4). magent does not measure the duct.","required":true,"schema":{"type":"number"},"example":"5"},{"in":"query","name":"ebl_ml","description":"Caller-assigned estimated blood loss in mL, number 0–10000 (Callery 2013). ≤400 scores 0; 401–700 scores 1; 701–1000 scores 2; >1000 scores 3. magent does not measure EBL.","required":true,"schema":{"type":"number"},"example":"300"}],"summary":"Fistula Risk Score","operationId":"get_api_calc_fistula_risk","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, fistula_band, gland_texture, pathology, duct_mm, ebl_ml, components, citation, disclaimer."},"400":{"description":"invalid_fistula_risk: gland_texture must be firm or soft, pathology pdac_or_pancreatitis or other, duct_mm a number 0.5-20, and ebl_ml a number 0-10000 (Callery 2013 Fistula Risk Score). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/fistula-risk"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Fistula Risk Score (bulk)","operationId":"post_api_calc_fistula_risk","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_fistula_risk: gland_texture must be firm or soft, pathology pdac_or_pancreatitis or other, duct_mm a number 0.5-20, and ebl_ml a number 0-10000 (Callery 2013 Fistula Risk Score). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/fistula-risk"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"duct_mm":"5","ebl_ml":"300","gland_texture":"firm","pathology":"pdac_or_pancreatitis"},{"duct_mm":"5","ebl_ml":"300","gland_texture":"firm","pathology":"pdac_or_pancreatitis"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rosier":{"get":{"description":"Sum the seven Nor 2005 ROSIER items from caller-assigned flags and return whether the score is greater than 0 (stroke more likely).\n\nWhen an agent already has ROSIER items assigned as present or absent and needs the published −2 to +5 total and the Nor 2005 score > 0 discriminator, not a stroke diagnosis and not NIHSS.\n\nNot a medical device. Not a stroke diagnosis. magent does not examine the patient.\n\nEach item is a caller-assigned boolean. magent does not collect a time of onset.\n\nStroke is more likely when the score is greater than 0 (Nor 2005). A score of 0 or less does not exclude stroke.\n\nThis is the Nor 2005 seven-item ROSIER instrument only. magent does not map ROSIER to NIHSS. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"loss_of_consciousness_or_syncope","description":"History of loss of consciousness or syncope (Nor 2005, −1 if true). true or false as assigned by the caller. magent does not examine the patient or collect a time of onset.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"seizure","description":"History of seizure activity (Nor 2005, −1 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"asymmetric_face_weakness","description":"New acute-onset (or on awakening) asymmetric facial weakness (Nor 2005, +1 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"asymmetric_arm_weakness","description":"New acute-onset (or on awakening) asymmetric arm weakness (Nor 2005, +1 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"asymmetric_leg_weakness","description":"New acute-onset (or on awakening) asymmetric leg weakness (Nor 2005, +1 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"speech_disturbance","description":"New acute-onset (or on awakening) speech disturbance (Nor 2005, +1 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"visual_field_defect","description":"New acute-onset (or on awakening) visual field defect (Nor 2005, +1 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"ROSIER","operationId":"get_api_calc_rosier","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, stroke_more_likely, components, citation, disclaimer."},"400":{"description":"invalid_rosier: each ROSIER 2005 item must be true or false as assigned by the caller. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rosier"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ROSIER (bulk)","operationId":"post_api_calc_rosier","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rosier: each ROSIER 2005 item must be true or false as assigned by the caller. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rosier"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"asymmetric_arm_weakness":"false","asymmetric_face_weakness":"false","asymmetric_leg_weakness":"false","loss_of_consciousness_or_syncope":"false","seizure":"false","speech_disturbance":"false","visual_field_defect":"false"},{"asymmetric_arm_weakness":"false","asymmetric_face_weakness":"false","asymmetric_leg_weakness":"false","loss_of_consciousness_or_syncope":"false","seizure":"false","speech_disturbance":"false","visual_field_defect":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/abc2":{"get":{"description":"Compute the Kothari 1996 ABC/2 ellipsoid ICH volume as (a_cm × b_cm × c_cm) / 2 from caller-supplied diameters in centimeters.\n\nWhen an agent needs the published ABC/2 volume and must not invent the ICH Score or pick A, B, or C from a scan.\n\nNot a diagnosis. magent does not diagnose intracerebral hemorrhage.\n\nVolume estimate only. This is the Kothari 1996 ABC/2 ellipsoid formula, not a volumetric segmentation.\n\nThis is not the ICH Score.\n\nmagent does not read imaging or choose A/B/C on the scan. The caller supplies a_cm, b_cm, and c_cm. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"a_cm","description":"Largest diameter A in cm (0.1-20). Caller-assigned; magent does not read a scan.","required":true,"schema":{"type":"number"},"example":"2"},{"in":"query","name":"b_cm","description":"Largest diameter B perpendicular to A, in cm (0.1-20). Caller-assigned.","required":true,"schema":{"type":"number"},"example":"2"},{"in":"query","name":"c_cm","description":"C in cm (0.1-20): number of slices times slice thickness. Caller-assigned.","required":true,"schema":{"type":"number"},"example":"2"}],"summary":"ABC/2","operationId":"get_api_calc_abc2","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, a_cm, b_cm, c_cm, volume_ml, citation, disclaimer."},"400":{"description":"invalid_abc2_dimension: a_cm, b_cm, and c_cm must each be a number from 0.1 to 20. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/abc2"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ABC/2 (bulk)","operationId":"post_api_calc_abc2","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_abc2_dimension: a_cm, b_cm, and c_cm must each be a number from 0.1 to 20. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/abc2"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"a_cm":"2","b_cm":"2","c_cm":"2"},{"a_cm":"2","b_cm":"2","c_cm":"2"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/thrive":{"get":{"description":"Compute the Flint 2010 THRIVE (Totaled Health Risks in Vascular Events) score from trichotomized age, trichotomized NIHSS, and the chronic disease scale (hypertension, diabetes mellitus, atrial fibrillation).\n\nWhen an agent needs the published Flint 2010 THRIVE total and 90-day good-outcome and mortality strata after endovascular stroke treatment, and must not invent NIHSS or comorbidity points from a chart narrative.\n\nNot a medical device and not a treatment recommendation.\n\nDerived in MERCI and Multi MERCI endovascular cohorts (Flint 2010). It is not a recommendation for or against endovascular therapy.\n\nThe caller assigns NIHSS and comorbidities (hypertension, diabetes mellitus, atrial fibrillation). magent does not examine the patient. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Trichotomized: ≤59 scores 0; 60-79 scores 1; ≥80 scores 2 (1 point per age level).","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"nihss","description":"Caller-assigned NIH Stroke Scale total (integer 0-42). Trichotomized: ≤10 scores 0; 11-20 scores 2; ≥21 scores 4 (2 points per NIHSS level). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"12"},{"in":"query","name":"hypertension","description":"Hypertension on the chronic disease scale (CDS). true scores 1; false scores 0.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"diabetes","description":"Diabetes mellitus on the chronic disease scale (CDS). true scores 1; false scores 0.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"atrial_fibrillation","description":"Atrial fibrillation on the chronic disease scale (CDS). true scores 1; false scores 0.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"THRIVE","operationId":"get_api_calc_thrive","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, thrive_band, good_outcome_percent, mortality_percent, cds, age_years, nihss, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_nihss: nihss must be an integer from 0 to 42. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/thrive"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"THRIVE (bulk)","operationId":"post_api_calc_thrive","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_nihss: nihss must be an integer from 0 to 42. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/thrive"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"70","atrial_fibrillation":"false","diabetes":"false","hypertension":"true","nihss":"12"},{"age":"70","atrial_fibrillation":"false","diabetes":"false","hypertension":"true","nihss":"12"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/nvps":{"get":{"description":"Sum five caller-assigned Odhner 2003 original NVPS integers (0-2) and return the published total (max 10).\n\nWhen an agent has already assigned Odhner 2003 original 0-2 integers for face, activity, guarding, physiologic I (vital signs), and physiologic II (autonomic) and needs the published total, not a pain diagnosis, analgesic order, later NVPS-R respiratory category, or invented intensity cutoff.\n\nNot a medical device and not a pain diagnosis or analgesic order.\n\nEach of the five items is a caller-assigned integer 0, 1, or 2 from Odhner 2003. magent does not observe the patient.\n\nOriginal Odhner 2003 NVPS only. Not the later NVPS-R that replaces physiologic II with a respiratory category.\n\nTotal is 0-10. magent does not add mild, moderate, or severe intensity cutoffs that are not in Odhner 2003.\n\nNot BPS. Not FLACC. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"face","description":"Caller-assigned Odhner 2003 original NVPS face (integer 0-2): 0 no particular expression or smile; 1 occasional grimace, tearing, frowning, wrinkled forehead; 2 frequent grimace, tearing, frowning, wrinkled forehead. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"activity","description":"Caller-assigned Odhner 2003 original NVPS activity/movement (integer 0-2): 0 lying quietly, normal position; 1 seeking attention through movement or slow, cautious movement; 2 restless, excessive activity and/or withdrawal reflexes. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"guarding","description":"Caller-assigned Odhner 2003 original NVPS guarding (integer 0-2): 0 lying quietly, no positioning of hands over areas of the body; 1 splinting areas of the body, tense; 2 rigid, stiff. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"physiologic_i","description":"Caller-assigned Odhner 2003 original NVPS physiologic I vital signs (integer 0-2): 0 stable vital signs (no change in past 4 h vs baseline BP/HR/RR); 1 change over past 4 h in SBP >20 mmHg or HR >20/min or RR >10/min; 2 change over past 4 h in SBP >30 mmHg or HR >25/min or RR >20/min. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"physiologic_ii","description":"Caller-assigned Odhner 2003 original NVPS physiologic II autonomic (integer 0-2): 0 warm, dry skin; 1 dilated pupils, perspiring, flushing; 2 diaphoretic, pallor. Not the later NVPS-R respiratory category. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"NVPS","operationId":"get_api_calc_nvps","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, face, activity, guarding, physiologic_i, physiologic_ii, components, citation, disclaimer."},"400":{"description":"invalid_nvps: NVPS inputs must be the five caller-assigned 0-2 Odhner 2003 original categories (face, activity, guarding, physiologic_i, physiologic_ii). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nvps"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"NVPS (bulk)","operationId":"post_api_calc_nvps","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_nvps: NVPS inputs must be the five caller-assigned 0-2 Odhner 2003 original categories (face, activity, guarding, physiologic_i, physiologic_ii). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nvps"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"activity":"0","face":"0","guarding":"0","physiologic_i":"0","physiologic_ii":"0"},{"activity":"0","face":"0","guarding":"0","physiologic_i":"0","physiologic_ii":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/crash":{"get":{"description":"Sum Extermann 2012 Table 4 CRASH points into hematologic (0–6), nonhematologic (0–8), and combined (0–12, Chemotox once) scores with published four-level risk bands.\n\nWhen an agent already has caller-assigned CRASH inputs for an older patient considered for chemotherapy and needs the published hematologic, nonhematologic, and combined scores, not a chemotherapy order, not CARG-TT, and not the trauma CRASH score. magent does not look up regimens or assay LDH.\n\nNot a medical device.\n\nNot a chemotherapy order. This tool does not start, stop, or choose cancer treatment. Not CARG-TT.\n\nNot the trauma CRASH score (MRC CRASH head-injury trial). This is the Extermann 2012 Chemotherapy Risk Assessment Scale for High-Age Patients.\n\nHematologic, nonhematologic, and combined incidences (7/23/54/100%, 33/46/67/93%, 50/58/77/79%) are derivation-cohort observations, not patient-specific probabilities.\n\nChemotox is caller-assigned MAX2 (0–1). magent does not look up regimens.\n\nCaller assigns diastolic BP, IADL (10–29), LDH and LDH ULN, ECOG, Mini-Mental Status, and Mini-Nutritional Assessment. magent does not measure blood pressure, interview, or assay LDH.\n\nCombined score counts Chemotox once (max 12, not 14). LDH awards 0 or 2 points only (empty 1-point column in Table 4). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"diastolic_mm_hg","description":"Diastolic blood pressure in mm Hg (20-160). Extermann 2012 Table 4: ≤72 → 0, >72 → 1 hematologic point. magent does not measure blood pressure.","required":true,"schema":{"type":"number"},"example":"80"},{"in":"query","name":"iadl","description":"Instrumental activities of daily living integer 10-29 (Extermann 2012 CRASH IADL). 26-29 → 0, 10-25 → 1 hematologic point. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"20"},{"in":"query","name":"ldh_u_l","description":"Lactate dehydrogenase in U/L (1-20000). +2 hematologic points if ldh_u_l > 0.74 × ldh_uln_u_l, else 0 (empty 1-point column). magent does not assay LDH.","required":true,"schema":{"type":"number"},"example":"500"},{"in":"query","name":"ldh_uln_u_l","description":"Laboratory LDH upper limit of normal in U/L (50-2000). Used only as 0.74 × ULN for the LDH rule. No special-case ULN value. magent does not assay LDH.","required":true,"schema":{"type":"number"},"example":"618"},{"in":"query","name":"chemotox","description":"Caller-assigned MAX2 Chemotox from 0 to 1. 0-0.44 → 0, 0.45-0.57 → 1, >0.57 → 2. Counted once in the combined score. magent does not look up regimens.","required":true,"schema":{"type":"number"},"example":"0.50"},{"in":"query","name":"ecog","description":"ECOG performance status integer 0-4. Extermann 2012: 0 → 0, 1-2 → 1, 3-4 → 2 nonhematologic points. magent does not assign performance status.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"mms","description":"Mini-Mental Status integer 0-30. Extermann 2012: 30 → 0, <30 → 2 nonhematologic points. magent does not administer the Mini-Mental Status.","required":true,"schema":{"type":"integer"},"example":"28"},{"in":"query","name":"mna","description":"Mini-Nutritional Assessment integer 0-30. Extermann 2012: 28-30 → 0, <28 → 2 nonhematologic points. magent does not administer the Mini-Nutritional Assessment.","required":true,"schema":{"type":"integer"},"example":"26"}],"summary":"CRASH","operationId":"get_api_calc_crash","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, hematologic_score, nonhematologic_score, combined_score, max_hematologic_score, max_nonhematologic_score, max_combined_score, hematologic_risk, nonhematologic_risk, combined_risk, hematologic_incidence_percent, nonhematologic_incidence_percent, combined_incidence_percent, diastolic_mm_hg, iadl, ldh_u_l, ldh_uln_u_l, chemotox, ecog, mms, mna, components, citation, disclaimer."},"400":{"description":"invalid_diastolic_bp: diastolic_mm_hg must be a number from 20 to 160. Returned before settlement; you are not charged.; invalid_crash_iadl: iadl must be an integer from 10 to 29 (Extermann 2012 CRASH IADL). Returned before settlement; you are not charged.; invalid_ldh: ldh_u_l must be a number from 1 to 20000 (Extermann 2012 LDH U/L). Returned before settlement; you are not charged.; invalid_ldh_uln: ldh_uln_u_l must be a number from 50 to 2000. Returned before settlement; you are not charged.; invalid_crash_chemotox: chemotox must be a number from 0 to 1 (Extermann 2012 MAX2 Chemotox as assigned by the caller). Returned before settlement; you are not charged.; invalid_ecog: ecog must be an integer from 0 to 4 (Shipp 1993 IPI). Returned before settlement; you are not charged.; invalid_crash_mms: mms must be an integer from 0 to 30 (Extermann 2012 Mini-Mental Status). Returned before settlement; you are not charged.; invalid_crash_mna: mna must be an integer from 0 to 30 (Extermann 2012 Mini-Nutritional Assessment). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/crash"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CRASH (bulk)","operationId":"post_api_calc_crash","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_diastolic_bp: diastolic_mm_hg must be a number from 20 to 160. Returned before settlement; you are not charged.; invalid_crash_iadl: iadl must be an integer from 10 to 29 (Extermann 2012 CRASH IADL). Returned before settlement; you are not charged.; invalid_ldh: ldh_u_l must be a number from 1 to 20000 (Extermann 2012 LDH U/L). Returned before settlement; you are not charged.; invalid_ldh_uln: ldh_uln_u_l must be a number from 50 to 2000. Returned before settlement; you are not charged.; invalid_crash_chemotox: chemotox must be a number from 0 to 1 (Extermann 2012 MAX2 Chemotox as assigned by the caller). Returned before settlement; you are not charged.; invalid_ecog: ecog must be an integer from 0 to 4 (Shipp 1993 IPI). Returned before settlement; you are not charged.; invalid_crash_mms: mms must be an integer from 0 to 30 (Extermann 2012 Mini-Mental Status). Returned before settlement; you are not charged.; invalid_crash_mna: mna must be an integer from 0 to 30 (Extermann 2012 Mini-Nutritional Assessment). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/crash"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"chemotox":"0.50","diastolic_mm_hg":"80","ecog":"1","iadl":"20","ldh_u_l":"500","ldh_uln_u_l":"618","mms":"28","mna":"26"},{"chemotox":"0.50","diastolic_mm_hg":"80","ecog":"1","iadl":"20","ldh_u_l":"500","ldh_uln_u_l":"618","mms":"28","mna":"26"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/possum":{"get":{"description":"Sum Copeland 1991 Table 1 physiologic and Table 2 operative severity items, then return the published morbidity and mortality probabilities from the unrounded logits.\n\nWhen an agent needs the original POSSUM audit scores and logits and must not substitute P-POSSUM (Whiteley), invent risk classes, or issue operative consent.\n\nNot a medical device. Not a diagnosis. Not an operative-consent tool. magent does not examine the patient.\n\nCopeland 1991 Tables 1-2 and the original morbidity and mortality logits only. This is not P-POSSUM (Whiteley).\n\nAge has no 8-point cell; ECG, multiple_procedures, and mode_of_surgery have no 2-point cell. magent does not cap the integer below the sum of published item maxima.\n\nEach band is caller-assigned. magent does not interpret an ECG tracing or classify an operative note.\n\nEstimated percents are population audit probabilities from the unrounded logits, not an individual outcome. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_years","description":"Age in years, integer 16-120 (Copeland 1991 Table 1). ≤60 → 1; 61-70 → 2; ≥71 → 4. No 8-point cell.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"cardiac","description":"Copeland 1991 cardiac signs as assigned by the caller: no_failure (1); diuretic_digoxin_antianginal_or_hypertensive (2); peripheral_edema_warfarin_or_borderline_cardiomegaly (4); raised_jvp_or_cardiomegaly (8). magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["no_failure","diuretic_digoxin_antianginal_or_hypertensive","peripheral_edema_warfarin_or_borderline_cardiomegaly","raised_jvp_or_cardiomegaly"]},"example":"no_failure"},{"in":"query","name":"respiratory","description":"Copeland 1991 respiratory history as assigned by the caller: no_dyspnea (1); exertional_or_mild_coad (2); limiting_or_moderate_coad (4); rest_or_fibrosis_consolidation (8). magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["no_dyspnea","exertional_or_mild_coad","limiting_or_moderate_coad","rest_or_fibrosis_consolidation"]},"example":"no_dyspnea"},{"in":"query","name":"systolic_bp_mm_hg","description":"Systolic blood pressure in mm Hg (20-300). 110-130 → 1; 100-109 or 131-170 → 2; 90-99 or ≥171 → 4; ≤89 → 8. magent does not measure blood pressure.","required":true,"schema":{"type":"number"},"example":"120"},{"in":"query","name":"pulse","description":"Pulse in beats/min, integer 20-250. 50-80 → 1; 81-100 → 2; 40-49 or 101-120 → 4; ≤39 or ≥121 → 8. magent does not measure pulse.","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"gcs","description":"Glasgow Coma Scale total as assigned by the caller, integer 3-15. 15 → 1; 12-14 → 2; 9-11 → 4; ≤8 → 8. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"15"},{"in":"query","name":"hemoglobin_g_dl","description":"Haemoglobin in g/dL (3-25). 13-16 → 1; 11.5-12.9 or 16.1-17.0 → 2; 10.0-11.4 or 17.1-18.0 → 4; ≤9.9 or ≥18.1 → 8.","required":true,"schema":{"type":"number"},"example":"14"},{"in":"query","name":"wbc_k_ul","description":"White cell count in ×10^9/L (0.1-100). 4.0-10.0 → 1; 10.1-20.0 or 3.1-3.9 → 2; ≥20.1 → 4; ≤3.0 → 8. Table 1 lists 3.1-4.0 on the 2-point cell; 4.0 is scored in the 1-point band.","required":true,"schema":{"type":"number"},"example":"8"},{"in":"query","name":"urea_mmol_l","description":"Serum urea in mmol/L (0.5-80). ≤7.5 → 1; 7.6-10.0 → 2; 10.1-15.0 → 4; ≥15.1 → 8.","required":true,"schema":{"type":"number"},"example":"5"},{"in":"query","name":"sodium_mmol_l","description":"Serum sodium in mmol/L (90-200). ≥136 → 1; 131-135 → 2; 126-130 → 4; ≤125 → 8.","required":true,"schema":{"type":"number"},"example":"140"},{"in":"query","name":"potassium_mmol_l","description":"Serum potassium in mmol/L (1-12). 3.5-5.0 → 1; 3.2-3.4 or 5.1-5.3 → 2; 2.9-3.1 or 5.4-5.9 → 4; ≤2.8 or ≥6.0 → 8.","required":true,"schema":{"type":"number"},"example":"4.0"},{"in":"query","name":"ecg","description":"Copeland 1991 electrocardiogram as assigned by the caller: normal (1); atrial_fibrillation_60_90 (4); other_abnormal_or_ectopics_or_q_st_t (8). No 2-point cell. magent does not interpret a tracing.","required":true,"schema":{"type":"string","enum":["normal","atrial_fibrillation_60_90","other_abnormal_or_ectopics_or_q_st_t"]},"example":"normal"},{"in":"query","name":"operative_severity","description":"Copeland 1991 Table 2 operative severity as assigned by the caller: minor (1); moderate (2); major (4); major_plus (8). magent does not classify an operative note.","required":true,"schema":{"type":"string","enum":["minor","moderate","major","major_plus"]},"example":"minor"},{"in":"query","name":"multiple_procedures","description":"Number of procedures as assigned by the caller: one (1); two (4); more_than_two (8). No 2-point cell.","required":true,"schema":{"type":"string","enum":["one","two","more_than_two"]},"example":"one"},{"in":"query","name":"blood_loss_ml","description":"Total blood loss in mL (0-20000). ≤100 → 1; 101-500 → 2; 501-999 → 4; ≥1000 → 8. Table 2 writes <100 then 101-500; 100 mL is scored with the lowest band.","required":true,"schema":{"type":"number"},"example":"50"},{"in":"query","name":"peritoneal_soiling","description":"Copeland 1991 peritoneal soiling as assigned by the caller: none (1); minor_serous (2); local_pus (4); free_bowel_pus_blood (8). magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["none","minor_serous","local_pus","free_bowel_pus_blood"]},"example":"none"},{"in":"query","name":"malignancy","description":"Copeland 1991 presence of malignancy as assigned by the caller: none (1); primary_only (2); nodal_metastases (4); distant_metastases (8). magent does not diagnose.","required":true,"schema":{"type":"string","enum":["none","primary_only","nodal_metastases","distant_metastases"]},"example":"none"},{"in":"query","name":"mode_of_surgery","description":"Copeland 1991 mode of surgery as assigned by the caller: elective (1); emergency_resuscitation_gt_2h_or_lt_24h (4); immediate_lt_2h (8). No 2-point cell.","required":true,"schema":{"type":"string","enum":["elective","emergency_resuscitation_gt_2h_or_lt_24h","immediate_lt_2h"]},"example":"elective"}],"summary":"POSSUM","operationId":"get_api_calc_possum","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, physiologic_score, operative_score, morbidity_logit, mortality_logit, estimated_morbidity_percent, estimated_mortality_percent, components, citation, disclaimer."},"400":{"description":"invalid_possum: POSSUM needs Copeland 1991 physiologic and operative severity items in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/possum"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"POSSUM (bulk)","operationId":"post_api_calc_possum","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_possum: POSSUM needs Copeland 1991 physiologic and operative severity items in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/possum"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_years":"50","blood_loss_ml":"50","cardiac":"no_failure","ecg":"normal","gcs":"15","hemoglobin_g_dl":"14","malignancy":"none","mode_of_surgery":"elective","multiple_procedures":"one","operative_severity":"minor","peritoneal_soiling":"none","potassium_mmol_l":"4.0","pulse":"70","respiratory":"no_dyspnea","sodium_mmol_l":"140","systolic_bp_mm_hg":"120","urea_mmol_l":"5","wbc_k_ul":"8"},{"age_years":"50","blood_loss_ml":"50","cardiac":"no_failure","ecg":"normal","gcs":"15","hemoglobin_g_dl":"14","malignancy":"none","mode_of_surgery":"elective","multiple_procedures":"one","operative_severity":"minor","peritoneal_soiling":"none","potassium_mmol_l":"4.0","pulse":"70","respiratory":"no_dyspnea","sodium_mmol_l":"140","systolic_bp_mm_hg":"120","urea_mmol_l":"5","wbc_k_ul":"8"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/naloxone-drip":{"get":{"description":"Compute a continuous intravenous naloxone infusion rate as two-thirds of the caller-assigned reversal bolus each hour, using the Goldfrank 1986 text rule.\n\nWhen an agent needs the published Goldfrank 1986 two-thirds infusion from a reversal bolus already given and must not invent a bolus, start naloxone, or look up a nomogram image.\n\nNot a medical device. Deterministic published-formula output only.\n\nNot a prescription. magent does not name a product, route, concentration, or pump program.\n\nNot an indication to start naloxone. This tool only converts a reversal bolus the caller already assigned.\n\nmagent does not choose the reversal bolus. reversal_bolus_mg is the bolus already given that resulted in reversal.\n\nText rule only. Does not implement a nomogram image or chart lookup. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"reversal_bolus_mg","description":"Caller-assigned naloxone reversal bolus in mg (0.04-10.0) that already resulted in reversal. magent does not choose the bolus.","required":true,"schema":{"type":"number"},"example":"0.4"}],"summary":"Naloxone infusion","operationId":"get_api_calc_naloxone_drip","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, reversal_bolus_mg, infusion_mg_h, citation, disclaimer."},"400":{"description":"invalid_naloxone: Naloxone infusion inputs must match Goldfrank 1986 reversal bolus milligrams from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/naloxone-drip"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Naloxone infusion (bulk)","operationId":"post_api_calc_naloxone_drip","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_naloxone: Naloxone infusion inputs must match Goldfrank 1986 reversal bolus milligrams from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/naloxone-drip"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"reversal_bolus_mg":"0.4"},{"reversal_bolus_mg":"0.4"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/sickle-rbc-exchange":{"get":{"description":"Compute replacement packed-RBC volume for sickle red-cell exchange from Nadler 1962 adult blood volume and exponential remaining-fraction washout Y/Y0 = e^(−X), with caller-supplied hematocrits and HbS percents.\n\nWhen an agent needs published Nadler TBV plus remaining-fraction washout and must not invent a replacement volume, force a 30% HbS target, or write an apheresis order.\n\nNot a medical device. magent does not write an apheresis prescription, choose a machine protocol, or run vendor FCR or end-hematocrit software.\n\nAABB 2018 usual acute-exchange language is HbS not more than 30% and avoiding hyperviscosity. That is not a forced target; the caller sends target_hbs_percent.\n\nAdult Nadler 1962 blood volume only (male and female equations; H meters, W kg). Not a 70 mL/kg rule. Exponential remaining-fraction washout only; not a linear (1 − FCR) volume.\n\nReplacement hematocrit is caller-supplied (typical additive units about 60 percent). magent does not assay the unit or choose a product. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sex","description":"Sex used by Nadler 1962 (separate male and female equations).","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"height_cm","description":"Height in centimeters. Provide height_cm or height_in.","required":false,"schema":{"type":"number"},"example":170},{"in":"query","name":"height_in","description":"Height in inches. Converted as cm = in * 2.54.","required":false,"schema":{"type":"number"},"example":66.92913385826772},{"in":"query","name":"weight_kg","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"schema":{"type":"number"},"example":70},{"in":"query","name":"weight_lb","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"schema":{"type":"number"},"example":154.32},{"in":"query","name":"hematocrit_percent","description":"Patient hematocrit as a percent (10-70). Required. Not a 0-1 fraction.","required":true,"schema":{"type":"number"},"example":30},{"in":"query","name":"initial_hbs_percent","description":"Initial HbS percent (1-100). Required. Must be greater than target_hbs_percent.","required":true,"schema":{"type":"number"},"example":90},{"in":"query","name":"target_hbs_percent","description":"Target HbS percent (1-100). Required. Must be strictly less than initial_hbs_percent. AABB 2018 usual goal language is HbS not more than 30%; the caller sends this value.","required":true,"schema":{"type":"number"},"example":30},{"in":"query","name":"replacement_hct_percent","description":"Replacement packed-RBC hematocrit as a percent (50-80). Required. Typical additive units are about 60. magent does not assay the unit.","required":true,"schema":{"type":"number"},"example":60},{"in":"query","name":"unit_volume_ml","description":"Optional caller-assigned unit volume in mL (50-500). When sent, response includes approx_units = replacement_prbc_ml / unit_volume_ml.","required":false,"schema":{"type":"number"},"example":350}],"summary":"Sickle RBC exchange","operationId":"get_api_calc_sickle_rbc_exchange","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, sex, height_cm, weight_kg, blood_volume_l, blood_volume_ml, hematocrit_percent, initial_hbs_percent, target_hbs_percent, replacement_hct_percent, patient_rbc_volume_ml, fcr, rbc_volumes_exchanged, replacement_prbc_ml, unit_volume_ml, approx_units, citation, disclaimer."},"400":{"description":"invalid_rbc_exchange: RBC exchange needs hematocrit, HbS fractions, and replacement hematocrit in published ranges. Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_height: height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_hbs: initial_hbs_percent and target_hbs_percent must be 1-100 with target below initial. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sickle-rbc-exchange"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Sickle RBC exchange (bulk)","operationId":"post_api_calc_sickle_rbc_exchange","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rbc_exchange: RBC exchange needs hematocrit, HbS fractions, and replacement hematocrit in published ranges. Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_height: height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_hbs: initial_hbs_percent and target_hbs_percent must be 1-100 with target below initial. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sickle-rbc-exchange"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"height_cm":"170","hematocrit_percent":"30","initial_hbs_percent":"90","replacement_hct_percent":"60","sex":"male","target_hbs_percent":"30","weight_kg":"70"},{"height_cm":"170","hematocrit_percent":"30","initial_hbs_percent":"90","replacement_hct_percent":"60","sex":"male","target_hbs_percent":"30","weight_kg":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/triss":{"get":{"description":"Compute Boyd 1987 TRISS probability of survival from mechanism, Champion weighted RTS, ISS, and age using the original Major Trauma Outcome Study coefficients printed with that method.\n\nWhen an agent needs the published Boyd 1987 TRISS probability of survival and must not recode GCS/SBP/RR, substitute NISS or ASCOT, or apply Champion 1995 revised coefficients.\n\nNot a medical device. Not a triage order, trauma-activation, or disposition.\n\nRTS is a caller-assigned Champion weighted Revised Trauma Score (0.0-7.8408). magent does not recode GCS, SBP, or respiratory rate here.\n\nISS is a caller-assigned Baker total (1-75). This tool does not compute ISS from AIS, NISS, or ASCOT.\n\nBoyd 1987 original MTOS coefficients only. Champion 1995 revised TRISS coefficients are not this tool.\n\nAgeIndex is 0 if age < 55 and 1 if age >= 55 as published. magent does not use continuous age. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"mechanism","description":"blunt or penetrating. Selects the Boyd 1987 original MTOS coefficient set. Required; magent does not infer mechanism.","required":true,"schema":{"type":"string","enum":["blunt","penetrating"]},"example":"blunt"},{"in":"query","name":"rts","description":"Caller-assigned Champion weighted Revised Trauma Score (number 0.0-7.8408). magent does not recode GCS, SBP, or respiratory rate here.","required":true,"schema":{"type":"number"},"example":"7.8408"},{"in":"query","name":"iss","description":"Caller-assigned Injury Severity Score integer 1-75. magent does not compute ISS from AIS here.","required":true,"schema":{"type":"integer"},"example":"9"},{"in":"query","name":"age","description":"Age in whole years 1-120. AgeIndex is 0 if age < 55 and 1 if age >= 55 (Boyd 1987).","required":true,"schema":{"type":"integer"},"example":"30"}],"summary":"TRISS","operationId":"get_api_calc_triss","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, mechanism, rts, iss, age, age_index, b, survival_probability, citation, disclaimer."},"400":{"description":"invalid_triss_mechanism: mechanism must be blunt or penetrating (Boyd 1987 TRISS). Returned before settlement; you are not charged.; invalid_rts_value: rts must be a number from 0.0 to 7.8408 (Champion weighted RTS for TRISS). Returned before settlement; you are not charged.; invalid_iss_total: iss must be an integer from 1 to 75 (Boyd 1987 TRISS). Returned before settlement; you are not charged.; invalid_triss_age: age must be an integer from 1 to 120 (Boyd 1987 TRISS AgeIndex). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/triss"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"TRISS (bulk)","operationId":"post_api_calc_triss","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_triss_mechanism: mechanism must be blunt or penetrating (Boyd 1987 TRISS). Returned before settlement; you are not charged.; invalid_rts_value: rts must be a number from 0.0 to 7.8408 (Champion weighted RTS for TRISS). Returned before settlement; you are not charged.; invalid_iss_total: iss must be an integer from 1 to 75 (Boyd 1987 TRISS). Returned before settlement; you are not charged.; invalid_triss_age: age must be an integer from 1 to 120 (Boyd 1987 TRISS AgeIndex). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/triss"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"30","iss":"9","mechanism":"blunt","rts":"7.8408"},{"age":"30","iss":"9","mechanism":"blunt","rts":"7.8408"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/virsta":{"get":{"description":"Sum the Tubiana 2016 VIRSTA items from caller-assigned Staphylococcus aureus bacteremia flags and CRP, and return high_risk when the total is 3 or more.\n\nWhen an agent has already assigned the Tubiana 2016 VIRSTA flags and a CRP in mg/L for Staphylococcus aureus bacteremia and needs the published 0-30 total and ≥3 high_risk flag, not a Duke classification, PREDICT/POSITIVE score, or an endocarditis diagnosis. magent does not examine the patient or assay CRP.\n\nNot a medical device and not a diagnosis or treatment recommendation. magent does not diagnose infective endocarditis.\n\nNine clinical flags are caller-assigned. magent does not examine the patient, interpret cultures, or assay CRP.\n\nPermanent intracardiac device or previous IE is one Tubiana 2016 item (4 points if either is present). The two are not added separately.\n\nCRP scores 1 only when crp_mg_l is above 190 mg/L (Tubiana 2016: above 190 mg/L). Exactly 190 scores 0. Range 0-500.\n\nhigh_risk is true iff score ≥ 3 (paper: ≤2 low IE-risk, ≥3 higher risk / echocardiography priority). magent does not invent extra strata and does not order TTE or TEE. Not the modified Duke criteria. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"cerebral_or_peripheral_emboli","description":"Caller-assigned cerebral or peripheral (extracerebral) emboli (Tubiana 2016). true scores 5. magent does not diagnose emboli or endocarditis.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"meningitis","description":"Caller-assigned meningitis (Tubiana 2016). true scores 5. magent does not diagnose meningitis or endocarditis.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"intracardiac_device_or_previous_ie","description":"Permanent intracardiac device or previous infective endocarditis as one Tubiana 2016 item. true scores 4 if either is present; the two are not added separately. magent does not diagnose IE.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"iv_drug_use","description":"Caller-assigned intravenous drug use (Tubiana 2016). true scores 4. magent does not take a social history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"native_valve_disease","description":"Caller-assigned preexisting native valve disease (Tubiana 2016). true scores 3. magent does not diagnose valve disease.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"persistent_bacteremia","description":"H48-persistent bacteremia (positive blood culture after 48 hours) as assigned by the caller (Tubiana 2016). true scores 3. magent does not interpret cultures.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"vertebral_osteomyelitis","description":"Caller-assigned vertebral osteomyelitis / spondylodiscitis (Tubiana 2016). true scores 2. magent does not diagnose osteomyelitis.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"community_or_non_nosocomial","description":"Community-acquired or non-nosocomial healthcare-associated Staphylococcus aureus bacteremia (Tubiana 2016), as assigned by the caller. true scores 2; nosocomial is false (0). magent does not classify acquisition.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"severe_sepsis_or_shock","description":"Caller-assigned severe sepsis or septic shock (Tubiana 2016). true scores 1. magent does not diagnose sepsis.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"crp_mg_l","description":"C-reactive protein in mg/L (0-500). Tubiana 2016 scores 1 if CRP is above 190 mg/L (not ≥190). magent does not assay CRP.","required":true,"schema":{"type":"number"},"example":"50"}],"summary":"VIRSTA","operationId":"get_api_calc_virsta","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, high_risk, crp_mg_l, components, citation, disclaimer."},"400":{"description":"invalid_virsta: VIRSTA needs Tubiana 2016 Staphylococcus aureus bacteremia flags and CRP in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/virsta"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"VIRSTA (bulk)","operationId":"post_api_calc_virsta","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_virsta: VIRSTA needs Tubiana 2016 Staphylococcus aureus bacteremia flags and CRP in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/virsta"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"cerebral_or_peripheral_emboli":"false","community_or_non_nosocomial":"false","crp_mg_l":"50","intracardiac_device_or_previous_ie":"false","iv_drug_use":"false","meningitis":"false","native_valve_disease":"false","persistent_bacteremia":"false","severe_sepsis_or_shock":"false","vertebral_osteomyelitis":"false"},{"cerebral_or_peripheral_emboli":"false","community_or_non_nosocomial":"false","crp_mg_l":"50","intracardiac_device_or_previous_ie":"false","iv_drug_use":"false","meningitis":"false","native_valve_disease":"false","persistent_bacteremia":"false","severe_sepsis_or_shock":"false","vertebral_osteomyelitis":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/2helps2b":{"get":{"description":"Sum the Struck 2017 2HELPS2B EEG flags and return the published probable-seizure risk percent.\n\nWhen an agent already has the six Struck 2017 flags assigned from an EEG report and needs the published point total and seizure-risk percent, not a seizure diagnosis.\n\nNot a medical device and not a seizure diagnosis. magent does not read EEG.\n\nThis tool is the Struck 2017 2HELPS2B score and published probable-seizure percents only. It is not a monitoring-duration protocol.\n\nFlags are caller-assigned. BIRDs, periodic or rhythmic patterns, frequency, plus features, and prior seizure must already be determined by the caller. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"birds","description":"Brief (ictal) rhythmic discharges (BIRDs) as assigned by the caller (Struck 2017). true scores 2. magent does not read EEG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"lpd_lrda_bipd","description":"LPD or LRDA or BIPD as assigned by the caller (Struck 2017). true scores 1. magent does not read EEG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"prior_seizure","description":"Prior seizure, acute or remote, as assigned by the caller (Struck 2017). true scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"sporadic_epileptiform","description":"Sporadic epileptiform discharges as assigned by the caller (Struck 2017). true scores 1. magent does not read EEG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"frequency_gt_2hz","description":"Frequency >2.0 Hz for any periodic or rhythmic pattern as assigned by the caller (Struck 2017). true scores 1. magent does not read EEG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"plus_features","description":"Plus features (superimposed rhythmic, sharp, or fast activity) as assigned by the caller (Struck 2017). true scores 1. magent does not read EEG.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"2HELPS2B","operationId":"get_api_calc_2helps2b","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, seizure_risk, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/2helps2b"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"2HELPS2B (bulk)","operationId":"post_api_calc_2helps2b","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/2helps2b"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"birds":"false","frequency_gt_2hz":"false","lpd_lrda_bipd":"false","plus_features":"false","prior_seizure":"false","sporadic_epileptiform":"false"},{"birds":"false","frequency_gt_2hz":"false","lpd_lrda_bipd":"false","plus_features":"false","prior_seizure":"false","sporadic_epileptiform":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/resect-90":{"get":{"description":"Compute the Taylor 2021 RESECT-90 logistic estimated 90-day mortality after lung resection from the twelve published preoperative variables in Table 3.\n\nWhen an agent needs the published RESECT-90 90-day mortality percent and must not invent a mortality band, assign ECOG, read spirometry, substitute race for sex, or issue an operative go/no-go.\n\nNot a medical device. Not a diagnosis and not an operative go/no-go.\n\nTaylor 2021 Table 3 multivariable logistic RESECT-90 only. This is not EuroSCORE II and not Gupta PRF.\n\nTaylor 2021 does not publish a low or high mortality cutoff; magent does not invent one.\n\nSex is a published coefficient. This model does not use race.\n\necog, anemia, arrhythmia, laterality, surgical_approach, diagnosis, and resected_segments are caller-assigned. magent does not assign ECOG, read spirometry or DLCO, assay creatinine, or classify an incision.\n\nCreatinine is umol/L as published. magent does not convert from mg/dL. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Taylor 2021 Table 3 coefficient 0.041 per year. magent does not read a chart.","required":true,"schema":{"type":"integer"},"example":"65"},{"in":"query","name":"sex","description":"Sex as assigned by the caller. female is the reference (0). male adds 0.493 (Taylor 2021 Table 3). This is a published sex coefficient, not race.","required":true,"schema":{"type":"string","enum":["male","female"]},"example":"male"},{"in":"query","name":"ecog","description":"ECOG / WHO performance status 0-4 as assigned by the caller (Taylor 2021 Table 3 coefficient 0.183 per point). magent does not assign ECOG.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"dlco_percent","description":"Percent predicted DLCO (10-200). Taylor 2021 Table 3 subtracts 0.029 per percent. magent does not read spirometry or a gas-transfer tracing.","required":true,"schema":{"type":"number"},"example":"73"},{"in":"query","name":"bmi","description":"Body-mass index in kg/m2 (10-80). Taylor 2021 Table 3 subtracts 0.056 per kg/m2. magent does not weigh the patient.","required":true,"schema":{"type":"number"},"example":"27"},{"in":"query","name":"creatinine_umol_l","description":"Serum creatinine in µmol/L as published (20-2000). Taylor 2021 Table 3 coefficient 0.005 per µmol/L. Not mg/dL.","required":true,"schema":{"type":"number"},"example":"74"},{"in":"query","name":"anemia","description":"Taylor 2021 WHO anaemia as assigned by the caller: haemoglobin <120 g/L for women or <130 g/L for men (+0.242). true or false. magent does not read a haemoglobin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"arrhythmia","description":"Preoperative arrhythmia as assigned by the caller (Taylor 2021 Table 3 +0.608). true or false. magent does not read an ECG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"laterality","description":"Resection laterality as assigned by the caller. left is the reference (0). right adds 0.379 (Taylor 2021 Table 3). magent does not read an operative note.","required":true,"schema":{"type":"string","enum":["left","right"]},"example":"left"},{"in":"query","name":"surgical_approach","description":"Approach as assigned by the caller. vats is the non-thoracotomy reference (0). thoracotomy adds 0.634 (Taylor 2021 Table 3). magent does not classify the incision.","required":true,"schema":{"type":"string","enum":["vats","thoracotomy"]},"example":"vats"},{"in":"query","name":"diagnosis","description":"Diagnosis as assigned by the caller. benign is the reference (0). malignant (confirmed or suspected) adds 0.769 (Taylor 2021 Table 3).","required":true,"schema":{"type":"string","enum":["benign","malignant"]},"example":"benign"},{"in":"query","name":"resected_segments","description":"Number of resected bronchopulmonary segments (0-19). Taylor 2021 Table 3 coefficient 0.179 per segment. magent does not map a procedure to segments.","required":true,"schema":{"type":"integer"},"example":"3"}],"summary":"RESECT-90","operationId":"get_api_calc_resect_90","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, sex, ecog, dlco_percent, bmi, creatinine_umol_l, anemia, arrhythmia, laterality, surgical_approach, diagnosis, resected_segments, logit, estimated_mortality_percent, citation, disclaimer."},"400":{"description":"invalid_resect_90: RESECT-90 needs Taylor 2021 lung-resection predictors in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/resect-90"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"RESECT-90 (bulk)","operationId":"post_api_calc_resect_90","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_resect_90: RESECT-90 needs Taylor 2021 lung-resection predictors in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/resect-90"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"65","anemia":"false","arrhythmia":"false","bmi":"27","creatinine_umol_l":"74","diagnosis":"benign","dlco_percent":"73","ecog":"0","laterality":"left","resected_segments":"3","sex":"male","surgical_approach":"vats"},{"age":"65","anemia":"false","arrhythmia":"false","bmi":"27","creatinine_umol_l":"74","diagnosis":"benign","dlco_percent":"73","ecog":"0","laterality":"left","resected_segments":"3","sex":"male","surgical_approach":"vats"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/serum-osmolality":{"get":{"description":"Compute Worthley calculated serum osmolality from sodium, glucose, and BUN, plus an optional osmolar gap when a measured osm is supplied.\n\nWhen an agent needs a published 2×Na calculated osmolality and must not invent an ethanol, mannitol, or 1.86×Na+9 formula.\n\nWorthley argued the simple 2×Na formula is the best. This is a calculated osmolarity/osmolality estimate from sodium, glucose, and BUN only — not a measured freezing-point osmometer.\n\nDoes not include ethanol, mannitol, or a 1.86×Na+9 (Dorwart–Chalmers) term. Not a diagnosis of a toxic alcohol or an osmolar-gap workup. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sodium_mmol_l","description":"Serum sodium in mmol/L (110-160).","required":true,"schema":{"type":"number"},"example":"140"},{"in":"query","name":"glucose_mg_dl","description":"Plasma glucose in mg/dL (50-1000). Provide this or glucose_mmol_l.","required":false,"schema":{"type":"number"},"example":"90"},{"in":"query","name":"glucose_mmol_l","description":"Plasma glucose in mmol/L (2.8-55.5). Converted as mg/dL = mmol/L * 18.015.","required":false,"schema":{"type":"number"},"example":"5.0"},{"in":"query","name":"bun_mg_dl","description":"Blood urea nitrogen in mg/dL (1-200).","required":true,"schema":{"type":"number"},"example":"14"},{"in":"query","name":"measured_osm_mosm_kg","description":"Measured serum osmolality in mOsm/kg (200-400). When supplied, osm_gap_mosm_kg is returned.","required":false,"schema":{"type":"number"},"example":"305"}],"summary":"Serum osmolality","operationId":"get_api_calc_serum_osmolality","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, sodium_mmol_l, glucose_mg_dl, bun_mg_dl, calculated_osm_mosm_kg, osm_gap_mosm_kg, citation, disclaimer."},"400":{"description":"invalid_sodium: sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.; invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_bun: bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.; invalid_measured_osmolality: measured_osm_mosm_kg must be a number from 200 to 400. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/serum-osmolality"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Serum osmolality (bulk)","operationId":"post_api_calc_serum_osmolality","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_sodium: sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.; invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_bun: bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.; invalid_measured_osmolality: measured_osm_mosm_kg must be a number from 200 to 400. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/serum-osmolality"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bun_mg_dl":"14","glucose_mg_dl":"90","sodium_mmol_l":"140"},{"bun_mg_dl":"14","glucose_mg_dl":"90","sodium_mmol_l":"140"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/heart":{"get":{"description":"Compute the HEART score as age points plus caller-assigned history, ECG, risk factors, and troponin (each 0-2).\n\nWhen an agent needs the published Six 2008 HEART total and must not invent history, ECG, risk-factor, or troponin points from a tracing or assay.\n\nNot a diagnosis or discharge protocol.\n\nhistory, ecg, risk_factors, and troponin are caller-assigned integers 0-2. magent does not interpret the history, count risk factors, or read an ECG.\n\nThis is the HEART score (Six 2008), not HEART Pathway. Troponin uses Six 2008 bands (≤ULN / 1-2× ULN / >2× ULN). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Younger than 45 scores 0; 45-64 scores 1; 65 or older scores 2.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"history","description":"Caller-assigned history. 0 nonspecific, 1 moderately suspicious, 2 highly suspicious. magent does not interpret the history.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"ecg","description":"Caller-assigned ECG. 0 normal; 1 repolarization without significant ST depression (including BBB, LVH, digoxin, or known unchanged); 2 significant ST depression or elevation without those confounders. magent does not read an ECG.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"risk_factors","description":"Caller-assigned risk-factor points. 0 none, 1 = 1-2 risk factors, 2 = ≥3 or atherosclerotic disease. magent does not count diabetes, smoking, or other factors.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"troponin","description":"Caller-assigned troponin. 0 ≤ULN, 1 = 1-2× ULN, 2 = >2× ULN (Six 2008). magent does not interpret assays.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"HEART score","operationId":"get_api_calc_heart","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, heart_band, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_heart_component: history, ecg, risk_factors, and troponin must each be 0, 1, or 2. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/heart"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HEART score (bulk)","operationId":"post_api_calc_heart","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_heart_component: history, ecg, risk_factors, and troponin must each be 0, 1, or 2. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/heart"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","ecg":"0","history":"0","risk_factors":"0","troponin":"0"},{"age":"40","ecg":"0","history":"0","risk_factors":"0","troponin":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/sich":{"get":{"description":"Sum the four Cucchiara 2008 sICH flags and return the 0-4 total plus that paper's any-ICH percents (2.6/9.7/15.1/37.9% for scores 0/1/2/>=3).\n\nWhen an agent has caller-assigned age >60, NIHSS >10, glucose >150 mg/dL, and platelets <150,000/mm3 flags and needs the published sICH total and any-ICH percents, without inventing NIHSS, lab values, or later unofficial hemorrhage percents.\n\nNot a medical device.\n\nNot a tPA order, withhold, or thrombolysis decision.\n\nNot a hemorrhage diagnosis.\n\nmagent does not assay glucose or platelets or compute NIHSS. The caller assigns the four Cucchiara 2008 flags (age >60 years, baseline NIHSS >10, baseline glucose >150 mg/dL / 8.325 mmol/L, baseline platelets <150,000/mm3).\n\nAny-ICH percents are Cucchiara 2008: 2.6% (0), 9.7% (1), 15.1% (2), 37.9% (>=3). Scores 3 and 4 both return 37.9. magent does not invent later unofficial hemorrhage percents. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_gt_60","description":"Age >60 years as assigned by the caller (Cucchiara 2008). true or false. magent does not assign age from a numeric value.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"nihss_gt_10","description":"Baseline NIHSS >10 as assigned by the caller (Cucchiara 2008). true or false. magent does not compute NIHSS or examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"glucose_gt_150","description":"Baseline glucose >150 mg/dL (8.325 mmol/L) as assigned by the caller (Cucchiara 2008). true or false. magent does not assay glucose or convert units.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"platelets_lt_150k","description":"Baseline platelet count <150,000/mm3 as assigned by the caller (Cucchiara 2008). true or false. magent does not assay platelets.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"sICH","operationId":"get_api_calc_sich","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, any_ich_percent, age_gt_60, nihss_gt_10, glucose_gt_150, platelets_lt_150k, components, citation, disclaimer."},"400":{"description":"invalid_sich: sICH score inputs must match Cucchiara 2008 age, NIHSS, glucose, and platelet flags from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sich"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"sICH (bulk)","operationId":"post_api_calc_sich","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_sich: sICH score inputs must match Cucchiara 2008 age, NIHSS, glucose, and platelet flags from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sich"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_gt_60":"false","glucose_gt_150":"false","nihss_gt_10":"false","platelets_lt_150k":"false"},{"age_gt_60":"false","glucose_gt_150":"false","nihss_gt_10":"false","platelets_lt_150k":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/irae-diabetes":{"get":{"description":"Apply Brahmer 2018 ASCO Table 4.4 immune-related diabetes fasting-glucose bands and return grade 0–4 plus icpi_action from glucose_mg_dl and caller-assigned ketosis, t1dm, severe_unable_adl, and life_threatening flags.\n\nWhen an agent already has a fasting glucose in mg/dL and those caller-assigned flags during immune checkpoint inhibitor therapy and needs the published ASCO 2018 diabetes grade and continue / hold-until-control / hold-admit band. magent does not assay glucose.\n\nNot a medical device.\n\nNot a diagnosis. Not an insulin dose.\n\nmg/dL only; mmol/L is not accepted. magent does not assay glucose.\n\nNot DKA diagnostic criteria as a separate instrument.\n\nketosis, t1dm, severe_unable_adl, and life_threatening are caller-assigned (Brahmer 2018 Table 4.4). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"glucose_mg_dl","description":"Fasting glucose in mg/dL (50-1000). Brahmer 2018 Table 4.4 bands: >500 grade 4; >250 grade 3; >160 grade 2; >99 grade 1; else grade 0 unless a flag upgrades. mmol/L is not accepted. magent does not assay glucose.","required":true,"schema":{"type":"number"},"example":"140"},{"in":"query","name":"ketosis","description":"Ketosis as assigned by the caller (Brahmer 2018 Table 4.4 grade 2; ketosis at any glucose). true or false. When true and grade 4/3 criteria are not met, grade is 2. magent does not assay ketones.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"t1dm","description":"Evidence of type 1 diabetes as assigned by the caller (Brahmer 2018 Table 4.4 grade 2; T1DM at any glucose). true or false. When true and grade 4/3 criteria are not met, grade is 2. magent does not diagnose diabetes.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"life_threatening","description":"Life-threatening consequences as assigned by the caller (Brahmer 2018 Table 4.4 grade 4). true or false. When true, grade is 4 regardless of glucose. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"severe_unable_adl","description":"Severe symptoms limiting self-care ADL as assigned by the caller (Brahmer 2018 Table 4.4 grade 3). true or false. When true and life_threatening is false and glucose is not >500, grade is 3. magent does not assess ADL.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"irAE diabetes","operationId":"get_api_calc_irae_diabetes","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, grade, icpi_action, glucose_mg_dl, ketosis, t1dm, life_threatening, severe_unable_adl, criteria, citation, disclaimer."},"400":{"description":"invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/irae-diabetes"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"irAE diabetes (bulk)","operationId":"post_api_calc_irae_diabetes","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/irae-diabetes"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"glucose_mg_dl":"140","ketosis":"false","life_threatening":"false","severe_unable_adl":"false","t1dm":"false"},{"glucose_mg_dl":"140","ketosis":"false","life_threatening":"false","severe_unable_adl":"false","t1dm":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pompe-c":{"get":{"description":"Compute the Kline 2012 POMPE-C 30-day mortality probability for a caller who already has active cancer and acute pulmonary embolism, from five dichotomous findings plus respiratory rate, room-air SpO2, and weight in pounds.\n\nWhen an agent already has active cancer and image-proven acute PE as in the paper and needs the published logistic 30-day mortality percent and low/intermediate/high band, not a PE or cancer diagnosis, not integer points, and not a treatment or dose order.\n\nNot a medical device. magent does not diagnose pulmonary embolism or cancer and does not recommend a dose or disposition.\n\nDerivation and validation were patients with active cancer and acute PE. This is not a PE diagnostic tool and not a cancer-screening tool.\n\nThis is the Kline 2012 web-prototype logistic (intercept 3.718). magent does not emit integer points or a survival percent other than this 30-day mortality estimate.\n\nDichotomous inputs are caller-assigned. magent does not examine the patient, read a DNR order, take a pulse, or measure saturation or weight.\n\nSpO2 is room-air pulse oximetry as in the paper. Weight is pounds. Bands are the paper's 5% and 50% validation cutoffs, not treatment thresholds. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"dnr","description":"Do-not-resuscitate status as assigned by the caller (Kline 2012: new or existing verbal or written desire not to be resuscitated). true or false. magent does not read an advance directive.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"respiratory_distress","description":"Respiratory distress as assigned by the caller (Kline 2012: obvious anxiety from dyspnea or increased work of breathing). true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"unilateral_leg_swelling","description":"Unilateral limb swelling as assigned by the caller (Kline 2012: new noticeable arm or leg asymmetry). true or false. magent does not examine the limbs.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"altered_mental_status","description":"Altered mental status as assigned by the caller (Kline 2012: acute impairment in consciousness, new disorientation, delirium, or confusion). true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"heart_rate_gt_99","description":"Heart rate documented over 99 beats/min in the previous six hours, as assigned by the caller. true or false. magent does not take a pulse.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"respiratory_rate","description":"Highest documented respiratory rate in breaths/min within the previous six hours (integer 4-80). Continuous predictor in the Kline 2012 prototype logistic.","required":true,"schema":{"type":"integer"},"example":"18"},{"in":"query","name":"spo2_percent","description":"Most recent pulse oximetry on room air, percent (50-100). Continuous predictor in the Kline 2012 prototype logistic. magent does not measure saturation.","required":true,"schema":{"type":"number"},"example":"97"},{"in":"query","name":"weight_lb","description":"Body weight in pounds (2-1100), measured or by patient estimate as in Kline 2012. Pounds enter the logistic directly. magent does not convert from kilograms.","required":true,"schema":{"type":"number"},"example":"170"}],"summary":"POMPE-C","operationId":"get_api_calc_pompe_c","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, dnr, respiratory_distress, unilateral_leg_swelling, altered_mental_status, heart_rate_gt_99, respiratory_rate, spo2_percent, weight_lb, logit, mortality_pct, risk_band, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_respiratory_rate: respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pompe-c"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"POMPE-C (bulk)","operationId":"post_api_calc_pompe_c","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_respiratory_rate: respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pompe-c"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"altered_mental_status":"false","dnr":"false","heart_rate_gt_99":"false","respiratory_distress":"false","respiratory_rate":"18","spo2_percent":"97","unilateral_leg_swelling":"false","weight_lb":"170"},{"altered_mental_status":"false","dnr":"false","heart_rate_gt_99":"false","respiratory_distress":"false","respiratory_rate":"18","spo2_percent":"97","unilateral_leg_swelling":"false","weight_lb":"170"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/score2":{"get":{"description":"Compute the ESC 2021 SCORE2 10-year fatal plus non-fatal CVD percent for adults aged 40-69 from sex, current smoking, systolic blood pressure, non-HDL cholesterol, and European geographic risk region.\n\nWhen an agent already has those SCORE2 2021 predictors for a person aged 40-69 without prior CVD or diabetes and needs that paper's region-calibrated 10-year CVD percent. Not a diagnosis, statin order, SCORE2-OP, SCORE2-Diabetes, or 2013 pooled-cohort equation.\n\nNot a medical device. Not a diagnosis of cardiovascular disease. Not a statin order or treatment recommendation.\n\nSCORE2 2021 for ages 40-69 only. Not SCORE2-OP (age 70 or older). Not SCORE2-Diabetes. Not intended for people with prior CVD or diabetes.\n\nNot the 2013 ACC/AHA pooled-cohort equations. Not Reynolds. european_risk_region is the paper's geographic calibration (low, moderate, high, very_high), not race or ethnicity.\n\nCharts display non-HDL. The published equation uses total and HDL cholesterol; magent evaluates it at the paper's HDL centering 1.3 mmol/L (TC = non-HDL + 1.3), matching the printed 50-year-old example (TC 5.5, HDL 1.3).\n\nCaller assigns age, sex, smoking, blood pressure, non-HDL, and European risk region. magent does not assay lipids and does not measure blood pressure. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 40-69). SCORE2 2021 is for ages 40-69. Not SCORE2-OP (age 70 or older).","required":true,"schema":{"type":"integer"},"example":50},{"in":"query","name":"sex","description":"Sex used by the sex-specific SCORE2 2021 coefficients (female or male).","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"smoker","description":"Current cigarette smoking as assigned by the caller (true or false). magent does not take a smoking history.","required":true,"schema":{"type":"boolean"},"example":true},{"in":"query","name":"sbp_mm_hg","description":"Systolic blood pressure in mm Hg (50-250). Enters as (SBP-120)/20. magent does not measure blood pressure.","required":true,"schema":{"type":"number"},"example":140},{"in":"query","name":"non_hdl_mmol_l","description":"Non-HDL cholesterol in mmol/L (1-12). SCORE2 charts display non-HDL. The published equation uses TC and HDL at the paper HDL centering 1.3 mmol/L (TC = non-HDL + 1.3). The printed 50-year-old example is TC 5.5 and HDL 1.3 (non-HDL 4.2). magent does not assay lipids.","required":true,"schema":{"type":"number"},"example":4.2},{"in":"query","name":"european_risk_region","description":"Geographic SCORE2 2021 calibration region (low, moderate, high, or very_high) as printed in that paper. Not race. Not ethnicity.","required":true,"schema":{"type":"string","enum":["low","moderate","high","very_high"]},"example":"low"}],"summary":"SCORE2 10-year CVD risk","operationId":"get_api_calc_score2","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age, sex, smoker, sbp_mm_hg, non_hdl_mmol_l, total_cholesterol_mmol_l, hdl_mmol_l, european_risk_region, linear_predictor, risk_10y_percent, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_score2_region: european_risk_region must be low, moderate, high, or very_high as printed in SCORE2 2021 (geographic calibration, not race). Returned before settlement; you are not charged.; invalid_score2: SCORE2 2021 inputs must match that paper's age 40-69, sex, smoking, systolic BP, non-HDL cholesterol, and European risk region. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/score2"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SCORE2 10-year CVD risk (bulk)","operationId":"post_api_calc_score2","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_score2_region: european_risk_region must be low, moderate, high, or very_high as printed in SCORE2 2021 (geographic calibration, not race). Returned before settlement; you are not charged.; invalid_score2: SCORE2 2021 inputs must match that paper's age 40-69, sex, smoking, systolic BP, non-HDL cholesterol, and European risk region. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/score2"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","european_risk_region":"low","non_hdl_mmol_l":"4.2","sbp_mm_hg":"140","sex":"male","smoker":"true"},{"age":"50","european_risk_region":"low","non_hdl_mmol_l":"4.2","sbp_mm_hg":"140","sex":"male","smoker":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/abbey":{"get":{"description":"Sum six caller-assigned Abbey 2004 observational integers (0-3) and return the published total (max 18) and that paper's none/mild/moderate/severe bands.\n\nWhen an agent has already assigned Abbey 2004 0-3 integers for vocalization, facial expression, change in body language, behavioural change, physiological change, and physical changes and needs the published total and bands, not a pain diagnosis, analgesic order, or a PAINAD score.\n\nNot a medical device and not a pain diagnosis or analgesic order.\n\nEach of the six items is a caller-assigned integer 0 (absent), 1 (mild), 2 (moderate), or 3 (severe) from Abbey 2004. magent does not observe the patient.\n\nAbbey 2004 published total bands 0-2 none, 3-7 mild, 8-13 moderate, and 14+ severe. magent does not add an acute versus chronic classification from those six integers; that tick is not a function of the score.\n\nNot PAINAD (Warden 2003 items are 0-2). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"vocalization","description":"Caller-assigned Abbey 2004 vocalization (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: whimpering, groaning, crying. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"facial_expression","description":"Caller-assigned Abbey 2004 facial expression (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: looking tense, frowning, grimacing, looking frightened. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"change_in_body_language","description":"Caller-assigned Abbey 2004 change in body language (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: fidgeting, rocking, guarding part of body, withdrawn. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"behavioural_change","description":"Caller-assigned Abbey 2004 behavioural change (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: increased confusion, refusing to eat, alteration in usual patterns. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"physiological_change","description":"Caller-assigned Abbey 2004 physiological change (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: temperature, pulse or blood pressure outside normal limits, perspiring, flushing or pallor. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"physical_changes","description":"Caller-assigned Abbey 2004 physical changes (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: skin tears, pressure areas, arthritis, contractures, previous injuries. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"Abbey Pain Scale","operationId":"get_api_calc_abbey","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, severity, components, citation, disclaimer."},"400":{"description":"invalid_abbey: Abbey pain-scale inputs must be the six caller-assigned 0-3 observational items from Abbey 2004. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/abbey"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Abbey Pain Scale (bulk)","operationId":"post_api_calc_abbey","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_abbey: Abbey pain-scale inputs must be the six caller-assigned 0-3 observational items from Abbey 2004. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/abbey"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"behavioural_change":"0","change_in_body_language":"0","facial_expression":"0","physical_changes":"0","physiological_change":"0","vocalization":"0"},{"behavioural_change":"0","change_in_body_language":"0","facial_expression":"0","physical_changes":"0","physiological_change":"0","vocalization":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ottawa-ankle":{"get":{"description":"Apply the Stiell 1992 Ottawa ankle rule and return whether an ankle x-ray series is indicated from caller-assigned malleolar pain, malleolar bone tenderness, and inability to bear weight.\n\nWhen an agent has caller-assigned findings after blunt ankle injury and needs the published ankle-series radiography rule, not the Ottawa foot rule.\n\nNot a diagnosis of fracture. magent does not examine the ankle.\n\nThis tool is the Ottawa ankle rule only. It is not the Ottawa foot or midfoot rule (navicular or fifth metatarsal) and not the Pittsburgh knee rule.\n\nInability to bear weight means both immediately after injury and in the emergency department (four steps). One alone is not enough.\n\nAdult rule as published. magent does not take age; the caller assigns the five findings. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"malleolar_pain","description":"Pain in the malleolar zone as assigned by the caller. true or false. Ankle x-ray is not indicated when false, even if tenderness flags are true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"lateral_malleolus_tenderness","description":"Bone tenderness at the posterior edge or tip of the lateral malleolus. true or false. Applies only inside the malleolar zone.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"medial_malleolus_tenderness","description":"Bone tenderness at the posterior edge or tip of the medial malleolus. true or false. Applies only inside the malleolar zone.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"unable_to_bear_weight_immediately","description":"Unable to bear weight immediately after injury (four steps). true or false. Counts only when also unable in the emergency department.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"unable_to_bear_weight_in_ed","description":"Unable to bear weight in the emergency department (four steps). true or false. Counts only when also unable immediately after injury.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Ottawa ankle rule","operationId":"get_api_calc_ottawa_ankle","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, xray_indicated, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ottawa-ankle"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Ottawa ankle rule (bulk)","operationId":"post_api_calc_ottawa_ankle","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ottawa-ankle"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"lateral_malleolus_tenderness":"false","malleolar_pain":"false","medial_malleolus_tenderness":"false","unable_to_bear_weight_immediately":"false","unable_to_bear_weight_in_ed":"false"},{"lateral_malleolus_tenderness":"false","malleolar_pain":"false","medial_malleolus_tenderness":"false","unable_to_bear_weight_immediately":"false","unable_to_bear_weight_in_ed":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/duke":{"get":{"description":"Apply the Durack 1994 original Duke criteria for infective endocarditis and return definite, possible, or rejected from caller-assigned pathologic, major, minor, and rejected flags.\n\nWhen an agent already has caller-assigned 1994 Duke pathologic, major, minor, and rejected flags and needs the published definite / possible / rejected classification. magent does not examine the patient, read an echocardiogram, or interpret cultures.\n\nNot a medical device and not a diagnosis of infective endocarditis.\n\nDurack 1994 original Duke criteria only. Not Li 2000 modified Duke. Not ISCVID 2023.\n\nmagent does not examine the patient, read an echocardiogram, or interpret cultures. The caller assigns every flag.\n\nPossible is the leftover 1994 category (findings consistent with IE that are neither definite nor rejected). It is not the Li 2000 1-major-plus-1-minor or 3-minor possible thresholds. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"pathologic_definite","description":"Microorganisms demonstrated by culture or histology in a vegetation, embolus, or intracardiac abscess, or pathologic lesions (vegetation or abscess) confirmed by histology showing active endocarditis (Durack 1994 pathologic definite). true or false as assigned by the caller. magent does not examine tissue.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"major_typical_blood_culture","description":"Typical microorganism from two separate blood cultures, or persistently positive blood cultures, as assigned by the caller (Durack 1994 major typical blood culture). true or false. magent does not interpret cultures.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"major_positive_echo","description":"Positive echocardiogram for IE: oscillating mass or vegetation, abscess, new partial dehiscence of a prosthetic valve, or new valvular regurgitation (Durack 1994 major). true or false as assigned by the caller. magent does not read an echocardiogram.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"minor_predisposition","description":"Predisposing heart condition or intravenous drug use (Durack 1994 minor). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"minor_fever","description":"Fever ≥38.0 C (Durack 1994 minor). true or false as assigned by the caller. magent does not measure temperature.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"minor_vascular_phenomena","description":"Vascular phenomena (Durack 1994 minor): major arterial emboli, septic pulmonary infarcts, mycotic aneurysm, intracranial hemorrhage, conjunctival hemorrhages, or Janeway lesions, as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"minor_immunologic_phenomena","description":"Immunologic phenomena (Durack 1994 minor): glomerulonephritis, Osler nodes, Roth spots, or rheumatoid factor, as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"minor_suggestive_echo","description":"Echocardiogram consistent with IE but not meeting the major echo definition (Durack 1994 minor). true or false as assigned by the caller. Not counted in minor_count when major_positive_echo is true. magent does not read an echocardiogram.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"minor_suggestive_micro","description":"Microbiologic evidence not meeting the major culture definition (Durack 1994 minor). true or false as assigned by the caller. Not counted in minor_count when major_typical_blood_culture is true. magent does not interpret cultures.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"rejected_firm_alternate_diagnosis","description":"Firm alternate diagnosis explaining evidence of IE (Durack 1994 rejected). true or false as assigned by the caller. Classification is rejected only when definite does not hold.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"rejected_resolved_le_4_days_antibiotics","description":"Manifestations of IE resolved with antibiotic therapy for 4 days or less (Durack 1994 rejected). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"rejected_no_pathology_le_4_days_antibiotics","description":"No pathologic evidence of IE at surgery or autopsy after antibiotic therapy for 4 days or less (Durack 1994 rejected). true or false as assigned by the caller. magent does not examine tissue.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Duke","operationId":"get_api_calc_duke","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, major_count, minor_count, classification, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/duke"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Duke (bulk)","operationId":"post_api_calc_duke","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/duke"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"major_positive_echo":"true","major_typical_blood_culture":"true","minor_fever":"false","minor_immunologic_phenomena":"false","minor_predisposition":"false","minor_suggestive_echo":"false","minor_suggestive_micro":"false","minor_vascular_phenomena":"false","pathologic_definite":"false","rejected_firm_alternate_diagnosis":"false","rejected_no_pathology_le_4_days_antibiotics":"false","rejected_resolved_le_4_days_antibiotics":"false"},{"major_positive_echo":"true","major_typical_blood_culture":"true","minor_fever":"false","minor_immunologic_phenomena":"false","minor_predisposition":"false","minor_suggestive_echo":"false","minor_suggestive_micro":"false","minor_vascular_phenomena":"false","pathologic_definite":"false","rejected_firm_alternate_diagnosis":"false","rejected_no_pathology_le_4_days_antibiotics":"false","rejected_resolved_le_4_days_antibiotics":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-ibs":{"get":{"description":"Apply the Mearin 2016 Rome IV IBS diagnostic criteria and return supporting_features_met (0-3) and whether the published IBS box holds (rome_iv_ibs).\n\nWhen an agent already has the five caller-assigned Rome IV IBS flags as in Mearin 2016 and needs whether the published IBS box holds. magent does not examine the patient.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose irritable bowel syndrome.\n\nThe caller assigns the five flags. magent does not examine the patient.\n\nThis tool is the Mearin 2016 Rome IV IBS diagnostic box only. Not Rome III (pain or discomfort at least 3 days per month), not Manning criteria, and not IBS-C/D/M/U subtype. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"pain_1_day_per_week_last_3_months","description":"Recurrent abdominal pain on average at least 1 day per week in the last 3 months (Mearin 2016). Pain only, not discomfort. true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"symptom_onset_at_least_6_months_prior","description":"Criteria fulfilled for the last 3 months with symptom onset at least 6 months before diagnosis, as assigned (Mearin 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"related_to_defecation","description":"Pain related to defecation (one of three supporting features; at least two required). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"associated_change_stool_frequency","description":"Pain associated with a change in frequency of stool (one of three supporting features; at least two required). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"associated_change_stool_form","description":"Pain associated with a change in form (appearance) of stool (one of three supporting features; at least two required). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Rome IV IBS","operationId":"get_api_calc_rome_iv_ibs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, supporting_features_met, rome_iv_ibs, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-ibs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV IBS (bulk)","operationId":"post_api_calc_rome_iv_ibs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-ibs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"associated_change_stool_form":"false","associated_change_stool_frequency":"true","pain_1_day_per_week_last_3_months":"true","related_to_defecation":"true","symptom_onset_at_least_6_months_prior":"true"},{"associated_change_stool_form":"false","associated_change_stool_frequency":"true","pain_1_day_per_week_last_3_months":"true","related_to_defecation":"true","symptom_onset_at_least_6_months_prior":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/euromacs-rhf":{"get":{"description":"Sum Soliman 2018 EUROMACS 9.5-point right-sided heart failure points from five caller-assigned flags after continuous-flow LVAD implant and return score and band (low 0-2, intermediate >2 to 4, high >4).\n\nWhen an agent has already assigned RA/PCWP >0.54, hemoglobin ≤10 g/dL, multiple IV inotropes, INTERMACS class 1-3, and severe RV dysfunction and needs the published 0-9.5 total and band, not a device indication, Michigan RV-failure score, or CRITT score.\n\nNot a medical device. This is published arithmetic, not an LVAD indication, RVAD indication, or implant timing decision.\n\nmagent does not catheterize, echo, measure hemoglobin, or assign INTERMACS class; the caller supplies five flags. INTERMACS 1, 2, or 3 scores 2 (Soliman 2018). INTERMACS 1-2 only is not the primary paper.\n\nNot the Michigan RV failure score. Not CRITT.\n\nBands follow Soliman 2018: low 0-2 inclusive, intermediate >2 to 4 inclusive, high >4. Score 2.0 is low; 2.5 is intermediate; 4.0 is intermediate; 4.5 is high. Half-points are not integer-rounded. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"rap_pcwp_gt_054","description":"RA/PCWP ratio >0.54 as assigned by the caller (Soliman 2018). true scores 2. magent does not catheterize or compute the ratio.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hemoglobin_le_10","description":"Hemoglobin ≤10 g/dL as assigned by the caller (Soliman 2018). true scores 1. magent does not measure hemoglobin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"multiple_iv_inotropes","description":"Use of multiple intravenous inotropes as assigned by the caller (Soliman 2018). true scores 2.5. magent does not order inotropes.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"intermacs_1_to_3","description":"INTERMACS class 1, 2, or 3 as assigned by the caller (Soliman 2018). true scores 2. The primary paper uses classes 1-3, not 1-2 only. magent does not assign INTERMACS class.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"severe_rv_dysfunction","description":"Severe RV dysfunction on echocardiography as assigned by the caller (Soliman 2018). true scores 2. magent does not echo.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"EUROMACS-RHF","operationId":"get_api_calc_euromacs_rhf","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, band, rap_pcwp_gt_054, hemoglobin_le_10, multiple_iv_inotropes, intermacs_1_to_3, severe_rv_dysfunction, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/euromacs-rhf"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"EUROMACS-RHF (bulk)","operationId":"post_api_calc_euromacs_rhf","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/euromacs-rhf"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"hemoglobin_le_10":"false","intermacs_1_to_3":"false","multiple_iv_inotropes":"false","rap_pcwp_gt_054":"false","severe_rv_dysfunction":"false"},{"hemoglobin_le_10":"false","intermacs_1_to_3":"false","multiple_iv_inotropes":"false","rap_pcwp_gt_054":"false","severe_rv_dysfunction":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/dhaka":{"get":{"description":"Sum four caller-assigned Levine 2015 DHAKA Table 3 items and return the published total (max 12) and dehydration band (no, some, or severe).\n\nWhen an agent has already assigned Levine 2015 Table 3 general appearance, respirations, skin pinch, and tears and needs the published DHAKA Dehydration Score total and band, not a WHO IMCI algorithm, fluids order, or the DHAKA Tree.\n\nNot a medical device and not a WHO IMCI algorithm clone. This is the empirically derived Levine 2015 DHAKA Dehydration Score (Table 3), not the DHAKA Tree / recursive partitioning model.\n\nEach of the four items is caller-assigned. magent does not examine the child or order fluids.\n\nDerived in children younger than 5 years with acute diarrhea. Age is not a score item and is not required.\n\nTable 3 bands only: no_dehydration 0–1, some_dehydration 2–3, severe_dehydration ≥4. Respirations have only Normal and Deep (no very-deep cell). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"general_appearance","description":"Caller-assigned Levine 2015 Table 3 general appearance: normal (0), restless_irritable (2), or lethargic_unconscious (4). magent does not examine the child.","required":true,"schema":{"type":"string","enum":["normal","restless_irritable","lethargic_unconscious"]},"example":"normal"},{"in":"query","name":"respirations","description":"Caller-assigned Levine 2015 Table 3 respirations: normal (0) or deep (2). Table 3 has no very-deep cell. magent does not examine the child.","required":true,"schema":{"type":"string","enum":["normal","deep"]},"example":"normal"},{"in":"query","name":"skin_pinch","description":"Caller-assigned Levine 2015 Table 3 skin pinch: normal (0), slow (2), or very_slow (4). magent does not examine the child.","required":true,"schema":{"type":"string","enum":["normal","slow","very_slow"]},"example":"normal"},{"in":"query","name":"tears","description":"Caller-assigned Levine 2015 Table 3 tears: normal (0), decreased (1), or absent (2). magent does not examine the child.","required":true,"schema":{"type":"string","enum":["normal","decreased","absent"]},"example":"normal"}],"summary":"DHAKA","operationId":"get_api_calc_dhaka","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, dhaka_band, general_appearance, respirations, skin_pinch, tears, components, citation, disclaimer."},"400":{"description":"invalid_dhaka_appearance: general_appearance must be normal, restless_irritable, or lethargic_unconscious (Levine 2015 DHAKA Table 3). Returned before settlement; you are not charged.; invalid_dhaka_respirations: respirations must be normal or deep (Levine 2015 DHAKA Table 3). Returned before settlement; you are not charged.; invalid_dhaka_skin_pinch: skin_pinch must be normal, slow, or very_slow (Levine 2015 DHAKA Table 3). Returned before settlement; you are not charged.; invalid_dhaka_tears: tears must be normal, decreased, or absent (Levine 2015 DHAKA Table 3). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dhaka"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"DHAKA (bulk)","operationId":"post_api_calc_dhaka","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_dhaka_appearance: general_appearance must be normal, restless_irritable, or lethargic_unconscious (Levine 2015 DHAKA Table 3). Returned before settlement; you are not charged.; invalid_dhaka_respirations: respirations must be normal or deep (Levine 2015 DHAKA Table 3). Returned before settlement; you are not charged.; invalid_dhaka_skin_pinch: skin_pinch must be normal, slow, or very_slow (Levine 2015 DHAKA Table 3). Returned before settlement; you are not charged.; invalid_dhaka_tears: tears must be normal, decreased, or absent (Levine 2015 DHAKA Table 3). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dhaka"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"general_appearance":"normal","respirations":"normal","skin_pinch":"normal","tears":"normal"},{"general_appearance":"normal","respirations":"normal","skin_pinch":"normal","tears":"normal"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/heaven":{"get":{"description":"Apply the Davis 2017 HEAVEN criteria from six caller-assigned flags and return high_risk iff any is true, plus the count of criteria met (0-6).\n\nWhen an agent already has the six Davis 2017 HEAVEN flags (hypoxemia, extremes of size, anatomic challenges, vomit/blood/fluid, exsanguination, limited neck mobility) and needs whether any published difficult-airway criterion is present. magent does not measure SpO2 or examine the airway.\n\nNot a medical device.\n\nNot an intubation order.\n\nmagent does not measure SpO2 or examine the airway. The caller assigns the six flags.\n\nNot Mallampati, not EGRI. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"hypoxemia","description":"Hypoxemia (SpO2 ≤93% at initial laryngoscopy) as assigned by the caller (Davis 2017). true is a HEAVEN flag. magent does not measure SpO2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"extremes_of_size","description":"Extremes of size (pediatric ≤8 years or clinical obesity) as assigned by the caller (Davis 2017). true is a HEAVEN flag. magent does not examine the patient or assign age.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"anatomic_challenges","description":"Anatomic challenges that limit laryngoscopy as assigned by the caller (Davis 2017). true is a HEAVEN flag. magent does not examine the airway.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"vomit_blood_fluid","description":"Vomit, blood, or fluid in the pharynx or hypopharynx as assigned by the caller (Davis 2017). true is a HEAVEN flag. magent does not examine the airway.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"exsanguination","description":"Exsanguination (suspected anemia that would accelerate desaturation) as assigned by the caller (Davis 2017). true is a HEAVEN flag. magent does not assay hemoglobin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"neck_mobility_limited","description":"Limited neck mobility as assigned by the caller (Davis 2017). true is a HEAVEN flag. magent does not examine the neck.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"HEAVEN","operationId":"get_api_calc_heaven","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, high_risk, low_risk, criteria_met, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/heaven"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HEAVEN (bulk)","operationId":"post_api_calc_heaven","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/heaven"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"anatomic_challenges":"false","exsanguination":"false","extremes_of_size":"false","hypoxemia":"false","neck_mobility_limited":"false","vomit_blood_fluid":"false"},{"anatomic_challenges":"false","exsanguination":"false","extremes_of_size":"false","hypoxemia":"false","neck_mobility_limited":"false","vomit_blood_fluid":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/vancouver-chest-pain":{"get":{"description":"Apply the Christenson 2006 Vancouver Chest Pain Rule derivation tree and return whether caller-assigned ECG, 2-hour troponin, prior ACS or nitrate, palpation, age, and radiation nodes are early-discharge eligible.\n\nWhen an agent already has caller-assigned flags for an abnormal initial ECG, 2-hour troponin elevation, prior ACS or nitrate use, pain reproduced by palpation, and radiation to neck, arm, or jaw, plus age in years, and needs the published 2006 early-discharge-eligible result. magent does not interpret an ECG or assay troponin. Not the later age-50 variant.\n\nNot a medical device and not a diagnosis of ACS.\n\nNot a discharge, observation, or provocative-testing order.\n\nabnormal_initial_ecg, troponin_2h_elevated, prior_acs_or_nitrate, palpation_reproduces_pain, and pain_radiates_neck_jaw_arm are caller-assigned. magent does not interpret ECGs, palpate the chest, or assay troponin or CK-MB.\n\nThis tool is the Christenson 2006 derivation tree with age under 40 on the age-history path. Age 40 is not that path. Not the Cullen 2014 or Scheuermeyer 2014 age-50 variant.\n\nThe 2006 derivation used CK-MB on the age ≥40 branch; this tool takes a caller-assigned 2-hour troponin flag at that biomarker node. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120). The 2006 age-history path requires age under 40 when palpation does not reproduce pain. Age 40 is not that path (Christenson 2006; not the later age-50 cutoff).","required":true,"schema":{"type":"integer"},"example":"35"},{"in":"query","name":"abnormal_initial_ecg","description":"Caller-assigned abnormal initial ECG as used in Christenson 2006 (true blocks early discharge). T-wave flattening was the only acceptable ST-T abnormality in that paper. true or false. magent does not interpret an ECG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"troponin_2h_elevated","description":"Caller-assigned 2-hour troponin at or above the institutional cutoff. true or false. true blocks early discharge. magent does not assay troponin or CK-MB.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"prior_acs_or_nitrate","description":"Prior ACS (MI or angina) or nitrate use as assigned by the caller (Christenson 2006 prior ischemic chest pain / nitroglycerin node). true or false. true blocks early discharge.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"palpation_reproduces_pain","description":"Chest pain reproduced by palpation as assigned by the caller. true or false. When ECG, 2-hour troponin, and prior ACS/nitrate are clear, true is early-discharge eligible regardless of age or radiation. magent does not palpate the chest.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pain_radiates_neck_jaw_arm","description":"Pain radiates to neck, arm, or jaw as assigned by the caller (Christenson 2006). true or false. On the age-history path (palpation false), true blocks early discharge. magent does not take a pain history.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Vancouver Chest Pain Rule","operationId":"get_api_calc_vancouver_chest_pain","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, early_discharge_eligible, age_years, abnormal_initial_ecg, troponin_2h_elevated, prior_acs_or_nitrate, palpation_reproduces_pain, pain_radiates_neck_jaw_arm, criteria, citation, disclaimer."},"400":{"description":"invalid_vancouver_chest_pain: Vancouver Chest Pain Rule inputs must match Christenson 2006 early-discharge tree nodes from that paper only. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/vancouver-chest-pain"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Vancouver Chest Pain Rule (bulk)","operationId":"post_api_calc_vancouver_chest_pain","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_vancouver_chest_pain: Vancouver Chest Pain Rule inputs must match Christenson 2006 early-discharge tree nodes from that paper only. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/vancouver-chest-pain"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"abnormal_initial_ecg":"false","age":"35","pain_radiates_neck_jaw_arm":"false","palpation_reproduces_pain":"false","prior_acs_or_nitrate":"false","troponin_2h_elevated":"false"},{"abnormal_initial_ecg":"false","age":"35","pain_radiates_neck_jaw_arm":"false","palpation_reproduces_pain":"false","prior_acs_or_nitrate":"false","troponin_2h_elevated":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/slics":{"get":{"description":"Sum the Vaccaro 2007 Subaxial Cervical Spine Injury Classification (SLICS) score from caller-assigned injury morphology, disco-ligamentous complex integrity, neurologic status, and continuous cord compression, and return the published 0–10 total and treatment-guidance band.\n\nWhen an agent has already assigned the single most severe traumatic subaxial cervical morphology, DLC status, neurologic status, and whether continuous cord compression is present with a deficit, and needs the published SLICS integer and band (0–3 / 4 / ≥5), not a surgical order, TLICS, AO spine class, or SINS neoplastic score.\n\nNot a medical device. magent does not read imaging or examine the patient. Morphology, DLC, neurologic status, and continuous cord compression are caller-assigned.\n\nNot a surgical order. Bands 0–3, 4, and ≥5 follow Vaccaro 2007 treatment guidance; they are not an operative command.\n\nNot TLICS (thoracolumbar; PLC 0/2/3). This tool is Vaccaro 2007 SLICS for subaxial cervical injury only.\n\nNot AO spine classification. Caller assigns the single most severe morphology (burst already includes compression; do not sum morphologies).\n\nNot SINS (neoplastic). magent does not read imaging. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"morphology","description":"Caller-assigned single most severe injury morphology (Vaccaro 2007). none scores 0; compression scores 1; burst scores 2; distraction scores 3; rotation_translation scores 4. Burst already includes compression; do not sum morphologies. magent does not read imaging.","required":true,"schema":{"type":"string","enum":["none","compression","burst","distraction","rotation_translation"]},"example":"none"},{"in":"query","name":"dlc","description":"Caller-assigned disco-ligamentous complex integrity (Vaccaro 2007). intact scores 0; indeterminate scores 1; disrupted scores 2. Not TLICS PLC (0/2/3). magent does not examine the patient or read imaging.","required":true,"schema":{"type":"string","enum":["intact","indeterminate","disrupted"]},"example":"intact"},{"in":"query","name":"neuro","description":"Caller-assigned neurologic status (Vaccaro 2007). intact scores 0; root scores 1; complete scores 2; incomplete scores 3. magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["intact","root","complete","incomplete"]},"example":"intact"},{"in":"query","name":"continuous_cord_compression","description":"Adds 1 only when neuro is not intact (Vaccaro 2007). Must be false when neuro is intact. true or false. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"SLICS","operationId":"get_api_calc_slics","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, slics_band, components, citation, disclaimer."},"400":{"description":"invalid_slics: morphology must be none, compression, burst, distraction, or rotation_translation; dlc must be intact, indeterminate, or disrupted; neuro must be intact, root, complete, or incomplete; continuous_cord_compression must be true or false and may be true only when neuro is not intact (Vaccaro 2007 SLICS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/slics"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SLICS (bulk)","operationId":"post_api_calc_slics","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_slics: morphology must be none, compression, burst, distraction, or rotation_translation; dlc must be intact, indeterminate, or disrupted; neuro must be intact, root, complete, or incomplete; continuous_cord_compression must be true or false and may be true only when neuro is not intact (Vaccaro 2007 SLICS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/slics"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"continuous_cord_compression":"false","dlc":"intact","morphology":"none","neuro":"intact"},{"continuous_cord_compression":"false","dlc":"intact","morphology":"none","neuro":"intact"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pews":{"get":{"description":"Compute the Monaghan 2005 Brighton Paediatric Early Warning Score from caller-assigned behaviour, colour/CRT, respiratory effort, oxygen, quarter-hourly nebulisers, and persistent post-surgery vomiting, plus heart rate and respiratory rate against APLS 2005 age-group rest ranges used as that paper's normal rate and mean.\n\nWhen an agent needs the published Monaghan 2005 Brighton PEWS total (max 13) and the ≥3 review trigger, and must not substitute NEWS2, MEWS, Bedside PEWS, or later NHS England PEWS.\n\nNot a medical device and not an ICU-admission, HDU, or monitoring order. magent does not measure vitals or examine the child.\n\nThis is Monaghan 2005 Brighton PEWS only (behaviour, cardiovascular, and respiratory 0-3, plus +2 each for quarter-hourly nebulisers and persistent vomiting following surgery). It is not NEWS2, not MEWS, not Bedside PEWS (Parshuram), not PEWS-RL, and not later NHS England PEWS.\n\nMonaghan 2005 scores HR as tachycardia of 20 or 30 above the age-group normal rate or bradycardia, and RR as >10 / >20 / >30 above or 5 below the mean. magent applies those offsets to APLS 2005 rest ranges (the contemporaneous UK paediatric table). It does not use Akre 2010 or later NHS PEWS charts. magent does not map chronological age onto the age_group token.\n\nBehaviour, colour/CRT, respiratory effort, and oxygen are caller-assigned from the published table. magent does not observe the child or measure FiO2 or capillary refill.\n\nscore_ge_3 follows the paper's score of 3 or more as a review trigger. magent does not add later action ladders (hourly observations, MET activation, or PICU transfer bands). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_group","description":"Caller-assigned APLS 2005 rest-range age group used as Monaghan 2005 'normal rate' (HR) and 'mean'/'normal parameters' (RR). infant (<1 year; HR 110-160, RR 30-40, RR mean 35); age_1_2 (1-2 years; HR 100-150, RR 25-35, mean 30); age_2_5 (2-5 years; HR 95-140, RR 25-30, mean 27); age_5_12 (5-12 years; HR 80-120, RR 20-25, mean 22); adolescent (>12 years; HR 60-100, RR 15-20, mean 17). Monaghan 2005 does not print a numeric vital table. magent does not map chronological age. Not Akre 2010. Not later NHS England PEWS charts.","required":true,"schema":{"type":"string","enum":["infant","age_1_2","age_2_5","age_5_12","adolescent"]},"example":"infant"},{"in":"query","name":"behavior","description":"Caller-assigned Monaghan 2005 behaviour. playing (playing/appropriate) → 0; sleeping → 1; irritable (irritable or parents concerned) → 2; lethargic (lethargic/confused or reduced response to pain) → 3. magent does not observe the child.","required":true,"schema":{"type":"string","enum":["playing","sleeping","irritable","lethargic"]},"example":"playing"},{"in":"query","name":"cardiovascular","description":"Caller-assigned Monaghan 2005 colour or capillary refill. pink (pink or CRT 1-2 s) → 0; pale (pale or CRT 3 s) → 1; grey (grey or CRT 4 s) → 2; mottled (grey and mottled or CRT ≥5 s) → 3. The cardiovascular domain is the higher of this band and the HR band. magent does not measure CRT.","required":true,"schema":{"type":"string","enum":["pink","pale","grey","mottled"]},"example":"pink"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats/min (integer 40-300). Monaghan 2005: tachycardia of 20 above the age-group normal rate (APLS 2005 upper rest limit) → 2; tachycardia of 30 above that rate or bradycardia (below the APLS lower rest limit) → 3. The cardiovascular domain is the higher of colour/CRT and HR. magent does not measure heart rate.","required":true,"schema":{"type":"integer"},"example":"130"},{"in":"query","name":"respiratory_rate","description":"Respiratory rate in breaths/min (integer 5-120). Monaghan 2005 vs the age-group RR mean (midpoint of the APLS 2005 rest range): >10 above mean → 1; >20 above mean → 2; >30 above mean or 5 below mean → 3. The respiratory domain is the higher of RR, effort, and oxygen. magent does not measure respiratory rate.","required":true,"schema":{"type":"integer"},"example":"35"},{"in":"query","name":"respiratory_effort","description":"Caller-assigned Monaghan 2005 respiratory effort. none (no recession or tracheal tug) → 0; accessory (using accessory muscles) → 1; recessing (recessing, tracheal tug) → 2; sternal_or_grunting (sternal recession, tracheal tug, or grunting) → 3. The respiratory domain is the higher of RR, effort, and oxygen. magent does not examine the chest.","required":true,"schema":{"type":"string","enum":["none","accessory","recessing","sternal_or_grunting"]},"example":"none"},{"in":"query","name":"oxygen","description":"Caller-assigned Monaghan 2005 oxygen. none → 0; fio2_30_or_4l (30+% FiO2 or 4+ L/min) → 1; fio2_40_or_6l (40+% FiO2 or 6+ L/min) → 2; fio2_50_or_8l (50% FiO2 or 8+ L/min) → 3. The respiratory domain is the higher of RR, effort, and oxygen. magent does not measure FiO2.","required":true,"schema":{"type":"string","enum":["none","fio2_30_or_4l","fio2_40_or_6l","fio2_50_or_8l"]},"example":"none"},{"in":"query","name":"quarter_hourly_nebulisers","description":"Quarter-hourly (¼ hourly) nebulisers as in Monaghan 2005. true → +2; false → 0. Independent of the respiratory 0-3 domain. magent does not record medication times.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"persistent_vomiting_after_surgery","description":"Persistent vomiting following surgery as in Monaghan 2005. true → +2; false → 0. Independent of the behaviour 0-3 domain. magent does not observe vomiting.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"PEWS","operationId":"get_api_calc_pews","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, score_ge_3, age_group, behavior, cardiovascular, heart_rate_bpm, respiratory_rate, respiratory_effort, oxygen, quarter_hourly_nebulisers, persistent_vomiting_after_surgery, components, citation, disclaimer."},"400":{"description":"invalid_pews: PEWS inputs must match Monaghan 2005 Brighton age-group vital-sign and behavior categories from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pews"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PEWS (bulk)","operationId":"post_api_calc_pews","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pews: PEWS inputs must match Monaghan 2005 Brighton age-group vital-sign and behavior categories from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pews"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_group":"infant","behavior":"playing","cardiovascular":"pink","heart_rate_bpm":"130","oxygen":"none","persistent_vomiting_after_surgery":"false","quarter_hourly_nebulisers":"false","respiratory_effort":"none","respiratory_rate":"35"},{"age_group":"infant","behavior":"playing","cardiovascular":"pink","heart_rate_bpm":"130","oxygen":"none","persistent_vomiting_after_surgery":"false","quarter_hourly_nebulisers":"false","respiratory_effort":"none","respiratory_rate":"35"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/egsys":{"get":{"description":"Sum the six Del Rosso 2008 EGSYS flags and return whether the total is ≥3 (published cardiac-syncope triage discriminator).\n\nWhen an agent needs the published EGSYS point total from caller-assigned flags and must not invent a syncope history or a cardiac-syncope diagnosis.\n\nNot a medical device. Not a cardiac-syncope diagnosis, disposition, or admission order.\n\nOnly the Del Rosso 2008 discriminator (score ≥3 versus <3) is returned. magent does not invent other cutoffs.\n\nThe caller assigns the six flags. magent does not take a history, read an ECG, or diagnose heart disease. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"palpitations","description":"Palpitations preceding syncope (Del Rosso 2008, +4). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"abnormal_ecg_or_heart_disease","description":"Abnormal ECG and/or heart disease (Del Rosso 2008, +3). true or false as assigned by the caller. magent does not read an ECG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"syncope_during_effort","description":"Syncope during effort (Del Rosso 2008, +3). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"syncope_supine","description":"Syncope while supine (Del Rosso 2008, +2). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"no_autonomic_prodromes","description":"Absence of autonomic prodromes (Del Rosso 2008, −1). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"no_precipitating_factors","description":"Absence of predisposing and/or precipitating factors (Del Rosso 2008, −1). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"EGSYS","operationId":"get_api_calc_egsys","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, score_ge_3, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/egsys"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"EGSYS (bulk)","operationId":"post_api_calc_egsys","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/egsys"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"abnormal_ecg_or_heart_disease":"false","no_autonomic_prodromes":"false","no_precipitating_factors":"false","palpitations":"false","syncope_during_effort":"false","syncope_supine":"false"},{"abnormal_ecg_or_heart_disease":"false","no_autonomic_prodromes":"false","no_precipitating_factors":"false","palpitations":"false","syncope_during_effort":"false","syncope_supine":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/manning":{"get":{"description":"Count the six Manning 1978 IBS symptoms and return the integer score (0-6). Manning 1978 does not publish a diagnostic cutoff.\n\nWhen an agent already has the six caller-assigned Manning 1978 symptom flags and needs the published symptom count. magent does not examine the patient.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose irritable bowel syndrome.\n\nThe caller assigns the six flags. magent does not examine the patient.\n\nManning 1978 reports that the more of these symptoms that were present, the more likely IBS. It does not publish a diagnostic cutoff. This tool returns the symptom count only.\n\nThis tool is Manning 1978 symptom count only. Not Rome III and not Rome IV. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"visible_abdominal_distension","description":"Visible abdominal distension (Manning 1978; one of four symptoms significantly more common in IBS). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pain_relief_with_bowel_movement","description":"Pain eased after bowel action (Manning 1978; one of four symptoms significantly more common in IBS). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"more_frequent_stools_with_pain_onset","description":"More frequent stools at onset of pain (Manning 1978; one of four symptoms significantly more common in IBS). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"looser_stools_with_pain_onset","description":"Looser stools at onset of pain (Manning 1978; one of four symptoms significantly more common in IBS). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"rectal_mucus","description":"Passage of mucus per rectum (Manning 1978; more common in IBS, not statistically significant in that table). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"incomplete_evacuation","description":"Feeling of incomplete evacuation (Manning 1978; more common in IBS, not statistically significant in that table). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Manning","operationId":"get_api_calc_manning","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/manning"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Manning (bulk)","operationId":"post_api_calc_manning","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/manning"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"incomplete_evacuation":"false","looser_stools_with_pain_onset":"false","more_frequent_stools_with_pain_onset":"false","pain_relief_with_bowel_movement":"false","rectal_mucus":"false","visible_abdominal_distension":"false"},{"incomplete_evacuation":"false","looser_stools_with_pain_onset":"false","more_frequent_stools_with_pain_onset":"false","pain_relief_with_bowel_movement":"false","rectal_mucus":"false","visible_abdominal_distension":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/peld-cr":{"get":{"description":"Compute the OPTN Policy 9 Table 9-1 PELD-Cr integer from age, albumin, bilirubin, INR, creatinine or dialysis/CVVHD, and a caller-assigned minimum CDC height or weight Z-score.\n\nWhen an agent needs the published PELD-Cr integer and must not invent a listing order, substitute McDiarmid 2002 PELD, or compute CDC LMS Z from height and weight.\n\nNot a medical device.\n\nNot a transplant listing or allocation order.\n\nOPTN Policy 9 Table 9-1 PELD-Cr only. This is not McDiarmid 2002 PELD.\n\nmagent does not compute CDC LMS Z-scores from height or weight; min_cdc_z is caller-assigned.\n\nDoes not assign exception scores, Status 1A, Status 1B, or listing priority. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_years","description":"Age in fractional calendar years (0 to under 12). Table 9-1 uses 1.0 below age 1 and 5.5 above 5.5 years. PELD-Cr is for candidates under 12.","required":true,"schema":{"type":"number"},"example":"2"},{"in":"query","name":"albumin_g_dl","description":"Serum albumin in g/dL (0.1-6). Provide this or albumin_g_l, not both. Policy floors at 1.0; Table 9-1 uses ln(1.9) above 1.9.","required":false,"schema":{"type":"number"},"example":"2.5"},{"in":"query","name":"albumin_g_l","description":"Serum albumin in g/L (1-60). Converted as g/dL = g/L / 10.","required":false,"schema":{"type":"number"},"example":"25"},{"in":"query","name":"bilirubin_mg_dl","description":"Total bilirubin in mg/dL (0.1-80). Provide this or bilirubin_umol_l, not both. Policy floors at 1.0; Table 9-1 knots at 4 and 40.","required":false,"schema":{"type":"number"},"example":"4.0"},{"in":"query","name":"bilirubin_umol_l","description":"Total bilirubin in µmol/L (2-1368). Converted as mg/dL = µmol/L / 17.1.","required":false,"schema":{"type":"number"},"example":"68.4"},{"in":"query","name":"inr","description":"INR (0.8-20). Policy floors at 1.0; Table 9-1 knots at 2 and 10.","required":true,"schema":{"type":"number"},"example":"1.5"},{"in":"query","name":"creatinine_mg_dl","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l, not both. Table 9-1 floors at 0.2 and assigns 1.3 if >1.3 or dialysis_or_cvvhd is true.","required":false,"schema":{"type":"number"},"example":"0.4"},{"in":"query","name":"creatinine_umol_l","description":"Serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42.","required":false,"schema":{"type":"number"},"example":"35.368"},{"in":"query","name":"dialysis_or_cvvhd","description":"True when the candidate had two or more dialysis treatments in the prior 7 days, or 24 hours of CVVHD in the prior 7 days. Assigns creatinine 1.3 mg/dL.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"min_cdc_z","description":"Caller-assigned minimum of CDC 2000 height or weight Z-score (LMS). magent does not compute Z from height or weight. Table 9-1 clamps -5.0 to -2.1.","required":true,"schema":{"type":"number"},"example":"0.0"}],"summary":"PELD-Cr","operationId":"get_api_calc_peld_cr","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, albumin_g_dl, bilirubin_mg_dl, inr, creatinine_mg_dl, dialysis_or_cvvhd, min_cdc_z, age_used_years, albumin_used_g_dl, bilirubin_used_mg_dl, inr_used, creatinine_used_mg_dl, min_cdc_z_used, peld_cr, citation, disclaimer."},"400":{"description":"invalid_peld_cr: PELD-Cr inputs must match OPTN Policy 9 age under 12, albumin, bilirubin, INR, creatinine or dialysis, and caller-assigned minimum CDC height or weight Z-score. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/peld-cr"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PELD-Cr (bulk)","operationId":"post_api_calc_peld_cr","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_peld_cr: PELD-Cr inputs must match OPTN Policy 9 age under 12, albumin, bilirubin, INR, creatinine or dialysis, and caller-assigned minimum CDC height or weight Z-score. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/peld-cr"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_years":"2","albumin_g_dl":"2.5","bilirubin_mg_dl":"4.0","creatinine_mg_dl":"0.4","dialysis_or_cvvhd":"false","inr":"1.5","min_cdc_z":"0.0"},{"age_years":"2","albumin_g_dl":"2.5","bilirubin_mg_dl":"4.0","creatinine_mg_dl":"0.4","dialysis_or_cvvhd":"false","inr":"1.5","min_cdc_z":"0.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/brescia-covid":{"get":{"description":"Count the four Duca 2020 BCRSS testing-criteria binaries as assigned by the caller and return the integer total (0–4).\n\nWhen an agent already has the four Duca 2020 testing-criteria flags and needs the published 0–4 count. magent does not examine the patient, count breaths, measure SpO2 or PaO2, or read imaging.\n\nNot a medical device and not a COVID-19 diagnosis or ventilator order. magent does not examine the patient or read imaging.\n\nThis is the Duca 2020 testing-criteria count only (four caller-assigned binaries; 0–4). It is not the 0–8 NIV, intubation, proning, or neuromuscular-blockade ladder.\n\nThe caller assigns wheezing or inability to speak in full sentences, respiratory rate >22, PaO2 <65 mmHg or SpO2 <90%, and significant chest-radiograph worsening. magent does not measure vitals or interpret radiographs.\n\nThe scale was rapidly developed in Brescia during the 2020 crisis and has not been validated in other populations. magent returns the integer count only. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"wheezing_or_unable_full_sentences","description":"Wheezing or inability to speak in full sentences while at rest or with minimal effort, as assigned by the caller (Duca 2020 testing criterion 1). true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"respiratory_rate_gt_22","description":"Respiratory rate >22 breaths/min as assigned by the caller (Duca 2020 testing criterion 2). true or false. magent does not count breaths.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pao2_lt_65_or_spo2_lt_90","description":"PaO2 <65 mmHg or SpO2 <90% as assigned by the caller (Duca 2020 testing criterion 3). true or false. magent does not measure SpO2 or PaO2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"chest_radiograph_worsening","description":"Significant worsening on chest radiograph as assigned by the caller (Duca 2020 testing criterion 4). true or false. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"BCRSS","operationId":"get_api_calc_brescia_covid","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, bcrss, max_score, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/brescia-covid"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"BCRSS (bulk)","operationId":"post_api_calc_brescia_covid","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/brescia-covid"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"chest_radiograph_worsening":"false","pao2_lt_65_or_spo2_lt_90":"false","respiratory_rate_gt_22":"false","wheezing_or_unable_full_sentences":"false"},{"chest_radiograph_worsening":"false","pao2_lt_65_or_spo2_lt_90":"false","respiratory_rate_gt_22":"false","wheezing_or_unable_full_sentences":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/dutch-fh":{"get":{"description":"Apply the Nordestgaard 2013 Table 1 Dutch Lipid Clinic Network score from caller-supplied LDL cholesterol plus family, clinical, physical, and DNA flags, and return the 0–26 score and definite, probable, possible, or unlikely classification. Not a diagnosis.\n\nWhen an agent already has untreated LDL cholesterol and caller-assigned Dutch Lipid Clinic Network Table 1 family, clinical, physical, and DNA flags and needs the published adult DLCN score and classification. magent does not assay lipids, examine tendons or arcus, or sequence genes.\n\nNot a medical device and not a diagnosis of familial hypercholesterolaemia.\n\nmagent does not assay lipids, examine tendons or arcus, or sequence genes. The caller supplies exactly one LDL value and assigns every flag.\n\nAdult Dutch Lipid Clinic Network Table 1 (Nordestgaard 2013 EAS consensus) only. Not Simon Broome, not MEDPED, and not homozygous FH.\n\nPer group only the highest applicable score is counted. Family, clinical, and physical items do not add within a group. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ldl_mmol_l","description":"LDL cholesterol in mmol/L (1-20). Nordestgaard 2013 Table 1 bands: >8.5 → 8, 6.5-8.4 → 5, 5.0-6.4 → 3, 4.0-4.9 → 1. Provide exactly one of ldl_mmol_l or ldl_mg_dl. magent does not assay lipids.","required":false,"schema":{"type":"number"},"example":"9.0"},{"in":"query","name":"ldl_mg_dl","description":"LDL cholesterol in mg/dL (40-800). Converted to mmol/L as mg/dL / 38.67, then scored on the mmol/L bands. Provide exactly one lipid parameter.","required":false,"schema":{"type":"number"},"example":"348"},{"in":"query","name":"first_degree_premature_chd","description":"First-degree relative with premature coronary heart disease (Nordestgaard 2013 Table 1 family history, 1 point). true or false as assigned by the caller. magent does not take a pedigree. Either this or first_degree_ldl_gt_95th scores 1 for the family group; a 2-point family item still yields family 2, not 3.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"first_degree_ldl_gt_95th","description":"First-degree relative with LDL cholesterol above the 95th percentile (Nordestgaard 2013 Table 1 family history, 1 point). true or false as assigned by the caller. magent does not assay lipids or take a pedigree.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"first_degree_xanthoma_or_arcus","description":"First-degree relative with tendon xanthoma and/or arcus cornealis (Nordestgaard 2013 Table 1 family history, 2 points). true or false as assigned by the caller. magent does not examine relatives. Either this or child_ldl_gt_95th scores 2 for the family group (max of family items).","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"child_ldl_gt_95th","description":"Child under 18 years with LDL cholesterol above the 95th percentile (Nordestgaard 2013 Table 1 family history, 2 points). true or false as assigned by the caller. magent does not assay lipids or take a pedigree.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"premature_chd","description":"Premature coronary heart disease in the subject (Nordestgaard 2013 Table 1 clinical history, 2 points; men <55 years / women <60 years as assigned by the caller). true or false. magent does not diagnose CHD or compute age or sex. If premature_cerebral_or_pvd is also true, the clinical group is 2, not 3.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"premature_cerebral_or_pvd","description":"Premature cerebral or peripheral vascular disease in the subject (Nordestgaard 2013 Table 1 clinical history, 1 point). true or false as assigned by the caller. magent does not diagnose vascular disease.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"tendon_xanthoma","description":"Tendon xanthoma in the subject (Nordestgaard 2013 Table 1 physical examination, 6 points). true or false as assigned by the caller. magent does not examine tendons. If corneal_arcus_age_lt_45 is also true, the physical group is 6, not 10.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"corneal_arcus_age_lt_45","description":"Arcus cornealis before age 45 years (Nordestgaard 2013 Table 1 physical examination, 4 points). true or false as assigned by the caller. magent does not examine the cornea or compute age.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"causative_mutation_ldlr_apob_pcsk9","description":"Causative mutation in LDLR, APOB, or PCSK9 as assigned by the caller (Nordestgaard 2013 Table 1 DNA analysis, 8 points). true or false. magent does not sequence genes. Mutation alone is probable (score 8), not definite.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Dutch FH","operationId":"get_api_calc_dutch_fh","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, classification, ldl_mmol_l, ldl_points, family_points, clinical_points, physical_points, dna_points, components, citation, disclaimer."},"400":{"description":"invalid_dutch_ldl: provide exactly one of ldl_mmol_l (1-20) or ldl_mg_dl (40-800) (Nordestgaard 2013 DLCN). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dutch-fh"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Dutch FH (bulk)","operationId":"post_api_calc_dutch_fh","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_dutch_ldl: provide exactly one of ldl_mmol_l (1-20) or ldl_mg_dl (40-800) (Nordestgaard 2013 DLCN). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dutch-fh"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"causative_mutation_ldlr_apob_pcsk9":"false","child_ldl_gt_95th":"false","corneal_arcus_age_lt_45":"false","first_degree_ldl_gt_95th":"false","first_degree_premature_chd":"false","first_degree_xanthoma_or_arcus":"false","ldl_mmol_l":"9.0","premature_cerebral_or_pvd":"false","premature_chd":"false","tendon_xanthoma":"true"},{"causative_mutation_ldlr_apob_pcsk9":"false","child_ldl_gt_95th":"false","corneal_arcus_age_lt_45":"false","first_degree_ldl_gt_95th":"false","first_degree_premature_chd":"false","first_degree_xanthoma_or_arcus":"false","ldl_mmol_l":"9.0","premature_cerebral_or_pvd":"false","premature_chd":"false","tendon_xanthoma":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mcdonald-2024":{"get":{"description":"Apply Montalban 2025 / 2024 McDonald criteria for typical clinically isolated syndrome and return whether mcdonald_ms holds from caller-assigned typical CIS, no better explanation, attacks, lesions, five DIS topographies (including optic nerve), MRI DIT, CSF-specific oligoclonal bands, and CSF kappa free-light chains.\n\nWhen an agent already has typical CIS versus not, whether a better explanation exists, ≥2-attack and ≥2-lesion flags, five caller-assigned 2024 DIS topographies, MRI DIT, CSF-specific OCB, and a kappa FLC flag, and needs the published relapsing/CIS combination. magent does not read MRI, OCT, or VEP and does not assay CSF.\n\nNot a medical device and not a diagnosis of multiple sclerosis.\n\nRelapsing / typical CIS pathway only. Does not implement 2024 primary progressive MS (PPMS) or radiologically isolated syndrome (RIS).\n\nNot the 2017 McDonald criteria (Thompson 2018). 2024 adds optic nerve as a fifth DIS location and treats kappa free-light chains as interchangeable with oligoclonal bands.\n\nDoes not apply age ≥50 extra specificity requirements, central vein sign, paramagnetic rim lesions, or a 4-of-5 DIT-waive shortcut.\n\nmagent does not read MRI, OCT, or VEP and does not assay CSF. The five topographies, MRI DIT, CSF-specific OCB, and csf_kflc are caller-assigned. csf_kflc is a positive/negative flag, not a numeric kFLC index cutoff.\n\nRemain vigilant for NMOSD and other better explanations; no_better_explanation is caller-assigned. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"typical_cis","description":"Typical clinically isolated syndrome as assigned by the caller (Montalban 2025 typical CIS / relapsing pathway). If false, mcdonald_ms is false; this tool does not diagnose MS from atypical presentations, PPMS, or RIS. true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"no_better_explanation","description":"No better explanation for the presentation as assigned by the caller (Montalban 2025). If false, mcdonald_ms is false. Remain vigilant for NMOSD. true or false. magent does not assign a better explanation.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"two_or_more_attacks","description":"≥2 clinical attacks as assigned by the caller. true means two or more attacks; false means this is the first/CIS attack. true or false. magent does not date attacks.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"two_or_more_lesions","description":"Objective clinical evidence of ≥2 lesions as assigned by the caller. true means ≥2 lesions; false means 1 lesion. true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"periventricular","description":"Caller-assigned typical periventricular MS lesion topography (one of five 2024 DIS locations). true or false. magent does not read MRI.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cortical_or_juxtacortical","description":"Caller-assigned typical cortical or juxtacortical MS lesion topography (one of five 2024 DIS locations). true or false. magent does not read MRI.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"infratentorial","description":"Caller-assigned typical infratentorial MS lesion topography (one of five 2024 DIS locations). true or false. magent does not read MRI.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"spinal_cord","description":"Caller-assigned typical spinal-cord MS lesion topography (one of five 2024 DIS locations). true or false. magent does not read MRI.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"optic_nerve","description":"Caller-assigned typical optic-nerve topography (fifth 2024 DIS location; Montalban 2025). true or false. magent does not read MRI, OCT, or VEP.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"dit_mri","description":"MRI dissemination in time as assigned by the caller (simultaneous Gd-enhancing and non-enhancing lesions, or a new T2 or Gd-enhancing lesion on follow-up vs baseline). true or false. magent does not read MRI.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"csf_specific_ocb","description":"CSF-specific oligoclonal bands as assigned by the caller (2024 DIT substitute; interchangeable with kappa free-light chains). true or false. magent does not assay CSF.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"csf_kflc","description":"CSF kappa free-light chains positive as assigned by the caller (2024: interchangeable with oligoclonal bands as the CSF DIT marker). Caller-assigned flag only; this tool does not apply a numeric kFLC index cutoff. true or false. magent does not assay CSF.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"McDonald 2024","operationId":"get_api_calc_mcdonald_2024","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, mcdonald_ms, typical_cis, no_better_explanation, two_or_more_attacks, two_or_more_lesions, periventricular, cortical_or_juxtacortical, infratentorial, spinal_cord, optic_nerve, dis, dit_mri, csf_specific_ocb, csf_kflc, criteria, citation, disclaimer."},"400":{"description":"invalid_mcdonald_2024: 2024 McDonald typical-CIS flags must each be true or false as used in the Montalban 2025 relapsing typical-CIS pathway. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mcdonald-2024"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"McDonald 2024 (bulk)","operationId":"post_api_calc_mcdonald_2024","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_mcdonald_2024: 2024 McDonald typical-CIS flags must each be true or false as used in the Montalban 2025 relapsing typical-CIS pathway. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mcdonald-2024"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"cortical_or_juxtacortical":"false","csf_kflc":"false","csf_specific_ocb":"false","dit_mri":"false","infratentorial":"false","no_better_explanation":"true","optic_nerve":"false","periventricular":"false","spinal_cord":"false","two_or_more_attacks":"true","two_or_more_lesions":"true","typical_cis":"true"},{"cortical_or_juxtacortical":"false","csf_kflc":"false","csf_specific_ocb":"false","dit_mri":"false","infratentorial":"false","no_better_explanation":"true","optic_nerve":"false","periventricular":"false","spinal_cord":"false","two_or_more_attacks":"true","two_or_more_lesions":"true","typical_cis":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rema":{"get":{"description":"Sum the Álvarez-Twose 2012 REMA points (sex, serum baseline tryptase, pruritus/hives/angioedema, syncope or presyncope) and return whether the total is ≥2 (published clonality and systemic-mastocytosis triage threshold).\n\nWhen an agent needs the published REMA point total from caller-assigned sex, baseline tryptase, cutaneous signs, and syncope or presyncope and must not invent a tryptase assay, a mastocytosis diagnosis, or WHO SM criteria.\n\nNot a medical device. Not a diagnosis of systemic mastocytosis. Not WHO SM criteria (that is who-sm).\n\nmagent does not assay tryptase. The caller supplies serum baseline tryptase (sBt) in μg/L.\n\nOnly the published REMA threshold (score ≥2) is returned. magent does not invent other cutoffs.\n\nThe caller assigns sex, cutaneous signs, and syncope or presyncope. magent does not take a history. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sex","description":"Sex as assigned by the caller (Álvarez-Twose 2012). male scores +1; female scores −1. Always one of these.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"tryptase_ug_l","description":"Serum baseline tryptase (sBt) in μg/L (1-200). <15 scores −1; 15–25 inclusive scores 0; >25 scores +2. Equal to 15 is not <15; equal to 25 is not >25. magent does not assay tryptase.","required":true,"schema":{"type":"number"},"example":"30"},{"in":"query","name":"pruritus_hives_angioedema","description":"Presence of pruritus, hives or angioedema as assigned by the caller (Álvarez-Twose 2012). true scores −2; false (absence) scores +1. Both branches score. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"syncope_or_presyncope","description":"Syncope or presyncope as assigned by the caller (Álvarez-Twose 2012). true scores +3; false scores 0.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"REMA","operationId":"get_api_calc_rema","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, sex, tryptase_ug_l, score, max_score, clonality_likely, components, citation, disclaimer."},"400":{"description":"invalid_rema: REMA needs sex, tryptase_ug_l, pruritus_hives_angioedema, and syncope_or_presyncope (Álvarez-Twose 2012). Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_tryptase: tryptase_ug_l must be a number from 1 to 200 (μg/L). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rema"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"REMA (bulk)","operationId":"post_api_calc_rema","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rema: REMA needs sex, tryptase_ug_l, pruritus_hives_angioedema, and syncope_or_presyncope (Álvarez-Twose 2012). Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_tryptase: tryptase_ug_l must be a number from 1 to 200 (μg/L). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rema"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"pruritus_hives_angioedema":"false","sex":"male","syncope_or_presyncope":"true","tryptase_ug_l":"30"},{"pruritus_hives_angioedema":"false","sex":"male","syncope_or_presyncope":"true","tryptase_ug_l":"30"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rip":{"get":{"description":"Sum the Hevesi 2019 Recurrent Instability of the Patella (RIP) score after first-time patellar dislocation from age, caller-assigned skeletal immaturity, trochlear dysplasia, and TT-TG/PL ratio, and return the published 0–5 point total and 10-year recurrent-instability band.\n\nWhen an agent has already assigned Hevesi 2019 RIP factors after a first-time patellar dislocation and needs the published point total and 10-year recurrent-instability band, not a surgical order and not a later PIP model.\n\nNot a medical device. magent does not read radiographs, assign Dejour grade, or measure TT-TG or patellar length.\n\nTrochlear dysplasia is a caller-assigned present/absent flag for Dejour A–D; magent does not grade trochlea.\n\nAge <25 scores 2; age ≥25 scores 0. Age 8–80 and TT-TG/PL 0.1–2.0 are magent clamps, not published ranges.\n\nThis is Hevesi 2019 RIP only. Not Balcarek 2013 and not a later patellar-instability predictor (PIP) model. Does not use contralateral dislocation as a factor.\n\nBands 0–1 low (10-year recurrent instability 0.0%), 2–3 intermediate (30.6%), and 4+ high (79.2%) follow Hevesi 2019. Not a reconstruction order. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 8-80; magent clamp, not a published range). Hevesi 2019: age <25 → 2 points; age ≥25 → 0. magent does not assign age.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"skeletal_immature","description":"Caller-assigned skeletal immaturity / open physes (Hevesi 2019). true scores 1. magent does not read radiographs or assign physeal status. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"trochlear_dysplasia","description":"Caller-assigned trochlear dysplasia Dejour A–D present (Hevesi 2019). true scores 1. magent does not grade trochlea or read radiographs. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"tt_tg_pl_ratio","description":"Caller-assigned tibial tubercle–trochlear groove / patellar length (TT-TG/PL) ratio (Hevesi 2019). ≥0.5 inclusive scores 1. Magent clamp 0.1-2.0, not a published range. magent does not measure TT-TG or patellar length.","required":true,"schema":{"type":"number"},"example":"0.3"}],"summary":"RIP","operationId":"get_api_calc_rip","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk, age, skeletal_immature, trochlear_dysplasia, tt_tg_pl_ratio, components, citation, disclaimer."},"400":{"description":"invalid_rip: RIP-score inputs must be numeric age plus caller-assigned skeletal immaturity, trochlear dysplasia, and TT-TG/PL as used in Hevesi 2019. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rip"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"RIP (bulk)","operationId":"post_api_calc_rip","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rip: RIP-score inputs must be numeric age plus caller-assigned skeletal immaturity, trochlear dysplasia, and TT-TG/PL as used in Hevesi 2019. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rip"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","skeletal_immature":"false","trochlear_dysplasia":"false","tt_tg_pl_ratio":"0.3"},{"age":"40","skeletal_immature":"false","trochlear_dysplasia":"false","tt_tg_pl_ratio":"0.3"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/kt-v":{"get":{"description":"Compute the Daugirdas 1993 second-generation logarithmic single-pool variable-volume Kt/V from pre- and post-dialysis BUN, session length, ultrafiltration volume, and post-dialysis weight.\n\nWhen an agent needs the published 1993 logarithmic Kt/V and must not invent adequacy targets, substitute equilibrated eKt/V or stdKt/V, or compute a urea reduction ratio.\n\nNot a medical device.\n\nNot a dialysis prescription.\n\nDaugirdas 1993 second-generation single-pool variable-volume Kt/V only. This is not equilibrated eKt/V, not stdKt/V, and not a urea-reduction-ratio tool.\n\nDoes not assign KDOQI or other adequacy targets. Those cuts are not in Daugirdas 1993.\n\nWeight is post-dialysis body weight (W). magent does not estimate urea distribution volume. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"pre_bun_mg_dl","description":"Predialysis blood urea nitrogen in mg/dL (1-200). Required with post_bun_mg_dl.","required":true,"schema":{"type":"number"},"example":"80"},{"in":"query","name":"post_bun_mg_dl","description":"Postdialysis blood urea nitrogen in mg/dL (1-200). Required with pre_bun_mg_dl.","required":true,"schema":{"type":"number"},"example":"24"},{"in":"query","name":"session_hours","description":"Hemodialysis session length in hours (1.0-8.0). Daugirdas 1993 t.","required":true,"schema":{"type":"number"},"example":"4"},{"in":"query","name":"uf_l","description":"Ultrafiltration volume in litres (0-15). Daugirdas 1993 UF.","required":true,"schema":{"type":"number"},"example":"2"},{"in":"query","name":"weight_kg","description":"Post-dialysis body weight in kilograms (1-500). Provide weight_kg or weight_lb, not both.","required":false,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"weight_lb","description":"Post-dialysis body weight in pounds (2-1100). Converted as kg = lb × 0.45359237. Provide weight_kg or weight_lb, not both.","required":false,"schema":{"type":"number"},"example":"154.32"}],"summary":"Kt/V","operationId":"get_api_calc_kt_v","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, pre_bun_mg_dl, post_bun_mg_dl, session_hours, uf_l, weight_kg, kt_v, citation, disclaimer."},"400":{"description":"invalid_bun: bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.; invalid_dialysis_hours: session_hours must be a number from 1.0 to 8.0 (Daugirdas 1993). Returned before settlement; you are not charged.; invalid_ultrafiltration: uf_l must be a number from 0 to 15 (Daugirdas 1993 ultrafiltration volume in litres). Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_urea_ratio: post_bun_mg_dl must be < pre_bun_mg_dl and R - 0.008 * t must be > 0 (Daugirdas 1993). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/kt-v"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Kt/V (bulk)","operationId":"post_api_calc_kt_v","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_bun: bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.; invalid_dialysis_hours: session_hours must be a number from 1.0 to 8.0 (Daugirdas 1993). Returned before settlement; you are not charged.; invalid_ultrafiltration: uf_l must be a number from 0 to 15 (Daugirdas 1993 ultrafiltration volume in litres). Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_urea_ratio: post_bun_mg_dl must be < pre_bun_mg_dl and R - 0.008 * t must be > 0 (Daugirdas 1993). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/kt-v"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"post_bun_mg_dl":"24","pre_bun_mg_dl":"80","session_hours":"4","uf_l":"2","weight_kg":"70"},{"post_bun_mg_dl":"24","pre_bun_mg_dl":"80","session_hours":"4","uf_l":"2","weight_kg":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/qcsi":{"get":{"description":"Sum Haimovich 2020 qCSI bedside points (Table 2) from respiratory rate, lowest SpO2, and nasal-cannula oxygen flow and return the integer total (max 12).\n\nWhen an agent needs the published qCSI bedside point total and must not invent risk classes, treat the score as a COVID-19 diagnosis or triage order, or substitute the 12-variable CSI model.\n\nNot a medical device and not a COVID-19 diagnosis or triage order. magent does not measure vitals.\n\nThis is the Haimovich 2020 qCSI bedside points score (Table 2; max 12) only. It is not the 12-variable gradient-boosting CSI model.\n\nDerivation included nasal cannula oxygen ≤6 L/min and excluded higher flows. oxygen_l_min >6 is rejected.\n\nRespiratory rate, SpO2, and oxygen flow are caller-supplied. magent does not measure them. The paper associated a low score with <5% decompensation; magent returns the integer total only and does not emit named risk classes. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"respiratory_rate","description":"Respiratory rate in breaths/min (integer 4-80). Haimovich 2020 Table 2: ≤22 → 0, 23-28 → 1, >28 → 2. magent does not measure vitals.","required":true,"schema":{"type":"integer"},"example":"16"},{"in":"query","name":"spo2_percent","description":"Lowest SpO2 percent as assigned by the caller (50-100). Haimovich 2020 Table 2: >92 → 0, 89-92 → 2, ≤88 → 5. magent does not measure SpO2.","required":true,"schema":{"type":"number"},"example":"98"},{"in":"query","name":"oxygen_l_min","description":"Nasal-cannula oxygen flow in L/min (0-6). Haimovich 2020 Table 2: ≤2 → 0, 3-4 → 4, 5-6 → 5. Derivation excluded >6 L/min. magent does not measure flow.","required":true,"schema":{"type":"number"},"example":"0"}],"summary":"qCSI","operationId":"get_api_calc_qcsi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, respiratory_rate, spo2_percent, oxygen_l_min, components, citation, disclaimer."},"400":{"description":"invalid_respiratory_rate: respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_o2_flow_l_min: oxygen_l_min must be a number from 0 to 6 (Haimovich 2020 qCSI; derivation excluded >6 L/min). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/qcsi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"qCSI (bulk)","operationId":"post_api_calc_qcsi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_respiratory_rate: respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_o2_flow_l_min: oxygen_l_min must be a number from 0 to 6 (Haimovich 2020 qCSI; derivation excluded >6 L/min). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/qcsi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"oxygen_l_min":"0","respiratory_rate":"16","spo2_percent":"98"},{"oxygen_l_min":"0","respiratory_rate":"16","spo2_percent":"98"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mayo-uc":{"get":{"description":"Sum four caller-assigned Schroeder 1987 ulcerative colitis disease-activity index items (each integer 0-3) and return the total (max 12). Does not return later remission or activity bands.\n\nWhen an agent has already assigned Schroeder 1987 stool frequency, rectal bleeding, endoscopy, and physician global integers and needs the four-item total, not a diagnosis, later Mayo cutoffs, PUCAI, or the Mayo SPN nodule model.\n\nNot a medical device and not a diagnosis of ulcerative colitis or a treatment order.\n\nEach of the four items is a caller-assigned integer 0-3 from Schroeder 1987. magent does not count stools, examine the patient, or perform endoscopy.\n\nSchroeder 1987 did not publish remission, mild, moderate, or severe cutoffs for the total score. magent returns score and max_score only and does not apply later Mayo or partial-Mayo bands.\n\nFull four-item disease-activity index including endoscopy. Not PUCAI and not the Mayo Clinic solitary-pulmonary-nodule model. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"stool_frequency","description":"Caller-assigned Schroeder 1987 stool frequency (integer 0-3): 0 normal number of stools for this patient; 1 = 1-2 stools/day more than normal; 2 = 3-4 more; 3 = 5 or more more than normal. magent does not count stools.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"rectal_bleeding","description":"Caller-assigned Schroeder 1987 rectal bleeding (integer 0-3): 0 none; 1 streaks of blood with stool less than half the time; 2 obvious blood with stool most of the time; 3 blood alone passed. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"endoscopy","description":"Caller-assigned Schroeder 1987 endoscopy / flexible proctosigmoidoscopy (integer 0-3): 0 normal or inactive; 1 mild (erythema, decreased vascular pattern, mild friability); 2 moderate (marked erythema, absent vascular pattern, friability, erosions); 3 severe (spontaneous bleeding, ulceration). magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"physician_global","description":"Caller-assigned Schroeder 1987 physician's global assessment (integer 0-3): 0 normal; 1 mild; 2 moderate; 3 severe. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"Mayo DAI","operationId":"get_api_calc_mayo_uc","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, stool_frequency, rectal_bleeding, endoscopy, physician_global, components, citation, disclaimer."},"400":{"description":"invalid_mayo_item: stool_frequency, rectal_bleeding, endoscopy, and physician_global must each be an integer 0-3 (Schroeder 1987). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mayo-uc"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Mayo DAI (bulk)","operationId":"post_api_calc_mayo_uc","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_mayo_item: stool_frequency, rectal_bleeding, endoscopy, and physician_global must each be an integer 0-3 (Schroeder 1987). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mayo-uc"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"endoscopy":"0","physician_global":"0","rectal_bleeding":"0","stool_frequency":"0"},{"endoscopy":"0","physician_global":"0","rectal_bleeding":"0","stool_frequency":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/age-adjusted-dimer":{"get":{"description":"Apply the Righini 2014 ADJUST-PE age-adjusted D-dimer cutoff and return whether PE is excluded at the published FEU threshold.\n\nWhen an agent has caller-assigned age and a D-dimer in ng/mL FEU and needs the published PE-excluded or CTPA-indicated result.\n\nNot a diagnosis of pulmonary embolism or VTE. Age-adjusted D-dimer is a rule-out cutoff, not a PE confirmation.\n\nNot the YEARS algorithm and not the Wells PE score. Do not substitute those tools.\n\nD-dimer is ng/mL fibrinogen-equivalent units (FEU) only, not DDU. magent does not convert units.\n\nPE/VTE is excluded only when D-dimer is strictly below the age-adjusted cutoff: 500 ng/mL FEU when age < 50, or age × 10 when age ≥ 50. Equality is not excluded.\n\nThe caller assigns age and D-dimer. magent does not examine the patient. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Cutoff is 500 ng/mL FEU when age < 50; age × 10 when age ≥ 50 (age 50 → 500).","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"d_dimer_ng_ml","description":"D-dimer in ng/mL fibrinogen-equivalent units (FEU) as in Righini 2014 (0-20000). PE excluded only when strictly below the age-adjusted cutoff. Equality is not excluded. DDU and other units are not this tool.","required":true,"schema":{"type":"number"},"example":"499"}],"summary":"Age-adjusted D-dimer cutoff","operationId":"get_api_calc_age_adjusted_dimer","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, d_dimer_ng_ml, d_dimer_threshold_ng_ml, pe_excluded, ctpa_indicated, criteria, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_d_dimer: d_dimer_ng_ml must be a number from 0 to 20000. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/age-adjusted-dimer"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Age-adjusted D-dimer cutoff (bulk)","operationId":"post_api_calc_age_adjusted_dimer","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_d_dimer: d_dimer_ng_ml must be a number from 0 to 20000. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/age-adjusted-dimer"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","d_dimer_ng_ml":"499"},{"age":"40","d_dimer_ng_ml":"499"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/cpri":{"get":{"description":"Compute the Saisho 2011 C-peptide-to-plasma-glucose ratio (CPR index) from serum C-peptide in ng/mL and plasma glucose in mg/dL.\n\nWhen an agent needs the published CPR index and the 2.02 ROC cut-off flag and must not invent HOMA-IR, a diabetes diagnosis, or an insulin order.\n\nNot a diabetes diagnosis, not HOMA-IR, and not C-peptide alone. Glucose is mg/dL only; magent does not convert mmol/L.\n\nbelow_best_cutoff is true only when cpri is strictly less than 2.02, the Saisho 2011 best ROC cut-off for later insulin therapy (80.8% sensitivity, 63.3% specificity). That flag is not an insulin order.\n\nThe paper also notes a cut-off of 1.5 with about 80% specificity and 60% sensitivity; magent does not return a second flag for 1.5.\n\nFasting and postprandial use the same arithmetic; timing is a required caller label, not a different formula. Not a medical device. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"timing","description":"Sample timing as assigned by the caller: fasting or postprandial. Same CPR-index arithmetic; magent does not pick a formula from the clock.","required":true,"schema":{"type":"string","enum":["fasting","postprandial"]},"example":"postprandial"},{"in":"query","name":"c_peptide_ng_ml","description":"Serum C-peptide in ng/mL (0-40). Saisho 2011 CPR units.","required":true,"schema":{"type":"number"},"example":"2.02"},{"in":"query","name":"glucose_mg_dl","description":"Plasma glucose in mg/dL (50-1000). mg/dL only; magent does not convert mmol/L.","required":true,"schema":{"type":"number"},"example":"100"}],"summary":"CPR index","operationId":"get_api_calc_cpri","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, cpri, below_best_cutoff, timing, c_peptide_ng_ml, glucose_mg_dl, citation, disclaimer."},"400":{"description":"invalid_c_peptide: c_peptide_ng_ml must be a number from 0 to 40 (Saisho 2011 CPR ng/mL). Returned before settlement; you are not charged.; invalid_cpri_glucose: glucose_mg_dl must be a number from 50 to 1000. Returned before settlement; you are not charged.; invalid_cpri_timing: timing must be fasting or postprandial (Saisho 2011 CPR index). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cpri"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CPR index (bulk)","operationId":"post_api_calc_cpri","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_c_peptide: c_peptide_ng_ml must be a number from 0 to 40 (Saisho 2011 CPR ng/mL). Returned before settlement; you are not charged.; invalid_cpri_glucose: glucose_mg_dl must be a number from 50 to 1000. Returned before settlement; you are not charged.; invalid_cpri_timing: timing must be fasting or postprandial (Saisho 2011 CPR index). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cpri"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"c_peptide_ng_ml":"2.02","glucose_mg_dl":"100","timing":"postprandial"},{"c_peptide_ng_ml":"2.02","glucose_mg_dl":"100","timing":"postprandial"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/tash":{"get":{"description":"Sum the seven Yücel 2006 TASH (Trauma Associated Severe Hemorrhage) nested less-than point bands and return the published 0–28 total as a surrogate for mass transfusion after multiple trauma.\n\nWhen an agent needs the published Yücel 2006 TASH point total and must not invent a logistic mass-transfusion probability, an MTP activation, or a transfusion order.\n\nNot a medical device and not a transfusion order. magent does not decide whether to transfuse or activate a massive-transfusion protocol (MTP).\n\nThis is Yücel 2006 TASH only. It is not the ABC (assessment of blood consumption) score. Do not interchange them.\n\nIntra-abdominal fluid (FAST) and fracture AIS are caller-assigned. magent does not read imaging or assign AIS.\n\nMass transfusion in the derivation cohort was ≥10 units PRBC from ER to ICU. This tool returns the published point total only, not a logistic probability. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"systolic_mm_hg","description":"Arrival systolic blood pressure in mm Hg (integer 0-300). Nested less-than: <100 scores 4; <120 (and not <100) scores 1; ≥120 scores 0. Highest matching band only.","required":true,"schema":{"type":"integer"},"example":"110"},{"in":"query","name":"hemoglobin_g_dl","description":"Hemoglobin in g/dL (3-22). Provide this or hemoglobin_g_l, not both. Nested less-than: <7 scores 8; <9 scores 6; <10 scores 4; <11 scores 3; <12 scores 2; ≥12 scores 0. Highest matching band only.","required":false,"schema":{"type":"number"},"example":"10.5"},{"in":"query","name":"hemoglobin_g_l","description":"Hemoglobin in g/L (30-220). Converted as hemoglobin_g_dl = hemoglobin_g_l / 10. Provide this or hemoglobin_g_dl, not both.","required":false,"schema":{"type":"number"},"example":"105"},{"in":"query","name":"intra_abdominal_fluid","description":"Intra-abdominal fluid (FAST) as assigned by the caller (Yücel 2006). true or false. true scores 3. magent does not interpret FAST images.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"fracture_ais","description":"Caller-assigned AIS for complex long bone and/or pelvic fractures. Must be 0 (none), 3, 4, or 5. 3 or 4 scores 3; 5 scores 6. magent does not assign AIS from imaging.","required":true,"schema":{"type":"integer"},"example":"3"},{"in":"query","name":"heart_rate_bpm","description":"Arrival heart rate in beats per minute (integer 30-220). >120 scores 2; 120 does not.","required":true,"schema":{"type":"integer"},"example":"110"},{"in":"query","name":"base_excess_mmol_l","description":"Admission base excess in mmol/L (−30 to 20). Nested less-than: < −10 scores 4; < −6 scores 3; < −2 scores 1; ≥ −2 scores 0. Highest matching band only.","required":true,"schema":{"type":"number"},"example":"-4"},{"in":"query","name":"sex","description":"Sex as assigned by the caller. male scores 1; female scores 0.","required":true,"schema":{"type":"string"},"example":"male"}],"summary":"TASH score","operationId":"get_api_calc_tash","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, systolic_mm_hg, hemoglobin_g_dl, intra_abdominal_fluid, fracture_ais, heart_rate_bpm, base_excess_mmol_l, sex, components, citation, disclaimer."},"400":{"description":"invalid_rts_systolic: systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_tash_fracture_ais: fracture_ais must be 0 (none), 3, 4, or 5 (Yücel 2006 AIS for complex long bone and/or pelvic fractures). Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_base_excess: base_excess_mmol_l must be a number from -30 to 20. Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/tash"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"TASH score (bulk)","operationId":"post_api_calc_tash","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rts_systolic: systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_tash_fracture_ais: fracture_ais must be 0 (none), 3, 4, or 5 (Yücel 2006 AIS for complex long bone and/or pelvic fractures). Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_base_excess: base_excess_mmol_l must be a number from -30 to 20. Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/tash"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"base_excess_mmol_l":"-4","fracture_ais":"3","heart_rate_bpm":"110","hemoglobin_g_dl":"10.5","intra_abdominal_fluid":"false","sex":"male","systolic_mm_hg":"110"},{"base_excess_mmol_l":"-4","fracture_ais":"3","heart_rate_bpm":"110","hemoglobin_g_dl":"10.5","intra_abdominal_fluid":"false","sex":"male","systolic_mm_hg":"110"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pediatric-sirs":{"get":{"description":"Apply Goldstein 2005 pediatric SIRS age-group heart-rate, respiratory-rate, leukocyte, and core-temperature criteria, then the paper's sepsis, severe-sepsis, and septic-shock definitions from caller-assigned infection and organ-dysfunction flags.\n\nWhen an agent already has a Goldstein 2005 age group, core temperature, heart rate, respiratory rate, and WBC and needs the published pediatric SIRS result, with optional sepsis, severe sepsis, and septic shock from caller-assigned flags. magent does not measure vitals or assay WBC. Not Bone 1992 adult SIRS. Not Phoenix 2024.\n\nNot a medical device.\n\nNot a diagnosis of SIRS, sepsis, severe sepsis, or septic shock and not a sepsis workup, antibiotic, or vasopressor order.\n\nmagent does not measure vitals or assay WBC. The caller supplies age group, core temperature, heart rate, respiratory rate, and leukocyte count. Organ dysfunction is caller-assigned; magent does not apply Goldstein 2005 Table 4 from raw labs.\n\nThis tool is Goldstein 2005 pediatric SIRS (IPSCC) only. It is not Bone 1992 adult SIRS (temperature >38 °C, HR >90, RR >20, WBC >12000 or <4000/µL). It is not Phoenix 2024 / Schlapbach pediatric sepsis.\n\nAge groups are the six published groups (newborn 0 days-1 week, neonate 1 week-1 month, infant 1 month-1 year, toddler/preschool 2-5 years, school-age 6-12 years, adolescent 13-18 years). magent does not map chronological age; the 1-2 year gap is in the paper. Newborn leukocyte has a high cutoff only (no published leukopenia bound). Bradycardia applies only under 1 year.\n\nPediatric SIRS requires at least two of four criteria, one of which must be abnormal core temperature (>38.5 or <36 °C) or leukocyte count. Heart rate plus respiratory rate alone is not SIRS. 38.5 °C and each Table 3 cutoff equality do not meet. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_group","description":"Goldstein 2005 Table 1 age group. One of: newborn (0 days to 1 week; HR >180 or <100, RR >50, WBC >34 k/µL), neonate (1 week to 1 month; HR >180 or <100, RR >40, WBC >19.5 or <5), infant (1 month to 1 year; HR >180 or <90, RR >34, WBC >17.5 or <5), toddler_preschool (2-5 years; HR >140, RR >22, WBC >15.5 or <6), school_age (6-12 years; HR >130, RR >18, WBC >13.5 or <4.5), adolescent (13-18 years; HR >110, RR >14, WBC >11 or <4.5). magent does not map chronological age (the paper has a 1-2 year gap).","required":true,"schema":{"type":"string"},"example":"school_age"},{"in":"query","name":"temperature_c","description":"Core temperature in °C (30.0-45.0), rectal, bladder, oral, or central-catheter probe as in Goldstein 2005. >38.5 or <36 meets the temperature criterion (38.5 and 36.0 do not). Not Bone 1992 adult >38. magent does not measure temperature.","required":true,"schema":{"type":"number"},"example":"37.0"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats/min (integer 30-300). Meets when greater than the age-group tachycardia cutoff, or when less than the bradycardia cutoff for newborn, neonate, or infant only (Goldstein 2005 Table 3). Equal to the cutoff does not meet. magent does not measure heart rate.","required":true,"schema":{"type":"integer"},"example":"100"},{"in":"query","name":"respiratory_rate","description":"Respiratory rate in breaths/min (integer 4-120). Meets when greater than the age-group cutoff (Goldstein 2005 Table 3). Equal to the cutoff does not meet. Optional mechanical_ventilation also meets this criterion. magent does not measure respiratory rate.","required":true,"schema":{"type":"integer"},"example":"16"},{"in":"query","name":"wbc_k_ul","description":"WBC in 10^3/µL (same as 10^3/mm^3 in Goldstein 2005 Table 3). Provide wbc_k_ul or wbc_ul. Range 0.01-500. Meets when greater than the age-group high cutoff or less than the low cutoff (newborn has high-only; no leukopenia bound). Equal to a cutoff does not meet. magent does not assay WBC.","required":false,"schema":{"type":"number"},"example":"8.0"},{"in":"query","name":"wbc_ul","description":"WBC in cells/µL. Provide wbc_k_ul or wbc_ul. Range 10-500000. Converted to 10^3/µL for Table 3 cutoffs. magent does not assay WBC.","required":false,"schema":{"type":"number"},"example":"8000"},{"in":"query","name":"band_percent","description":"Immature neutrophils as a percent of WBC (0-100) when provided. Omitted does not use bands. >10 meets the leukocyte criterion (10 does not). magent does not assay bands.","required":false,"schema":{"type":"number"},"example":"5"},{"in":"query","name":"mechanical_ventilation","description":"Caller-assigned mechanical ventilation for an acute process not related to underlying neuromuscular disease or general anesthesia (Goldstein 2005 Table 2 respiratory criterion). true meets the respiratory criterion. Omitted is false. true or false. magent does not examine ventilation.","required":false,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"suspected_infection","description":"Caller-assigned suspected or proven infection (Goldstein 2005 Table 2). Sepsis requires SIRS and this true. true or false. magent does not diagnose infection.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cardiovascular_dysfunction","description":"Caller-assigned cardiovascular organ dysfunction as in Goldstein 2005 Table 4. With SIRS and suspected_infection, this is septic shock (and severe sepsis). true or false. magent does not apply Table 4 from raw labs or blood pressure.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ards","description":"Caller-assigned acute respiratory distress syndrome as used for severe sepsis in Goldstein 2005 Table 2. true or false. magent does not interpret imaging or PaO2/FiO2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"two_or_more_other_organ_dysfunctions","description":"Caller-assigned two or more other organ dysfunctions (respiratory, renal, neurologic, hematologic, or hepatic per Goldstein 2005 Table 2/4) for severe sepsis when cardiovascular dysfunction and ARDS are absent. true or false. magent does not apply Table 4 from raw labs.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Pediatric SIRS","operationId":"get_api_calc_pediatric_sirs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, sirs_present, sirs_criteria_met, sepsis, severe_sepsis, septic_shock, category, age_group, temperature_c, heart_rate_bpm, respiratory_rate, wbc_k_ul, criteria, citation, disclaimer."},"400":{"description":"invalid_pediatric_sirs: Pediatric SIRS inputs must match Goldstein 2005 age-group vital-sign and WBC thresholds from that paper only. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pediatric-sirs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Pediatric SIRS (bulk)","operationId":"post_api_calc_pediatric_sirs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pediatric_sirs: Pediatric SIRS inputs must match Goldstein 2005 age-group vital-sign and WBC thresholds from that paper only. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pediatric-sirs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_group":"school_age","ards":"false","cardiovascular_dysfunction":"false","heart_rate_bpm":"100","respiratory_rate":"16","suspected_infection":"false","temperature_c":"37.0","two_or_more_other_organ_dysfunctions":"false","wbc_k_ul":"8.0"},{"age_group":"school_age","ards":"false","cardiovascular_dysfunction":"false","heart_rate_bpm":"100","respiratory_rate":"16","suspected_infection":"false","temperature_c":"37.0","two_or_more_other_organ_dysfunctions":"false","wbc_k_ul":"8.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/atria":{"get":{"description":"Compute the Fang 2011 ATRIA hemorrhage score from caller-assigned anemia, severe renal disease, age, prior hemorrhage, and hypertension flags.\n\nWhen an agent needs the published ATRIA AF hemorrhage-risk arithmetic (not HAS-BLED) and must not invent the point total from prose.\n\nNot a diagnosis. magent does not diagnose hemorrhage or atrial fibrillation.\n\nNot HAS-BLED. This tool is the Fang 2011 ATRIA hemorrhage score only.\n\nNot a warfarin order. Not a treatment or anticoagulation recommendation.\n\nmagent does not measure hemoglobin or compute eGFR. Anemia (paper: Hb <13 g/dL men or <12 g/dL women) and severe renal disease (paper: eGFR <30 or dialysis) are caller flags. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"anemia","description":"Anemia as assigned by the caller (paper: hemoglobin <13 g/dL in men or <12 g/dL in women). true or false. Scores 3. magent does not measure hemoglobin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"severe_renal_disease","description":"Severe renal disease as assigned by the caller (paper: eGFR <30 or dialysis). true or false. Scores 3. magent does not compute eGFR.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"age","description":"Age in years (18-120). ≥75 scores 2 (75 scores; 74 does not).","required":true,"schema":{"type":"integer"},"example":"60"},{"in":"query","name":"prior_hemorrhage","description":"Any prior hemorrhage diagnosis as assigned by the caller. true or false. Scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypertension","description":"Diagnosed hypertension as assigned by the caller. true or false. Scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"ATRIA hemorrhage score","operationId":"get_api_calc_atria","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk_band, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/atria"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ATRIA hemorrhage score (bulk)","operationId":"post_api_calc_atria","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/atria"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"60","anemia":"false","hypertension":"false","prior_hemorrhage":"false","severe_renal_disease":"false"},{"age":"60","anemia":"false","hypertension":"false","prior_hemorrhage":"false","severe_renal_disease":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/dire":{"get":{"description":"Sum Belgrade 2006 DIRE as Diagnosis + Intractability + Risk + Efficacy. Diagnosis, Intractability, and Efficacy are caller-assigned 1-3. Risk is the sum of Psychological, Chemical, Reliability, and Social support (each 1-3, so Risk 4-12). Total 7-21. Return whether the published score >= 14 cut for long-term opioid maintenance suitability is met.\n\nWhen an agent already has Belgrade 2006 1-3 integers for Diagnosis, Intractability, the four Risk subcategories, and Efficacy and needs the published 7-21 total and >=14 suitability cut. magent does not take a pain history, diagnose opioid use disorder, or write an opioid prescription or taper.\n\nNot a medical device.\n\nNot an opioid prescription or taper order. magent does not start, stop, or dose opioids.\n\nEach of Diagnosis, Intractability, Efficacy, and the four Risk subcategories is a caller-assigned integer 1-3. magent does not take a pain history or interview the patient.\n\nBelgrade 2006 only. Score 14-21 more suitable for long-term opioid maintenance; 7-13 less suitable. Not a diagnosis of opioid use disorder. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"diagnosis","description":"Caller-assigned Belgrade 2006 Diagnosis (integer 1-3): 1 benign chronic condition with minimal objective findings or no definite diagnosis; 2 slowly progressive condition concordant with moderate pain, or fixed deficit; 3 advanced condition concordant with severe pain with objective findings. magent does not take a pain history.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"intractability","description":"Caller-assigned Belgrade 2006 Intractability (integer 1-3): 1 few therapies tried and the patient is passively involved; 2 most appropriate treatments tried with inadequate response and the patient is reasonably involved; 3 patient fully engaged in appropriate treatments with inadequate response. magent does not take a pain history.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"psychological","description":"Caller-assigned Belgrade 2006 Risk subcategory Psychological (integer 1-3): 1 serious personality dysfunction or mental illness interfering with care; 2 personality or mental health interferes moderately; 3 good psychological functioning. One of four Risk items (Risk 4-12). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"chemical","description":"Caller-assigned Belgrade 2006 Risk subcategory Chemical (integer 1-3): 1 active or recent substance abuse; 2 chemical coper or history of chemical dependence in remission; 3 no chemical-dependence history. One of four Risk items (Risk 4-12). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"reliability","description":"Caller-assigned Belgrade 2006 Risk subcategory Reliability (integer 1-3): 1 many missed appointments, lacks insight, or poor observer of laws and rules; 2 generally reliable; 3 highly reliable. One of four Risk items (Risk 4-12). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"social_support","description":"Caller-assigned Belgrade 2006 Risk subcategory Social support (integer 1-3): 1 life in chaos, few resources, close relationships dysfunctional; 2 relationships exist but are strained; 3 stable supportive relationships and sufficient resources. One of four Risk items (Risk 4-12). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"efficacy","description":"Caller-assigned Belgrade 2006 Efficacy (integer 1-3): 1 poor function or minimal pain relief despite moderate-to-high doses; 2 moderate benefit with moderate function on moderate doses; 3 good function and pain relief on stable low-to-moderate doses. magent does not take a pain history or write an opioid prescription.","required":true,"schema":{"type":"integer"},"example":"1"}],"summary":"DIRE","operationId":"get_api_calc_dire","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, suitable_candidate, diagnosis, intractability, psychological, chemical, reliability, social_support, efficacy, risk, components, citation, disclaimer."},"400":{"description":"invalid_dire: DIRE score inputs must be integers in the Belgrade 2006 published 1-3 range for diagnosis, intractability, risk subcategories, and efficacy. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dire"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"DIRE (bulk)","operationId":"post_api_calc_dire","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_dire: DIRE score inputs must be integers in the Belgrade 2006 published 1-3 range for diagnosis, intractability, risk subcategories, and efficacy. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dire"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"chemical":"1","diagnosis":"1","efficacy":"1","intractability":"1","psychological":"1","reliability":"1","social_support":"1"},{"chemical":"1","diagnosis":"1","efficacy":"1","intractability":"1","psychological":"1","reliability":"1","social_support":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/atria-stroke":{"get":{"description":"Compute the Singer 2013 ATRIA stroke risk score from age, prior stroke, and caller-assigned female, diabetes, heart failure, hypertension, proteinuria, and eGFR <45 or ESRD flags.\n\nWhen an agent needs the published Singer 2013 ATRIA AF stroke-risk arithmetic (not CHA2DS2-VASc and not Fang 2011 ATRIA hemorrhage) and must not invent the point total from prose.\n\nNot a medical device. magent does not diagnose stroke or atrial fibrillation.\n\nNot a stroke diagnosis and not an anticoagulation order or treatment recommendation.\n\nNot CHA2DS2-VASc. This tool is the Singer 2013 ATRIA stroke risk score only.\n\nNot the Fang 2011 ATRIA hemorrhage (bleed) score. That is a different tool.\n\nmagent does not assay eGFR or urine. Proteinuria and eGFR <45 or ESRD are caller flags. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Singer 2013 Table 3 without prior stroke: <65 scores 0, 65-74 scores 3, 75-84 scores 5, ≥85 scores 6. With prior stroke: <65 scores 8, 65-74 scores 7, 75-84 scores 7, ≥85 scores 9.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"prior_stroke","description":"Prior ischemic stroke as assigned by the caller. true or false. Selects the Table 3 age column. Not a stroke diagnosis.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"female","description":"Female sex as assigned by the caller. true or false. Scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"diabetes","description":"Diabetes as assigned by the caller. true or false. Scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"heart_failure","description":"Congestive heart failure as assigned by the caller (paper CHF). true or false. Scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypertension","description":"Diagnosed hypertension as assigned by the caller. true or false. Scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"proteinuria","description":"Proteinuria as assigned by the caller. true or false. Scores 1. magent does not assay urine.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"egfr_lt_45_or_esrd","description":"eGFR <45 or ESRD as assigned by the caller. true or false. Scores 1. magent does not assay eGFR.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"ATRIA stroke risk score","operationId":"get_api_calc_atria_stroke","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, atria_stroke_band, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/atria-stroke"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ATRIA stroke risk score (bulk)","operationId":"post_api_calc_atria_stroke","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/atria-stroke"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","diabetes":"false","egfr_lt_45_or_esrd":"false","female":"false","heart_failure":"false","hypertension":"false","prior_stroke":"false","proteinuria":"false"},{"age":"50","diabetes":"false","egfr_lt_45_or_esrd":"false","female":"false","heart_failure":"false","hypertension":"false","prior_stroke":"false","proteinuria":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/stone-nephrolithometry":{"get":{"description":"Sum the Okhunov 2013 STONE nephrolithometry score for kidney calculi (PCNL) from five caller-assigned published item points and return the integer total (5–13). Does not return stone-free-rate bands.\n\nWhen an agent has already assigned Okhunov 2013 size (mm²), tract length, hydronephrosis, involved calyces or staghorn, and Hounsfield-unit essence for renal calculi planned for PCNL and needs the published integer sum, not a PCNL order, CT read, or the ureteral STONE score.\n\nNot a medical device. magent does not measure stone size, tract, hydronephrosis, calyces, or HU. Size, tract, obstruction, calyces, and essence are caller-assigned.\n\nNot an operative or PCNL order. The score is not a command to operate, place a tract, or choose a percutaneous approach.\n\nNot the Moore 2014 ureteral STONE score. This tool is Okhunov 2013 STONE nephrolithometry for kidney calculi / PCNL.\n\nOkhunov 2013 correlated score with stone-free rate but did not publish exclusive SFR cutoffs. magent returns score and max_score only. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"size","description":"Caller-assigned stone size in mm² (Okhunov 2013). 0_399 (0–399 mm²) scores 1; 400_799 (400–799 mm²) scores 2; 800_1599 (800–1599 mm²) scores 3; ge_1600 (≥1600 mm²) scores 4. magent does not measure stone size or CT.","required":true,"schema":{"type":"string","enum":["0_399","400_799","800_1599","ge_1600"]},"example":"0_399"},{"in":"query","name":"tract","description":"Caller-assigned tract length in mm, skin-to-stone (Okhunov 2013). le_100 (≤100 mm) scores 1; gt_100 (>100 mm) scores 2. magent does not measure tract length or CT.","required":true,"schema":{"type":"string","enum":["le_100","gt_100"]},"example":"le_100"},{"in":"query","name":"obstruction","description":"Caller-assigned hydronephrosis / obstruction (Okhunov 2013). none_or_mild scores 1; moderate_or_severe scores 2. magent does not measure hydronephrosis or CT.","required":true,"schema":{"type":"string","enum":["none_or_mild","moderate_or_severe"]},"example":"none_or_mild"},{"in":"query","name":"calyces","description":"Caller-assigned number of involved calyces or staghorn (Okhunov 2013). 1_or_2 scores 1; 3 scores 2; staghorn scores 3. magent does not count calyces or read CT.","required":true,"schema":{"type":"string","enum":["1_or_2","3","staghorn"]},"example":"1_or_2"},{"in":"query","name":"essence","description":"Caller-assigned stone density in Hounsfield units (Okhunov 2013 essence). le_950 (≤950 HU) scores 1; gt_950 (>950 HU) scores 2. magent does not measure HU or CT.","required":true,"schema":{"type":"string","enum":["le_950","gt_950"]},"example":"le_950"}],"summary":"STONE nephrolithometry","operationId":"get_api_calc_stone_nephrolithometry","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, size, tract, obstruction, calyces, essence, components, citation, disclaimer."},"400":{"description":"invalid_stone_nephrolithometry: size must be 0_399, 400_799, 800_1599, or ge_1600; tract must be le_100 or gt_100; obstruction must be none_or_mild or moderate_or_severe; calyces must be 1_or_2, 3, or staghorn; essence must be le_950 or gt_950 (Okhunov 2013 STONE nephrolithometry). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/stone-nephrolithometry"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"STONE nephrolithometry (bulk)","operationId":"post_api_calc_stone_nephrolithometry","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_stone_nephrolithometry: size must be 0_399, 400_799, 800_1599, or ge_1600; tract must be le_100 or gt_100; obstruction must be none_or_mild or moderate_or_severe; calyces must be 1_or_2, 3, or staghorn; essence must be le_950 or gt_950 (Okhunov 2013 STONE nephrolithometry). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/stone-nephrolithometry"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"calyces":"1_or_2","essence":"le_950","obstruction":"none_or_mild","size":"0_399","tract":"le_100"},{"calyces":"1_or_2","essence":"le_950","obstruction":"none_or_mild","size":"0_399","tract":"le_100"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mnihss":{"get":{"description":"Sum Meyer/Lyden 2001 modified NIH stroke scale points from 11 caller-assigned NINDS-style examination integers, with left/right motor and sensory collapsed to 0-1. Does not apply total-score severity bands.\n\nWhen an agent already has Meyer 2001 mNIHSS integers and needs that published total. magent does not examine the patient, score Brott 1989 15-item NIHSS, or issue a tPA order.\n\nNot a medical device. magent does not examine the patient. Each item is a caller-assigned Meyer 2001 integer. Not a diagnosis.\n\nThis is the Meyer/Lyden 2001 modified NIHSS (NINDS 11-item form): drops LOC, facial palsy, limb ataxia, and dysarthria; collapses sensory to 0 = normal or 1 = abnormal; keeps left and right motor arm and leg. It is not Brott 1989 15-item NIHSS (weaker-limb motor, pupillary response, plantar reflex). Not a tPA order.\n\nMeyer 2001 published no total-score mild/moderate/severe cutoffs. This tool returns score and max_score only. It does not apply later 5/15/20 website cuts. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"loc_questions","description":"Caller-assigned Meyer 2001 LOC questions (integer 0-2): 0 answers both correctly, 1 answers one correctly, 2 incorrect. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"loc_commands","description":"Caller-assigned Meyer 2001 LOC commands (integer 0-2): 0 obeys both correctly, 1 obeys one correctly, 2 incorrect. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"best_gaze","description":"Caller-assigned Meyer 2001 best gaze (integer 0-2): 0 normal, 1 partial gaze palsy, 2 forced deviation. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"best_visual","description":"Caller-assigned Meyer 2001 best visual (integer 0-3): 0 no visual loss, 1 partial hemianopia, 2 complete hemianopia, 3 bilateral hemianopia. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"left_arm","description":"Caller-assigned Meyer 2001 left arm motor, NINDS style (integer 0-4): 0 no drift, 1 drift, 2 some effort against gravity, 3 no effort against gravity, 4 no movement. Not Brott weaker-limb. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"right_arm","description":"Caller-assigned Meyer 2001 right arm motor, NINDS style (integer 0-4): 0 no drift, 1 drift, 2 some effort against gravity, 3 no effort against gravity, 4 no movement. Not Brott weaker-limb. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"left_leg","description":"Caller-assigned Meyer 2001 left leg motor, NINDS style (integer 0-4): 0 no drift, 1 drift, 2 some effort against gravity, 3 no effort against gravity, 4 no movement. Not Brott weaker-limb. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"right_leg","description":"Caller-assigned Meyer 2001 right leg motor, NINDS style (integer 0-4): 0 no drift, 1 drift, 2 some effort against gravity, 3 no effort against gravity, 4 no movement. Not Brott weaker-limb. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"sensory","description":"Caller-assigned Meyer 2001 sensory (integer 0-1): 0 normal, 1 abnormal. Collapsed from NIHSS 0-2; 2 is invalid. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1]},"example":"0"},{"in":"query","name":"best_language","description":"Caller-assigned Meyer 2001 best language (integer 0-3): 0 no aphasia, 1 mild to moderate, 2 severe aphasia, 3 mute. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"neglect","description":"Caller-assigned Meyer 2001 neglect (integer 0-2): 0 no neglect, 1 partial neglect, 2 complete neglect. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"}],"summary":"mNIHSS","operationId":"get_api_calc_mnihss","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_mnihss: mNIHSS needs eleven NINDS-style items (Lyden/Meyer 2001; not Brott 1989 NIHSS). Returned before settlement; you are not charged.; invalid_mnihss_item: each mNIHSS item must be an integer in that item's published range (Meyer 2001). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mnihss"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"mNIHSS (bulk)","operationId":"post_api_calc_mnihss","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_mnihss: mNIHSS needs eleven NINDS-style items (Lyden/Meyer 2001; not Brott 1989 NIHSS). Returned before settlement; you are not charged.; invalid_mnihss_item: each mNIHSS item must be an integer in that item's published range (Meyer 2001). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mnihss"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"best_gaze":"0","best_language":"0","best_visual":"0","left_arm":"0","left_leg":"0","loc_commands":"0","loc_questions":"0","neglect":"0","right_arm":"0","right_leg":"0","sensory":"0"},{"best_gaze":"0","best_language":"0","best_visual":"0","left_arm":"0","left_leg":"0","loc_commands":"0","loc_questions":"0","neglect":"0","right_arm":"0","right_leg":"0","sensory":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/nyha":{"get":{"description":"Return the 1994 NYHA functional capacity class 1-4 from a caller-assigned integer, with the published class description.\n\nWhen an agent already has a NYHA functional class 1-4 as in the 1994 9th edition and must not invent Objective Assessment A-D or ACC/AHA stages.\n\nNot a medical device and not a heart-failure diagnosis. magent does not examine the patient.\n\nThe caller assigns NYHA class 1-4. magent does not interview or examine the patient.\n\nFunctional capacity I-IV only (1994 9th edition). It does not implement Objective Assessment A-D or ACC/AHA stages. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"nyha_class","description":"NYHA 1994 functional capacity class 1-4 as assigned by the caller (1 no limitation of ordinary activity; 2 slight limitation, comfortable at rest, ordinary activity causes symptoms; 3 marked limitation, less than ordinary activity causes symptoms; 4 inability to carry on any physical activity without discomfort, symptoms may be present at rest). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"1"}],"summary":"NYHA","operationId":"get_api_calc_nyha","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, nyha_class, score, max_score, description, components, citation, disclaimer."},"400":{"description":"invalid_nyha: nyha_class must be an integer 1, 2, 3, or 4 (NYHA 1994). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nyha"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"NYHA (bulk)","operationId":"post_api_calc_nyha","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_nyha: nyha_class must be an integer 1, 2, 3, or 4 (NYHA 1994). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nyha"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"nyha_class":"1"},{"nyha_class":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-fecal-incontinence":{"get":{"description":"Apply the Rao 2016 Rome IV fecal incontinence (F1) diagnostic criteria and return whether the published fecal incontinence box holds (rome_iv_fecal_incontinence).\n\nWhen an agent already has the four caller-assigned Rao 2016 Rome IV fecal incontinence flags and needs whether the published fecal incontinence box holds. magent does not examine the patient or read manometry.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose fecal incontinence.\n\nThe caller assigns the four flags. magent does not examine the patient or read manometry.\n\nThis tool is Rao 2016 Rome IV fecal incontinence (F1) only. The research 2–4 episodes in 4 weeks frequency remark is copy-only and is not parsed. Not pediatric nonretentive fecal incontinence (H3b). Not Wexner constipation score. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"recurrent_uncontrolled_passage_of_fecal_material","description":"Recurrent uncontrolled passage of fecal material for at least 3 months in a person with developmental age at least 4 years (Rao 2016 Rome IV fecal incontinence F1 clinical definition). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"developmental_age_at_least_4","description":"Developmental age at least 4 years, as assigned (Rao 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"fulfilled_last_3_months","description":"Criteria fulfilled for the last 3 months, as assigned (Rao 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"onset_at_least_6_months","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Rao 2016 research timing, same as other magent Rome tools). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV fecal incontinence","operationId":"get_api_calc_rome_iv_fecal_incontinence","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, rome_iv_fecal_incontinence, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_fecal_incontinence: Rome IV fecal incontinence needs the Rao 2016 anorectal fecal-incontinence flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-fecal-incontinence"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV fecal incontinence (bulk)","operationId":"post_api_calc_rome_iv_fecal_incontinence","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_fecal_incontinence: Rome IV fecal incontinence needs the Rao 2016 anorectal fecal-incontinence flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-fecal-incontinence"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"developmental_age_at_least_4":"true","fulfilled_last_3_months":"true","onset_at_least_6_months":"true","recurrent_uncontrolled_passage_of_fecal_material":"true"},{"developmental_age_at_least_4":"true","fulfilled_last_3_months":"true","onset_at_least_6_months":"true","recurrent_uncontrolled_passage_of_fecal_material":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/astct-crs":{"get":{"description":"Apply Lee 2019 ASTCT Table 1 cytokine release syndrome grading and return grade 0–4 from caller-assigned fever, fever waiver, hypotension, and hypoxia. Grade is the more severe of hypotension versus hypoxia. Organ toxicities do not influence grade. Not ICANS.\n\nWhen an agent already has caller-assigned ASTCT CRS fever, hypotension, and hypoxia tokens and needs the published Table 1 grade. magent does not measure temperature, start vasopressors, or grade ICANS.\n\nNot a medical device and not a CRS diagnosis or a treatment, vasopressor, oxygen, or intubation order.\n\nmagent does not measure temperature or start vasopressors. fever, fever_waived, hypotension, and hypoxia are caller-assigned Lee 2019 Table 1 tokens.\n\nOrgan toxicities associated with CRS may be graded separately (for example CTCAE) but they do not influence ASTCT CRS grade.\n\nNot ICANS. This tool does not grade neurologic toxicity associated with immune effector cells.\n\nGrade 5 (death) is not returned. Both hypotension and hypoxia none without fever and without fever_waived is grade 0 (crs false), which is not a Table 1 row. Not Lee 2014. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"fever","description":"Fever as assigned by the caller (Lee 2019 ASTCT CRS Table 1): temperature ≥38°C not attributable to another cause. true or false. Required unless fever_waived is true when hypotension or hypoxia is not none. magent does not measure temperature.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"fever_waived","description":"true if CRS was already treated with antipyretic, tocilizumab, or steroids so fever is no longer required to grade subsequent CRS (Lee 2019). false otherwise. magent does not start those therapies.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypotension","description":"Lee 2019 Table 1 hypotension as assigned by the caller: none; no_vasopressors (hypotension not requiring vasopressors, grade 2); one_vasopressor (one vasopressor with or without vasopressin, grade 3); multiple_vasopressors (multiple vasopressors excluding vasopressin, grade 4). magent does not start vasopressors.","required":true,"schema":{"type":"string","enum":["none","no_vasopressors","one_vasopressor","multiple_vasopressors"]},"example":"none"},{"in":"query","name":"hypoxia","description":"Lee 2019 Table 1 hypoxia as assigned by the caller: none; low_flow (≤6 L/min nasal cannula or blow-by, grade 2); high_flow (>6 L/min nasal cannula, facemask, nonrebreather, or Venturi, grade 3); positive_pressure (CPAP, BiPAP, or intubation and mechanical ventilation, grade 4). magent does not set oxygen or ventilator mode.","required":true,"schema":{"type":"string","enum":["none","low_flow","high_flow","positive_pressure"]},"example":"none"}],"summary":"ASTCT CRS","operationId":"get_api_calc_astct_crs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, grade, crs, fever, fever_waived, hypotension, hypoxia, hypotension_grade, hypoxia_grade, criteria, citation, disclaimer."},"400":{"description":"invalid_astct_crs: hypotension must be none, no_vasopressors, one_vasopressor, or multiple_vasopressors; hypoxia none, low_flow, high_flow, or positive_pressure (Lee 2019 ASTCT CRS Table 1). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/astct-crs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ASTCT CRS (bulk)","operationId":"post_api_calc_astct_crs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_astct_crs: hypotension must be none, no_vasopressors, one_vasopressor, or multiple_vasopressors; hypoxia none, low_flow, high_flow, or positive_pressure (Lee 2019 ASTCT CRS Table 1). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/astct-crs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"fever":"true","fever_waived":"false","hypotension":"none","hypoxia":"none"},{"fever":"true","fever_waived":"false","hypotension":"none","hypoxia":"none"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/crusade":{"get":{"description":"Compute the CRUSADE in-hospital major bleeding score from hematocrit, caller-assigned Cockcroft–Gault creatinine clearance, heart rate, sex, signs of CHF, prior vascular disease, diabetes, and systolic BP (Subherwal 2009 Table 4).\n\nWhen an agent needs the published Subherwal 2009 CRUSADE Table 4 total and in-hospital major-bleeding quintile for NSTE-ACS / NSTEMI and must not invent bands or compute Cockcroft–Gault.\n\nNot a medical device and not a treatment, transfusion, or anticoagulation recommendation.\n\nCreatinine clearance is Cockcroft–Gault mL/min as assigned by the caller. magent does not compute Cockcroft–Gault.\n\nSigns of CHF at presentation, prior vascular disease (PAD or prior stroke), and diabetes mellitus are caller-assigned. magent does not examine the patient.\n\nThis is the CRUSADE bleeding score for NSTE-ACS / NSTEMI (Subherwal 2009 Table 4). It is not a STEMI score and not TIMI.\n\nQuintile percents are the published in-hospital major bleeding rates. max_score is the Table 4 sum of maxima (96). magent does not invent a 100 cap. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"hematocrit_percent","description":"Hematocrit percent (10-70). Subherwal 2009 Table 4: <31 → 9; 31–<34 → 7; 34–<37 → 3; 37–<40 → 2; ≥40 → 0.","required":true,"schema":{"type":"number"},"example":"42"},{"in":"query","name":"crcl_ml_min","description":"Creatinine clearance in mL/min (1-300), Cockcroft–Gault as assigned by the caller. magent does not compute Cockcroft–Gault. Table 4: ≤15 → 39; >15–30 → 35; >30–60 → 28; >60–90 → 17; >90–120 → 7; >120 → 0.","required":true,"schema":{"type":"number"},"example":"130"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats per minute (integer 30-220). Table 4: ≤70 → 0; 71–80 → 1; 81–90 → 3; 91–100 → 6; 101–110 → 8; 111–120 → 10; ≥121 → 11.","required":true,"schema":{"type":"integer"},"example":"65"},{"in":"query","name":"sex","description":"Sex (female or male). Female scores 8; male scores 0.","required":true,"schema":{"type":"string"},"example":"male"},{"in":"query","name":"signs_of_chf","description":"Signs of CHF at presentation as assigned by the caller. true or false. 7 points if true. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"prior_vascular_disease","description":"Prior vascular disease (PAD or prior stroke) as assigned by the caller. true or false. 6 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"diabetes","description":"Diabetes mellitus as assigned by the caller. true or false. 6 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"systolic_mm_hg","description":"Systolic blood pressure in mm Hg (50-250). Table 4 is non-monotonic: ≤90 → 10; 91–100 → 8; 101–120 → 5; 121–180 → 1; 181–200 → 3; ≥201 → 5.","required":true,"schema":{"type":"number"},"example":"140"}],"summary":"CRUSADE bleeding score","operationId":"get_api_calc_crusade","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, crusade_band, in_hospital_major_bleeding_percent, hematocrit_percent, crcl_ml_min, heart_rate_bpm, sex, signs_of_chf, prior_vascular_disease, diabetes, systolic_mm_hg, components, citation, disclaimer."},"400":{"description":"invalid_hematocrit: hematocrit_percent must be a number from 10 to 70. Returned before settlement; you are not charged.; invalid_crcl: crcl_ml_min must be a number from 1 to 300 (Cockcroft-Gault mL/min as assigned by the caller). Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/crusade"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CRUSADE bleeding score (bulk)","operationId":"post_api_calc_crusade","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_hematocrit: hematocrit_percent must be a number from 10 to 70. Returned before settlement; you are not charged.; invalid_crcl: crcl_ml_min must be a number from 1 to 300 (Cockcroft-Gault mL/min as assigned by the caller). Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/crusade"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"crcl_ml_min":"130","diabetes":"false","heart_rate_bpm":"65","hematocrit_percent":"42","prior_vascular_disease":"false","sex":"male","signs_of_chf":"false","systolic_mm_hg":"140"},{"crcl_ml_min":"130","diabetes":"false","heart_rate_bpm":"65","hematocrit_percent":"42","prior_vascular_disease":"false","sex":"male","signs_of_chf":"false","systolic_mm_hg":"140"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/new-orleans-head":{"get":{"description":"Apply the Haydel 2000 New Orleans Head CT Rule and return whether CT is indicated from age and six caller-assigned findings after minor head injury.\n\nWhen an agent has caller-assigned findings after minor head injury in an adult with GCS 15 as published and needs the New Orleans (Charity) Head CT Rule, not the Canadian CT Head Rule and not PECARN.\n\nNot a diagnosis of brain injury. magent does not examine the patient.\n\nThe published rule is GCS 15 minor head injury in adults. magent does not take GCS; the caller assigns the clinical flags.\n\nThis tool is the Haydel 2000 New Orleans / Charity Head CT Rule only. It is not the Canadian CT Head Rule, not PECARN, and not a pediatric head-CT rule. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Age >60 is a CT indication; 60 does not. The published rule is GCS 15 minor head injury in adults; magent does not take GCS.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"headache","description":"Headache. true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"vomiting","description":"Vomiting. true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"drug_or_alcohol_intoxication","description":"Drug or alcohol intoxication. true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"short_term_memory_deficit","description":"Deficit in short-term memory (anterograde amnesia). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"trauma_above_clavicles","description":"Physical evidence of trauma above the clavicles. true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"seizure","description":"Seizure. true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"New Orleans Head CT Rule","operationId":"get_api_calc_new_orleans_head","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, ct_indicated, age_years, criteria, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/new-orleans-head"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"New Orleans Head CT Rule (bulk)","operationId":"post_api_calc_new_orleans_head","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/new-orleans-head"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","drug_or_alcohol_intoxication":"false","headache":"false","seizure":"false","short_term_memory_deficit":"false","trauma_above_clavicles":"false","vomiting":"false"},{"age":"40","drug_or_alcohol_intoxication":"false","headache":"false","seizure":"false","short_term_memory_deficit":"false","trauma_above_clavicles":"false","vomiting":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-diarrhea":{"get":{"description":"Apply the Mearin 2016 Rome IV C3 functional diarrhea criteria and return whether the published C3 box holds (rome_iv_diarrhea).\n\nWhen an agent already has the three caller-assigned Rome IV C3 flags as in Mearin 2016 and needs whether the published functional diarrhea box holds. magent does not examine the patient.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose functional diarrhea.\n\nThe caller assigns the three flags. magent does not examine the patient.\n\nThis tool is adult Rome IV C3 functional diarrhea only. Not child G5, not IBS-D, not Rome IV IBS (Mearin 2016 IBS box), not Manning, and not functional constipation. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"criteria_last_3_months_onset_6_months","description":"Criteria fulfilled for the last 3 months with symptom onset at least 6 months prior to diagnosis, as assigned (Mearin 2016 C3). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"loose_or_watery_stools_gt_25_percent_without_predominant_pain_or_bloating","description":"Loose or watery stools, without predominant abdominal pain or bothersome bloating, occurring in more than 25% of stools (Mearin 2016 C3). true or false as assigned by the caller. magent does not inspect stool.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"insufficient_criteria_for_ibs_d","description":"Insufficient criteria for diarrhea-predominant IBS, as assigned by the caller (Mearin 2016 C3 excludes patients who meet IBS-D). true or false. magent does not apply the IBS box.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV Diarrhea","operationId":"get_api_calc_rome_iv_diarrhea","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, rome_iv_diarrhea, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-diarrhea"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV Diarrhea (bulk)","operationId":"post_api_calc_rome_iv_diarrhea","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-diarrhea"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"criteria_last_3_months_onset_6_months":"true","insufficient_criteria_for_ibs_d":"true","loose_or_watery_stools_gt_25_percent_without_predominant_pain_or_bloating":"true"},{"criteria_last_3_months_onset_6_months":"true","insufficient_criteria_for_ibs_d":"true","loose_or_watery_stools_gt_25_percent_without_predominant_pain_or_bloating":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/iwg2-ad":{"get":{"description":"Apply Dubois 2014 IWG-2 typical AD research criteria from caller-assigned hippocampal-type memory, in-vivo pathology, and exclusion flags. magent does not examine the patient or assay CSF/PET.\n\nWhen an agent already has IWG-2 typical AD phenotype and pathology flags as assigned by the caller and needs the published typical_ad result. Not NINCDS-ADRDA, not NIA-AA, not DSM, and not a diagnosis.\n\nNot a medical device.\n\nNot a diagnosis. IWG-2 typical AD is research diagnostic criteria only.\n\nTypical AD phenotype only. This tool does not implement IWG-2 atypical AD phenotypes (posterior cortical atrophy, logopenic variant, frontal variant, or Down syndrome).\n\nmagent does not examine the patient, assay CSF, or read amyloid PET. All flags are caller-assigned.\n\nNot NIA-AA ATN. Not NINCDS-ADRDA. Not DSM. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"early_episodic_memory","description":"Early and significant episodic memory impairment of the hippocampal type (IWG-2 specific phenotype for typical AD), as assigned by the caller. true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"csf_abeta_and_tau","description":"Decreased Aβ1-42 together with increased T-tau or P-tau in CSF, as assigned by the caller (Dubois 2014 IWG-2 in-vivo AD pathology). true or false. magent does not assay CSF.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"amyloid_pet","description":"Increased tracer retention on amyloid PET, as assigned by the caller (Dubois 2014 IWG-2 in-vivo AD pathology). true or false. magent does not read PET.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"autosomal_dominant_mutation","description":"Proven AD autosomal-dominant mutation in PSEN1, PSEN2, or APP, as assigned by the caller (Dubois 2014 IWG-2 in-vivo AD pathology). true or false. magent does not sequence genes.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"no_better_explanation","description":"Exclusion of other disorders that could account for the phenotype, as assigned by the caller (Dubois 2014 IWG-2). true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"IWG-2 typical AD","operationId":"get_api_calc_iwg2_ad","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, typical_ad, in_vivo_pathology, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/iwg2-ad"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"IWG-2 typical AD (bulk)","operationId":"post_api_calc_iwg2_ad","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/iwg2-ad"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"amyloid_pet":"false","autosomal_dominant_mutation":"false","csf_abeta_and_tau":"true","early_episodic_memory":"true","no_better_explanation":"true"},{"amyloid_pet":"false","autosomal_dominant_mutation":"false","csf_abeta_and_tau":"true","early_episodic_memory":"true","no_better_explanation":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ardsnet-tv":{"get":{"description":"Compute ARDS Network 2000 predicted body weight from height and sex and the lower-tidal-volume arm of 6 mL/kg PBW.\n\nWhen an agent needs the published ARDSNet PBW and 6 mL/kg tidal volume and must not invent adult ETT insertion depth, a Devine IBW kilogram, or a plateau-pressure titration.\n\nNot a medical device. Not a ventilator order. magent does not set mode, PEEP, or FiO2.\n\nPlateau-pressure titration (4–8 mL/kg, Pplat ≤30 cm H2O) is not computed; this tool returns 6 mL/kg PBW and the published 4 mL/kg minimum only. The traditional 12 mL/kg arm is not computed.\n\nNot AECC or Berlin ARDS diagnosis (see berlin-ards). Not pediatric endotracheal tube size (see pediatric-ett). magent does not predict ETT insertion depth.\n\nARDSNet predicted body weight from the 2000 trial, not Devine gentamicin ideal body weight (see ibw). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"height_cm","description":"Height in centimeters (50-250). Provide height_cm or height_in.","required":false,"schema":{"type":"number"},"example":"170"},{"in":"query","name":"height_in","description":"Height in inches (20-98). Converted as cm = in * 2.54.","required":false,"schema":{"type":"number"},"example":"67"},{"in":"query","name":"sex","description":"Sex used by ARDSNet PBW (50 kg male, 45.5 kg female base).","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"}],"summary":"ARDSNet tidal volume","operationId":"get_api_calc_ardsnet_tv","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, sex, height_cm, pbw_kg, tidal_volume_6_ml, tidal_volume_4_ml, citation, disclaimer."},"400":{"description":"invalid_height: height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ardsnet-tv"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ARDSNet tidal volume (bulk)","operationId":"post_api_calc_ardsnet_tv","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_height: height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ardsnet-tv"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"height_cm":"170","sex":"male"},{"height_cm":"170","sex":"male"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/feverpain":{"get":{"description":"Sum the five Little 2013 FeverPAIN flags for sore throat and return the published 0-1 / 2-3 / 4-5 score group.\n\nWhen an agent needs the published FeverPAIN point total and must not invent the five findings or a test-or-treat decision.\n\nNot a medical device.\n\nNot a test-or-treat order and not a diagnosis of streptococcal pharyngitis.\n\nThe caller assigns the five clinical findings. magent does not examine the throat.\n\nBands are published Little 2013 score groups (0-1 / 2-3 / 4-5), not a protocol. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"fever_in_past_24h","description":"Fever in the past 24 hours (Little 2013). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"purulent_tonsils","description":"Purulent tonsils (Little 2013). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"attends_within_3_days","description":"Attendance within 3 days of onset (Little 2013). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"severely_inflamed_tonsils","description":"Severely inflamed tonsils (Little 2013). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"no_cough_or_coryza","description":"Absence of cough or coryza (Little 2013). true when the published finding is present; false otherwise. Assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"FeverPAIN","operationId":"get_api_calc_feverpain","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, band, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/feverpain"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"FeverPAIN (bulk)","operationId":"post_api_calc_feverpain","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/feverpain"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"attends_within_3_days":"false","fever_in_past_24h":"false","no_cough_or_coryza":"false","purulent_tonsils":"false","severely_inflamed_tonsils":"false"},{"attends_within_3_days":"false","fever_in_past_24h":"false","no_cough_or_coryza":"false","purulent_tonsils":"false","severely_inflamed_tonsils":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/sms":{"get":{"description":"Return the Gill 2005 Simplified Motor Score (0-2) from a caller-assigned motor category: obeys commands (2), localizes pain (1), or withdrawal to pain or less (0).\n\nWhen an agent needs the published Gill 2005 Simplified Motor Score and must not invent a GCS total, a simplified verbal score, or a triage or intubation order.\n\nNot a GCS replacement protocol and not a triage or intubation order.\n\nNot a medical device and not a diagnosis. magent does not examine the patient.\n\nMotor is caller-assigned as obeys, localizes, or withdrawal_or_less. This is Gill 2005 Simplified Motor Score only, not the simplified verbal score and not full GCS. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"motor","description":"Gill 2005 Simplified Motor Score motor category as assigned by the caller. obeys (2, obeys commands), localizes (1, localizes pain), or withdrawal_or_less (0, withdrawal to pain or less). magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["obeys","localizes","withdrawal_or_less"]},"example":"obeys"}],"summary":"SMS","operationId":"get_api_calc_sms","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, motor, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_sms_motor: motor must be obeys, localizes, or withdrawal_or_less (Gill 2005 SMS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sms"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SMS (bulk)","operationId":"post_api_calc_sms","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_sms_motor: motor must be obeys, localizes, or withdrawal_or_less (Gill 2005 SMS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sms"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"motor":"obeys"},{"motor":"obeys"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/bops":{"get":{"description":"Sum three caller-assigned Hesselgard 2007 BOPS integers (0-2) and return the published total (max 6).\n\nWhen an agent has already assigned Hesselgard 2007 0-2 integers for facial expression, verbalization, and body position and needs the published total, not a pain diagnosis, analgesic order, or unpublished intensity cutoff.\n\nNot a medical device and not a pain diagnosis or analgesic order.\n\nEach of the three items is a caller-assigned integer 0, 1, or 2 from Hesselgard 2007. magent does not observe the child.\n\nHesselgard 2007 described postoperative pain measurement in children 1-7 years. magent does not take an age parameter and does not restrict the caller.\n\nTotal is 0-6. magent does not emit an analgesic cutoff; Hesselgard 2007 did not name a ≥3 scoring band.\n\nNot FLACC. Not Abbey. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"facial_expression","description":"Caller-assigned Hesselgard 2007 BOPS facial expression (integer 0-2): 0 neutral/positive composed; 1 negative/concerned; 2 grimacing/distorted. magent does not observe the child.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"verbalization","description":"Caller-assigned Hesselgard 2007 BOPS verbalization (integer 0-2): 0 normal conversation/laughing/crowing; 1 completely quiet, sobbing, and/or complaining not because of pain; 2 crying, screaming, and/or complaining about pain. magent does not observe the child.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"body_position","description":"Caller-assigned Hesselgard 2007 BOPS body position (integer 0-2): 0 inactive, lying relaxed with all extremities or sitting/walking; 1 restless movements, shifting, and/or touching the wound area; 2 lying rigid and/or drawn up with arms and legs close to the body. magent does not observe the child.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"BOPS","operationId":"get_api_calc_bops","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, facial_expression, verbalization, body_position, components, citation, disclaimer."},"400":{"description":"invalid_bops: BOPS inputs must be the three caller-assigned 0-2 Hesselgard 2007 items (facial_expression, verbalization, body_position). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bops"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"BOPS (bulk)","operationId":"post_api_calc_bops","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_bops: BOPS inputs must be the three caller-assigned 0-2 Hesselgard 2007 items (facial_expression, verbalization, body_position). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bops"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"body_position":"0","facial_expression":"0","verbalization":"0"},{"body_position":"0","facial_expression":"0","verbalization":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ciwa-b":{"get":{"description":"Sum the twenty Busto 1989 CIWA-B items (each caller-assigned integer 0-4) and return the published total (max 80). Hours of sleep and minutes to fall asleep are recorded only.\n\nWhen an agent has already assigned Busto 1989 0-4 integers and needs the published CIWA-B total, not a later mild-to-very-severe band or a benzodiazepine prescription.\n\nNot a medical device and not a benzodiazepine prescription, taper, or treatment order.\n\nThe twenty scored items are caller-assigned Busto 1989 integers 0-4. magent does not observe the patient.\n\nhours_of_sleep and minutes_to_fall_asleep are optional recorded values from that paper and are not added to the total.\n\nBusto 1989 published the twenty-item 0-80 instrument. magent does not apply later 1-20 / 21-40 / 41-60 / 61-80 mild-to-very-severe manuals.\n\nNot CIWA-Ar (alcohol). Not COWS (opiate). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"restlessness","description":"Caller-assigned Busto 1989 observation of restlessness and agitation (integer 0-4). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"tremor","description":"Caller-assigned Busto 1989 tremor with arms extended and fingers apart (integer 0-4). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"sweating","description":"Caller-assigned Busto 1989 sweating, including palms (integer 0-4). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"irritability","description":"Caller-assigned Busto 1989 irritability (Do you feel irritable?; integer 0-4). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"fatigue","description":"Caller-assigned Busto 1989 fatigue (Do you feel fatigued / tired?; integer 0-4). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"tension","description":"Caller-assigned Busto 1989 tension (Do you feel tense?; integer 0-4). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"concentration","description":"Caller-assigned Busto 1989 difficulty concentrating (integer 0-4). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"appetite","description":"Caller-assigned Busto 1989 loss of appetite (integer 0-4). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"numbness","description":"Caller-assigned Busto 1989 numbness or burning in the face, hands, or feet (integer 0-4). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"palpitations","description":"Caller-assigned Busto 1989 heart racing / palpitations (integer 0-4). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"headache","description":"Caller-assigned Busto 1989 head full or achy (integer 0-4). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"muscle_aches","description":"Caller-assigned Busto 1989 muscle aches or stiffness (integer 0-4). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"anxiety","description":"Caller-assigned Busto 1989 anxious, nervous, or jittery (integer 0-4). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"upset","description":"Caller-assigned Busto 1989 upset (Do you feel upset?; integer 0-4). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"sleep_restfulness","description":"Caller-assigned Busto 1989 how restful was your sleep last night (integer 0-4). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"weakness","description":"Caller-assigned Busto 1989 weakness (Do you feel weak?; integer 0-4). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"enough_sleep","description":"Caller-assigned Busto 1989 whether you had enough sleep last night (integer 0-4). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"visual_disturbances","description":"Caller-assigned Busto 1989 visual disturbances (sensitivity to light, blurred vision; integer 0-4). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"fear","description":"Caller-assigned Busto 1989 fear (Are you fearful?; integer 0-4). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"worry","description":"Caller-assigned Busto 1989 worrying about possible misfortunes lately (integer 0-4). magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"hours_of_sleep","description":"Optional Busto 1989 recorded hours of sleep last night (integer 0-24). Not added to the CIWA-B total. magent does not observe the patient.","required":false,"schema":{"type":"integer"},"example":"8"},{"in":"query","name":"minutes_to_fall_asleep","description":"Optional Busto 1989 recorded minutes to fall asleep last night (integer 0-1440). Not added to the CIWA-B total. magent does not observe the patient.","required":false,"schema":{"type":"integer"},"example":"15"}],"summary":"CIWA-B","operationId":"get_api_calc_ciwa_b","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, hours_of_sleep, minutes_to_fall_asleep, citation, disclaimer."},"400":{"description":"invalid_ciwa_b: CIWA-B needs the twenty Busto 1989 0-4 items (not a benzodiazepine prescription). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ciwa-b"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CIWA-B (bulk)","operationId":"post_api_calc_ciwa_b","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ciwa_b: CIWA-B needs the twenty Busto 1989 0-4 items (not a benzodiazepine prescription). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ciwa-b"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"anxiety":"0","appetite":"0","concentration":"0","enough_sleep":"0","fatigue":"0","fear":"0","headache":"0","irritability":"0","muscle_aches":"0","numbness":"0","palpitations":"0","restlessness":"0","sleep_restfulness":"0","sweating":"0","tension":"0","tremor":"0","upset":"0","visual_disturbances":"0","weakness":"0","worry":"0"},{"anxiety":"0","appetite":"0","concentration":"0","enough_sleep":"0","fatigue":"0","fear":"0","headache":"0","irritability":"0","muscle_aches":"0","numbness":"0","palpitations":"0","restlessness":"0","sleep_restfulness":"0","sweating":"0","tension":"0","tremor":"0","upset":"0","visual_disturbances":"0","weakness":"0","worry":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/asdas-crp":{"get":{"description":"Compute the van der Heijde 2009 ASAS-preferred ASDAS-CRP from caller-assigned BASDAI 0–10 back pain, morning stiffness duration, peripheral pain/swelling, patient global, and CRP in mg/L.\n\nWhen an agent already has caller-assigned 0–10 BASDAI items (questions 2, 3, and 6), a 0–10 patient global, and CRP in mg/L and needs the published 2009 ASDAS-CRP, not ASDAS-ESR and not a BASDAI total.\n\nNot a medical device and not a biologic order.\n\nmagent does not examine the patient or assay CRP. back_pain, morning_stiffness_duration, patient_global, and peripheral_pain_swelling are caller-assigned 0–10 VAS/NRS items. morning_stiffness_duration is BASDAI question 6 on 0–10, not hours. CRP is mg/L as published. The 0–500 CRP range is a magent clamp.\n\nComputes ASDAS-CRP only. Does not compute ASDAS-ESR. Not a BASDAI total (does not use BASDAI questions 1, 4, or 5).\n\nvan der Heijde 2009 selected the CRP version as preferred and did not publish inactive/low/high/very-high cuts. magent does not apply Machado 2011 1.3/2.1/3.5 bands or a later CRP 2 mg/L floor. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"back_pain","description":"Caller-assigned total back pain on a 0-10 VAS or NRS (van der Heijde 2009; BASDAI question 2, neck/back/hip pain). Number 0-10. magent does not examine the patient.","required":true,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"morning_stiffness_duration","description":"Caller-assigned duration of morning stiffness on a 0-10 VAS or NRS (van der Heijde 2009; BASDAI question 6). Number 0-10, not hours. magent does not examine the patient.","required":true,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"patient_global","description":"Caller-assigned patient global assessment of disease activity on a 0-10 VAS or NRS (van der Heijde 2009). Number 0-10. magent does not examine the patient.","required":true,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"peripheral_pain_swelling","description":"Caller-assigned peripheral pain/swelling on a 0-10 VAS or NRS (van der Heijde 2009; BASDAI question 3, joints other than neck/back/hips). Number 0-10. magent does not examine the patient.","required":true,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"crp_mg_l","description":"Caller-assigned C-reactive protein in mg/L (van der Heijde 2009; not mg/dL). Number 0-500 is a magent clamp. The 2009 papers do not floor CRP at 2 mg/L. magent does not assay CRP.","required":true,"schema":{"type":"number"},"example":"0"}],"summary":"ASDAS-CRP","operationId":"get_api_calc_asdas_crp","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, back_pain, morning_stiffness_duration, patient_global, peripheral_pain_swelling, crp_mg_l, citation, disclaimer."},"400":{"description":"invalid_asdas_crp: ASDAS-CRP inputs must match van der Heijde 2009 back pain, stiffness, patient global, peripheral complaints, and CRP from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/asdas-crp"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ASDAS-CRP (bulk)","operationId":"post_api_calc_asdas_crp","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_asdas_crp: ASDAS-CRP inputs must match van der Heijde 2009 back pain, stiffness, patient global, peripheral complaints, and CRP from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/asdas-crp"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"back_pain":"0","crp_mg_l":"0","morning_stiffness_duration":"0","patient_global":"0","peripheral_pain_swelling":"0"},{"back_pain":"0","crp_mg_l":"0","morning_stiffness_duration":"0","patient_global":"0","peripheral_pain_swelling":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/acr-eular-pmr":{"get":{"description":"Apply the 2012 EULAR/ACR polymyalgia rheumatica classification criteria (Dasgupta Table 4): require age ≥50, bilateral shoulder aching, and abnormal CRP and/or ESR, then return the clinical score with or without optional ultrasound and whether the published cut point classifies PMR. Not a PMR diagnosis.\n\nWhen an agent already has caller-assigned Dasgupta 2012 required criteria and scoring items and needs the published PMR classification result for research, not a PMR diagnosis.\n\nNot a medical device and not a PMR diagnosis. These criteria are not meant for diagnostic purposes (Dasgupta 2012).\n\nRequired criteria (age 50–120, bilateral shoulder aching, and abnormal CRP and/or ESR) must be met or the request is HTTP 400 and is not scored.\n\nmagent does not assay CRP, ESR, RF, or ACPA and does not perform ultrasound. Ultrasound items apply only when include_ultrasound is true.\n\nClassification criteria for research, not a treatment or glucocorticoid-start decision. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years as an integer 50–120 (Dasgupta 2012 required criterion: age ≥50). magent does not date the patient.","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"bilateral_shoulder_aching","description":"Must be true. Dasgupta 2012 required criterion: bilateral shoulder aching. false is invalid and is not scored. magent does not examine joints.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"abnormal_crp_or_esr","description":"Must be true. Dasgupta 2012 required criterion: abnormal CRP and/or ESR. false is invalid and is not scored. magent does not assay CRP or ESR.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"morning_stiffness_gt_45","description":"Morning stiffness duration >45 min (Dasgupta 2012 Table 4). true scores 2; false scores 0. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"hip_pain_or_limited_rom","description":"Hip pain or limited range of motion (Dasgupta 2012 Table 4). true scores 1; false scores 0. magent does not examine joints.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"rf_or_acpa_absent","description":"Absence of RF or ACPA as assigned by the caller (Dasgupta 2012 Table 4). true scores 2; false scores 0. magent does not assay RF or ACPA.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"other_joint_pain_absent","description":"Absence of other/peripheral joint involvement as assigned by the caller (Dasgupta 2012 Table 4). true scores 1; false scores 0. magent does not examine joints.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"include_ultrasound","description":"Use the optional ultrasound algorithm (Dasgupta 2012 Table 4). false: do not require US flags; max 6; classified iff score ≥4. true: require us_shoulder_and_hip and us_both_shoulders; max 8; classified iff score ≥5. magent does not perform ultrasound.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"us_shoulder_and_hip","description":"At least one shoulder with subdeltoid bursitis and/or biceps tenosynovitis and/or glenohumeral synovitis (posterior or axillary) and at least one hip with synovitis and/or trochanteric bursitis (Dasgupta 2012). true scores 1. Required when include_ultrasound is true; ignored when false. magent does not perform ultrasound.","required":false,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"us_both_shoulders","description":"Both shoulders with subdeltoid bursitis, biceps tenosynovitis, or glenohumeral synovitis (Dasgupta 2012). true scores 1. Required when include_ultrasound is true; ignored when false. magent does not perform ultrasound.","required":false,"schema":{"type":"boolean"},"example":"false"}],"summary":"ACR/EULAR PMR","operationId":"get_api_calc_acr_eular_pmr","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, classified, algorithm, components, citation, disclaimer."},"400":{"description":"invalid_pmr_age: age must be an integer from 50 to 120 (Dasgupta 2012 EULAR/ACR PMR required criterion). Returned before settlement; you are not charged.; invalid_pmr: bilateral_shoulder_aching and abnormal_crp_or_esr must be true; include_ultrasound must be true or false (Dasgupta 2012 required criteria). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/acr-eular-pmr"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ACR/EULAR PMR (bulk)","operationId":"post_api_calc_acr_eular_pmr","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pmr_age: age must be an integer from 50 to 120 (Dasgupta 2012 EULAR/ACR PMR required criterion). Returned before settlement; you are not charged.; invalid_pmr: bilateral_shoulder_aching and abnormal_crp_or_esr must be true; include_ultrasound must be true or false (Dasgupta 2012 required criteria). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/acr-eular-pmr"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"abnormal_crp_or_esr":"true","age":"70","bilateral_shoulder_aching":"true","hip_pain_or_limited_rom":"true","include_ultrasound":"false","morning_stiffness_gt_45":"true","other_joint_pain_absent":"true","rf_or_acpa_absent":"true"},{"abnormal_crp_or_esr":"true","age":"70","bilateral_shoulder_aching":"true","hip_pain_or_limited_rom":"true","include_ultrasound":"false","morning_stiffness_gt_45":"true","other_joint_pain_absent":"true","rf_or_acpa_absent":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/qids":{"get":{"description":"Map 16 caller-assigned Rush 2003 QIDS-SR integers (0-3) to nine DSM-IV domains (sleep, appetite/weight, and psychomotor are each the published max of their items) and return the 0-27 total and IRT severity band.\n\nWhen an agent has already assigned Rush 2003 QIDS-SR 0-3 integers for all 16 items and needs the published nine-domain total, not a depression interview, QIDS-C, IDS-30, or PHQ-9.\n\nNot a medical device and not a depression diagnosis or treatment order.\n\nmagent does not administer a depression interview. Each of the 16 items is a caller-assigned integer 0-3. magent does not interpret the items.\n\nThis is Rush 2003 QIDS-SR16 only. Sleep is the maximum of four sleep items; appetite/weight is the maximum of four appetite and weight items; psychomotor is the maximum of retardation and agitation; the remaining six items add as published. magent does not score QIDS-C, IDS-30, or PHQ-9.\n\nPublished IRT conversion bands from this paper are 0-5 none, 6-10 mild, 11-15 moderate, 16-20 severe, and 21-27 very_severe. These are not PHQ-9 5/10/15/20 cutoffs. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sleep_onset","description":"Caller-assigned Rush 2003 QIDS-SR item 1 (integer 0-3): falling asleep / initial insomnia over the prior 7 days. The sleep domain is the maximum of items 1-4, not the sum. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"mid_nocturnal","description":"Caller-assigned Rush 2003 QIDS-SR item 2 (integer 0-3): sleep during the night / middle insomnia. The sleep domain is the maximum of items 1-4, not the sum. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"early_morning","description":"Caller-assigned Rush 2003 QIDS-SR item 3 (integer 0-3): waking up too early / late insomnia. The sleep domain is the maximum of items 1-4, not the sum. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"hypersomnia","description":"Caller-assigned Rush 2003 QIDS-SR item 4 (integer 0-3): sleeping too much. The sleep domain is the maximum of items 1-4, not the sum. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"sad_mood","description":"Caller-assigned Rush 2003 QIDS-SR item 5 (integer 0-3): feeling sad. Adds as published (one domain). magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"decreased_appetite","description":"Caller-assigned Rush 2003 QIDS-SR item 6 (integer 0-3): decreased appetite. The appetite/weight domain is the maximum of items 6-9, not the sum. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"increased_appetite","description":"Caller-assigned Rush 2003 QIDS-SR item 7 (integer 0-3): increased appetite. The appetite/weight domain is the maximum of items 6-9, not the sum. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"decreased_weight","description":"Caller-assigned Rush 2003 QIDS-SR item 8 (integer 0-3): decreased weight. The appetite/weight domain is the maximum of items 6-9, not the sum. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"increased_weight","description":"Caller-assigned Rush 2003 QIDS-SR item 9 (integer 0-3): increased weight. The appetite/weight domain is the maximum of items 6-9, not the sum. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"concentration","description":"Caller-assigned Rush 2003 QIDS-SR item 10 (integer 0-3): concentration / decision making. Adds as published (one domain). magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"self_view","description":"Caller-assigned Rush 2003 QIDS-SR item 11 (integer 0-3): view of myself / self-criticism. Adds as published (one domain). magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"suicidal_ideation","description":"Caller-assigned Rush 2003 QIDS-SR item 12 (integer 0-3): thoughts of death or suicide. Adds as published (one domain). magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"interest","description":"Caller-assigned Rush 2003 QIDS-SR item 13 (integer 0-3): general interest. Adds as published (one domain). magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"energy","description":"Caller-assigned Rush 2003 QIDS-SR item 14 (integer 0-3): energy / fatigability. Adds as published (one domain). magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"psychomotor_retardation","description":"Caller-assigned Rush 2003 QIDS-SR item 15 (integer 0-3): feeling slowed down. The psychomotor domain is the maximum of items 15-16, not the sum. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"psychomotor_agitation","description":"Caller-assigned Rush 2003 QIDS-SR item 16 (integer 0-3): feeling restless. The psychomotor domain is the maximum of items 15-16, not the sum. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"QIDS","operationId":"get_api_calc_qids","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, severity, sleep_points, appetite_weight_points, psychomotor_points, components, citation, disclaimer."},"400":{"description":"invalid_qids: Each QIDS-SR item must be an integer in the Rush 2003 published range; sleep, appetite, and weight domains use the published max-of-group scoring. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/qids"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"QIDS (bulk)","operationId":"post_api_calc_qids","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_qids: Each QIDS-SR item must be an integer in the Rush 2003 published range; sleep, appetite, and weight domains use the published max-of-group scoring. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/qids"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"concentration":"0","decreased_appetite":"0","decreased_weight":"0","early_morning":"0","energy":"0","hypersomnia":"0","increased_appetite":"0","increased_weight":"0","interest":"0","mid_nocturnal":"0","psychomotor_agitation":"0","psychomotor_retardation":"0","sad_mood":"0","self_view":"0","sleep_onset":"0","suicidal_ideation":"0"},{"concentration":"0","decreased_appetite":"0","decreased_weight":"0","early_morning":"0","energy":"0","hypersomnia":"0","increased_appetite":"0","increased_weight":"0","interest":"0","mid_nocturnal":"0","psychomotor_agitation":"0","psychomotor_retardation":"0","sad_mood":"0","self_view":"0","sleep_onset":"0","suicidal_ideation":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-biliary-pain":{"get":{"description":"Apply the Cotton 2016 Rome IV E1 diagnostic criteria for biliary pain and return whether the published biliary-pain box holds (rome_iv_biliary_pain) plus three supportive flags.\n\nWhen an agent already has the nine caller-assigned Cotton 2016 Rome IV E1 biliary-pain flags and needs whether the published biliary-pain box holds. magent does not examine the patient or read ultrasound, HIDA, or ERCP.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose biliary pain or biliary disease.\n\nThe caller assigns the nine flags. magent does not examine the patient or read ultrasound, HIDA, or ERCP.\n\nThis tool is Cotton 2016 Rome IV E1 biliary pain only. nausea_and_vomiting, radiation_to_back_or_right_infra_subscapular, and waking_from_sleep are supportive and not required. Not functional gallbladder disorder. Not biliary sphincter of Oddi disorder. Not pancreatic sphincter of Oddi disorder. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"epigastric_or_ruq_pain","description":"Pain located in the epigastrium and/or right upper quadrant (Cotton 2016 Rome IV E1 biliary pain). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"builds_to_steady_level_lasts_30_min_or_longer","description":"Pain builds up to a steady level and lasts 30 minutes or longer, as assigned (Cotton 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"occurring_at_different_intervals_not_daily","description":"Pain occurring at different intervals (not daily), as assigned (Cotton 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"severe_enough_to_interrupt_activities_or_ed_visit","description":"Pain severe enough to interrupt daily activities or lead to an emergency department visit, as assigned (Cotton 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"not_significantly_related_to_bowel_movements","description":"Pain not significantly (<20%) related to bowel movements, as assigned (Cotton 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"not_significantly_relieved_by_postural_change_or_acid_suppression","description":"Pain not significantly (<20%) relieved by postural change or acid suppression, as assigned (Cotton 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"nausea_and_vomiting","description":"Pain may be associated with nausea and vomiting, a supportive criterion that is not required for rome_iv_biliary_pain (Cotton 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"radiation_to_back_or_right_infra_subscapular","description":"Pain may radiate to the back and/or right infra subscapular region, a supportive criterion that is not required for rome_iv_biliary_pain (Cotton 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"waking_from_sleep","description":"Pain may wake the patient from sleep, a supportive criterion that is not required for rome_iv_biliary_pain (Cotton 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV biliary pain","operationId":"get_api_calc_rome_iv_biliary_pain","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, nausea_and_vomiting, radiation_to_back_or_right_infra_subscapular, waking_from_sleep, rome_iv_biliary_pain, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_biliary_pain: Rome IV biliary pain needs the Cotton 2016 gallbladder and sphincter-of-Oddi pain flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-biliary-pain"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV biliary pain (bulk)","operationId":"post_api_calc_rome_iv_biliary_pain","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_biliary_pain: Rome IV biliary pain needs the Cotton 2016 gallbladder and sphincter-of-Oddi pain flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-biliary-pain"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"builds_to_steady_level_lasts_30_min_or_longer":"true","epigastric_or_ruq_pain":"true","nausea_and_vomiting":"true","not_significantly_related_to_bowel_movements":"true","not_significantly_relieved_by_postural_change_or_acid_suppression":"true","occurring_at_different_intervals_not_daily":"true","radiation_to_back_or_right_infra_subscapular":"true","severe_enough_to_interrupt_activities_or_ed_visit":"true","waking_from_sleep":"true"},{"builds_to_steady_level_lasts_30_min_or_longer":"true","epigastric_or_ruq_pain":"true","nausea_and_vomiting":"true","not_significantly_related_to_bowel_movements":"true","not_significantly_relieved_by_postural_change_or_acid_suppression":"true","occurring_at_different_intervals_not_daily":"true","radiation_to_back_or_right_infra_subscapular":"true","severe_enough_to_interrupt_activities_or_ed_visit":"true","waking_from_sleep":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/irae-pneumonitis":{"get":{"description":"Apply Brahmer 2018 ASCO Table 3.1 immune-related pneumonitis grading and return grade 1-4 plus the published ICPi hold or permanently-discontinue action from caller-assigned flags.\n\nWhen an agent already has caller-assigned flags for life-threatening respiratory compromise, hospitalization, oxygen, self-care or instrumental ADL limitation, radiographic extent, and symptoms, and needs the published ASCO 2018 pneumonitis grade and ICPi action. magent does not read CT or pulse oximetry.\n\nNot a medical device.\n\nNot a diagnosis. Grade is not a pneumonitis diagnosis and not a steroid dose.\n\nmagent does not read CT or pulse oximetry. All flags are caller-assigned.\n\nASCO 2018 (Brahmer) Table 3.1 pneumonitis only. Not SITC 2021.\n\nNot CTCAE pneumonitis as a separate instrument. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"life_threatening_respiratory","description":"Life-threatening respiratory compromise with urgent intervention indicated (intubation) as assigned by the caller (Brahmer 2018 Table 3.1 grade 4). true or false. When true, grade is 4 regardless of other flags. magent does not examine the patient or set a ventilator.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hospitalization_required","description":"Hospitalization required as assigned by the caller (Brahmer 2018 Table 3.1 grade 3). true or false. magent does not decide admission.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"oxygen_indicated","description":"Oxygen indicated as assigned by the caller (Brahmer 2018 Table 3.1 grade 3). true or false. magent does not read pulse oximetry or start oxygen.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"limiting_self_care","description":"Limiting self-care ADL as assigned by the caller (Brahmer 2018 Table 3.1 grade 3). true or false. magent does not assess ADL.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"all_lobes_or_gt_50_pct","description":"Involves all lung lobes or >50% of lung parenchyma as assigned by the caller (Brahmer 2018 Table 3.1 grade 3). true or false. magent does not read CT.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"symptomatic","description":"Symptomatic as assigned by the caller (Brahmer 2018 Table 3.1 grade 2). true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"more_than_one_lobe","description":"Involves more than one lobe as assigned by the caller (Brahmer 2018 Table 3.1 grade 2). true or false. magent does not read CT.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"extent_25_to_50_pct","description":"Involves 25%–50% of lung parenchyma as assigned by the caller (Brahmer 2018 Table 3.1 grade 2). true or false. magent does not read CT.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"limiting_instrumental_adl","description":"Limiting instrumental ADL as assigned by the caller (Brahmer 2018 Table 3.1 grade 2). true or false. magent does not assess ADL.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"irAE pneumonitis","operationId":"get_api_calc_irae_pneumonitis","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, grade, icpi_action, life_threatening_respiratory, hospitalization_required, oxygen_indicated, limiting_self_care, all_lobes_or_gt_50_pct, symptomatic, more_than_one_lobe, extent_25_to_50_pct, limiting_instrumental_adl, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/irae-pneumonitis"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"irAE pneumonitis (bulk)","operationId":"post_api_calc_irae_pneumonitis","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/irae-pneumonitis"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"all_lobes_or_gt_50_pct":"false","extent_25_to_50_pct":"false","hospitalization_required":"false","life_threatening_respiratory":"false","limiting_instrumental_adl":"false","limiting_self_care":"false","more_than_one_lobe":"false","oxygen_indicated":"false","symptomatic":"false"},{"all_lobes_or_gt_50_pct":"false","extent_25_to_50_pct":"false","hospitalization_required":"false","life_threatening_respiratory":"false","limiting_instrumental_adl":"false","limiting_self_care":"false","more_than_one_lobe":"false","oxygen_indicated":"false","symptomatic":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/hits":{"get":{"description":"Sum four caller-assigned Sherin 1998 HITS integers (hurt, insult, threaten, scream; each 1-5) and return the published total (4-20) and ≥10 screen.\n\nWhen an agent has already assigned Sherin 1998 1-5 integers for hurt, insult, threaten, and scream and needs the published total and ≥10 screen, not a diagnosis of intimate partner violence and not a patient interview.\n\nNot a medical device and not a diagnosis of intimate partner violence.\n\nmagent does not interview the patient.\n\nhurt, insult, threaten, and scream are caller-assigned integers 1-5 (never=1 to frequently=5). magent does not interpret the items.\n\nThis is Sherin 1998 HITS only (screen-positive at score ≥10). magent does not apply later variants or other IPV instruments. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"hurt","description":"Caller-assigned Sherin 1998 HITS Hurt item (integer 1-5; never=1 to frequently=5): how often the partner physically hurt the patient. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"insult","description":"Caller-assigned Sherin 1998 HITS Insult item (integer 1-5; never=1 to frequently=5): how often the partner insulted or talked down to the patient. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"threaten","description":"Caller-assigned Sherin 1998 HITS Threaten item (integer 1-5; never=1 to frequently=5): how often the partner threatened the patient with harm. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"scream","description":"Caller-assigned Sherin 1998 HITS Scream item (integer 1-5; never=1 to frequently=5): how often the partner screamed or cursed at the patient. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"1"}],"summary":"HITS","operationId":"get_api_calc_hits","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, screen_positive, components, citation, disclaimer."},"400":{"description":"invalid_hits: hurt, insult, threaten, and scream must each be an integer from 1 to 5 (Sherin 1998 never=1 to frequently=5). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hits"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HITS (bulk)","operationId":"post_api_calc_hits","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_hits: hurt, insult, threaten, and scream must each be an integer from 1 to 5 (Sherin 1998 never=1 to frequently=5). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hits"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"hurt":"1","insult":"1","scream":"1","threaten":"1"},{"hurt":"1","insult":"1","scream":"1","threaten":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/leibovich-2018":{"get":{"description":"Sum the Leibovich 2018 progression-free score from caller-assigned histology, 2010 T and N, tumor size, nuclear grade, and necrosis, and return the published risk grouping for that histology.\n\nWhen an agent already has surgical histology (clear cell, papillary, or chromophobe), 2010 pathologic T and N, size in cm, nuclear grade, and necrosis and needs the 2018 PFS total and low/intermediate/high group. magent does not stage the tumor or read slides, and must not invent an RCC diagnosis, SSIGN, or the 2003 Leibovich Cancer table.\n\nNot a medical device. magent does not stage the tumor or read pathology.\n\nLeibovich 2018 histology-specific models only. Not Frank 2002 SSIGN (1997 TNM, size 5 cm, pT4 0). Not the 2003 Leibovich Cancer table (2002 TNM, T1b 2, T2 3, T3-4 4, necrosis 1, N1/N2).\n\nccRCC uses 2010 TNM tokens and additive PFS points. The 2018 paper also published a nine-factor ccRCC PFS conversion (symptoms, sarcomatoid, fat, thrombus, extension) and a separate CSS score; those extra factors are not inputs here.\n\nPapillary groups use grade plus T as a fat/thrombus proxy. Chromophobe groups use T as a fat proxy plus N; sarcomatoid is not an input. Chromophobe has no CSS model in the paper.\n\nSize uses unrounded cm; 10.0 cm scores 1 on ccRCC. Magent clamp 0.1-30 cm is not a published range.\n\nPublished groups are cohort strata, not an individualized prediction or a treatment recommendation. Not an RCC diagnosis. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"histology","description":"Surgical histology as assigned by the caller (Leibovich 2018). clear_cell, papillary, or chromophobe. Not collecting-duct or unclassified. magent does not read slides.","required":true,"schema":{"type":"string","enum":["clear_cell","papillary","chromophobe"]},"example":"clear_cell"},{"in":"query","name":"t_stage","description":"2010 pathologic T as assigned by the caller (Leibovich 2018). t1a, t1b, t2a, t2b, t3a, t3b, t3c, or t4. Not 1997/2002 T without a/b substages. magent does not stage the tumor.","required":true,"schema":{"type":"string","enum":["t1a","t1b","t2a","t2b","t3a","t3b","t3c","t4"]},"example":"t1a"},{"in":"query","name":"n_stage","description":"2010 pathologic N as assigned by the caller (Leibovich 2018). nx or n0 scores 0 on ccRCC; n1 scores 2. Not n2 (2002 N). magent does not stage nodes.","required":true,"schema":{"type":"string","enum":["nx","n0","n1"]},"example":"n0"},{"in":"query","name":"tumor_size_cm","description":"Maximum tumor size in cm as assigned by the caller (Leibovich 2018). Unrounded; 10.0 cm or greater scores 1 on ccRCC. Magent clamp 0.1-30, not a published range. magent does not measure the tumor.","required":true,"schema":{"type":"number"},"example":"3"},{"in":"query","name":"nuclear_grade","description":"Nuclear grade 1-4 as assigned by the caller (Leibovich 2018). On ccRCC, 1-2 score 0; 3 scores 1; 4 scores 3. Integer 1-4 only; reject 0, 5, 1.5, and roman I. magent does not read slides.","required":true,"schema":{"type":"integer"},"example":"2"},{"in":"query","name":"necrosis","description":"Histologic tumor necrosis as assigned by the caller (Leibovich 2018). true scores 2 on ccRCC. magent does not read slides.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Leibovich 2018 RCC models","operationId":"get_api_calc_leibovich_2018","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, histology, t_stage, n_stage, tumor_size_cm, nuclear_grade, necrosis, score, max_score, risk, components, citation, disclaimer."},"400":{"description":"invalid_rcc_histology: histology must be clear_cell, papillary, or chromophobe (Leibovich 2018). Returned before settlement; you are not charged.; invalid_t_stage: t_stage must be a pathologic T token from the cited paper (Leibovich 2018). Returned before settlement; you are not charged.; invalid_n_stage: n_stage must be nx, n0, or n1 (Leibovich 2018). Returned before settlement; you are not charged.; invalid_nuclear_grade: nuclear_grade must be an integer from 1 to 4 (Leibovich 2018). Returned before settlement; you are not charged.; invalid_tumor_size_cm: tumor_size_cm must be a number from 0.1 to 30 (Leibovich 2018 tumor size cm). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/leibovich-2018"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Leibovich 2018 RCC models (bulk)","operationId":"post_api_calc_leibovich_2018","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rcc_histology: histology must be clear_cell, papillary, or chromophobe (Leibovich 2018). Returned before settlement; you are not charged.; invalid_t_stage: t_stage must be a pathologic T token from the cited paper (Leibovich 2018). Returned before settlement; you are not charged.; invalid_n_stage: n_stage must be nx, n0, or n1 (Leibovich 2018). Returned before settlement; you are not charged.; invalid_nuclear_grade: nuclear_grade must be an integer from 1 to 4 (Leibovich 2018). Returned before settlement; you are not charged.; invalid_tumor_size_cm: tumor_size_cm must be a number from 0.1 to 30 (Leibovich 2018 tumor size cm). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/leibovich-2018"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"histology":"clear_cell","n_stage":"n0","necrosis":"false","nuclear_grade":"2","t_stage":"t1a","tumor_size_cm":"3"},{"histology":"clear_cell","n_stage":"n0","necrosis":"false","nuclear_grade":"2","t_stage":"t1a","tumor_size_cm":"3"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/choles-score":{"get":{"description":"Sum Bharamgoudar 2018 Table 3 points from caller-assigned age, sex, indication, BMI, CBD diameter, gallbladder wall, pre-operative CT, planned intraoperative cholangiogram, previous surgical admissions, and ASA class, and return the numeric total (max 20). Does not classify operative duration or risk bands.\n\nWhen an agent has already assigned Bharamgoudar 2018 Table 3 inputs before elective laparoscopic cholecystectomy and needs the published 0-20 point total, not an operative booking, Nassar difficulty grade, or Tokyo cholecystitis/cholangitis grade.\n\nNot a medical device. This is a published arithmetic total, not an operative booking, cancellation, or theatre-time allocation.\n\nmagent does not image the gallbladder, measure CBD diameter, or assign ASA class; the caller supplies Table 3 tokens and numbers.\n\nNot Nassar operative difficulty. This tool does not grade difficulty or conversion risk.\n\nNot Tokyo Guidelines cholecystitis or cholangitis severity. Related Tokyo tools are separate.\n\nBharamgoudar 2018 reports cohort percentages lasting >90 min at score 0-3 vs >8; magent returns score and max_score only and does not classify the patient as low or high duration. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120). Bharamgoudar 2018 Table 3: <40 scores 0; ≥40 scores 1.5. Age 39 scores 0; 40 scores 1.5.","required":true,"schema":{"type":"integer"},"example":"35"},{"in":"query","name":"sex","description":"female or male. Female scores 0; male scores 1 (Bharamgoudar 2018 Table 3).","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"indication","description":"Caller-assigned indication for elective laparoscopic cholecystectomy (Bharamgoudar 2018 Table 3). pancreatitis scores 0. colic_dyskinesia_polyp (biliary colic, biliary dyskinesia, or gallbladder polyp) scores 0.5. cbd_stone scores 2. acalculous_cholecystitis scores 2.5. magent does not diagnose the indication.","required":true,"schema":{"type":"string","enum":["pancreatitis","colic_dyskinesia_polyp","cbd_stone","acalculous_cholecystitis"]},"example":"pancreatitis"},{"in":"query","name":"bmi_kg_m2","description":"Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI from height and weight. Bharamgoudar 2018 Table 3: <25 scores 0; 25-35 inclusive scores 1; >35 scores 2. 25.0 and 35.0 score 1; 36 scores 2.","required":true,"schema":{"type":"number"},"example":"24"},{"in":"query","name":"cbd_diameter","description":"Caller-assigned common bile duct diameter (Bharamgoudar 2018 Table 3). normal scores 0; dilated scores 2. magent does not image the gallbladder or measure the CBD.","required":true,"schema":{"type":"string","enum":["normal","dilated"]},"example":"normal"},{"in":"query","name":"gallbladder_wall","description":"Caller-assigned gallbladder wall (Bharamgoudar 2018 Table 3). normal scores 0; thick scores 1.5. magent does not image the gallbladder.","required":true,"schema":{"type":"string","enum":["normal","thick"]},"example":"normal"},{"in":"query","name":"pre_operative_ct","description":"Pre-operative CT as assigned by the caller (Bharamgoudar 2018 Table 3). true scores 1.5. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"planned_intraop_cholangiogram","description":"Planned intraoperative cholangiogram as assigned by the caller (Bharamgoudar 2018 Table 3). true scores 3. magent does not plan the operation.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"previous_surgical_admissions","description":"Previous surgical admissions, integer 0-20 (Bharamgoudar 2018 Table 3). 0 scores 0; 1-2 scores 1; >2 scores 2.5.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"asa_class","description":"ASA physical status class, integer 1-5 (Bharamgoudar 2018 Table 3; Gupta 2011 1-5 range). 1 scores 0; 2 scores 1; 3-5 scores 2.5. magent does not assign ASA class.","required":true,"schema":{"type":"integer"},"example":"1"}],"summary":"CholeS score","operationId":"get_api_calc_choles_score","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, age_years, sex, indication, bmi_kg_m2, cbd_diameter, gallbladder_wall, pre_operative_ct, planned_intraop_cholangiogram, previous_surgical_admissions, asa_class, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_asa_class: asa_class must be an integer from 1 to 5 (Gupta 2011 ASA physical status). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_choles: indication must be pancreatitis, colic_dyskinesia_polyp, cbd_stone, or acalculous_cholecystitis; cbd_diameter normal or dilated; gallbladder_wall normal or thick; previous_surgical_admissions an integer 0-20 (Bharamgoudar 2018 CholeS Table 3). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/choles-score"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CholeS score (bulk)","operationId":"post_api_calc_choles_score","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_asa_class: asa_class must be an integer from 1 to 5 (Gupta 2011 ASA physical status). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_choles: indication must be pancreatitis, colic_dyskinesia_polyp, cbd_stone, or acalculous_cholecystitis; cbd_diameter normal or dilated; gallbladder_wall normal or thick; previous_surgical_admissions an integer 0-20 (Bharamgoudar 2018 CholeS Table 3). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/choles-score"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"35","asa_class":"1","bmi_kg_m2":"24","cbd_diameter":"normal","gallbladder_wall":"normal","indication":"pancreatitis","planned_intraop_cholangiogram":"false","pre_operative_ct":"false","previous_surgical_admissions":"0","sex":"female"},{"age":"35","asa_class":"1","bmi_kg_m2":"24","cbd_diameter":"normal","gallbladder_wall":"normal","indication":"pancreatitis","planned_intraop_cholangiogram":"false","pre_operative_ct":"false","previous_surgical_admissions":"0","sex":"female"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/thakar":{"get":{"description":"Sum the Thakar 2005 preoperative points for dialysis-requiring acute renal failure after open-heart surgery and return the integer score (max 17) and published category (0–2 / 3–5 / 6–8 / 9–13).\n\nWhen an agent has caller-assigned sex, surgery type, preoperative creatinine, and the published boolean risk factors and needs the Thakar 2005 point total. Not a dialysis order. magent does not examine the patient.\n\nNot a medical device and not a dialysis order.\n\nNot AKIN or RIFLE staging of a current creatinine change. This is a preoperative score for dialysis-requiring ARF after open-heart surgery.\n\nmagent does not examine the patient. Sex, surgery type, CHF, LVEF <35%, preoperative IABP, COPD requiring medical therapy, insulin-requiring diabetes, previous cardiac surgery, and emergency surgery are caller-assigned.\n\nCreatinine bands follow the Thakar 2005 scoring table: <1.2 mg/dL scores 0; 1.2 to <2.1 scores 2; >=2.1 scores 5. 2.0 mg/dL scores 2. magent does not assay creatinine.\n\nPublished categories are 0–2, 3–5, 6–8, and 9–13 (formed arbitrarily in the paper). Scores >=9 map to 9–13; the paper observed no patients above 13. Theoretical max is 17. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sex","description":"female or male (Thakar 2005). Female scores 1. Male scores 0. Assigned by the caller.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"surgery_type","description":"cabg (CABG only, reference, 0), valve (valve only, +1), cabg_valve (CABG + valve, +2), or other (other cardiac surgeries such as ventricular aneurysm repair or pericardiectomy, +2). Thakar 2005. Assigned by the caller.","required":true,"schema":{"type":"string","enum":["cabg","valve","cabg_valve","other"]},"example":"cabg"},{"in":"query","name":"creatinine_mg_dl","description":"Preoperative serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l, not both. Thakar 2005 scoring table: <1.2 scores 0; 1.2 to <2.1 scores 2; >=2.1 scores 5. 2.0 mg/dL scores 2. magent does not assay creatinine.","required":false,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"creatinine_umol_l","description":"Preoperative serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42.","required":false,"schema":{"type":"number"},"example":"88.42"},{"in":"query","name":"congestive_heart_failure","description":"Congestive heart failure as assigned by the caller (Thakar 2005). true scores 1. true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"lvef_lt_35","description":"Left-ventricular ejection fraction <35% as assigned by the caller (Thakar 2005). true scores 1. Flag only; do not send an LVEF number. magent does not measure ejection fraction.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"preoperative_iabp","description":"Preoperative intra-aortic balloon pump as assigned by the caller (Thakar 2005). true scores 2. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"copd","description":"COPD requiring medical therapy as assigned by the caller (Thakar 2005). true scores 1. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"insulin_diabetes","description":"Insulin-requiring diabetes as assigned by the caller (Thakar 2005). true scores 1. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"previous_cardiac_surgery","description":"Previous cardiac surgery as assigned by the caller (Thakar 2005). true scores 1. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"emergency_surgery","description":"Emergency surgery as assigned by the caller (Thakar 2005). true scores 2. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Thakar ARF score","operationId":"get_api_calc_thakar","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, thakar_category, sex, surgery_type, creatinine_mg_dl, components, citation, disclaimer."},"400":{"description":"invalid_thakar_surgery: surgery_type must be cabg, valve, cabg_valve, or other (Thakar 2005; CABG-only is the reference). Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/thakar"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Thakar ARF score (bulk)","operationId":"post_api_calc_thakar","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_thakar_surgery: surgery_type must be cabg, valve, cabg_valve, or other (Thakar 2005; CABG-only is the reference). Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/thakar"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"congestive_heart_failure":"false","copd":"false","creatinine_mg_dl":"1.0","emergency_surgery":"false","insulin_diabetes":"false","lvef_lt_35":"false","preoperative_iabp":"false","previous_cardiac_surgery":"false","sex":"male","surgery_type":"cabg"},{"congestive_heart_failure":"false","copd":"false","creatinine_mg_dl":"1.0","emergency_surgery":"false","insulin_diabetes":"false","lvef_lt_35":"false","preoperative_iabp":"false","previous_cardiac_surgery":"false","sex":"male","surgery_type":"cabg"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/news2":{"get":{"description":"Compute the RCP 2017 National Early Warning Score 2 from respiratory rate, SpO2 (Scale 1 or Scale 2), supplemental oxygen, temperature, systolic BP, heart rate, and caller-assigned ACVPU.\n\nWhen an agent needs the published RCP NEWS2 2017 Chart 1 total and Chart 2 clinical risk, including Scale 2 saturations and new confusion, and must not substitute NEWS 2012 or treat the score as an ICU-admission order.\n\nNot a medical device and not an ICU-admission, HDU, or monitoring order. magent does not measure vitals or examine the patient.\n\nThis is RCP NEWS2 2017 Chart 1 only. It is not NEWS 2012. Scale 2 applies only when the caller assigns it for a prescribed 88-92% SpO2 target in confirmed hypercapnic respiratory failure.\n\nACVPU is caller-assigned (alert, confusion, voice, pain, or unresponsive). Confusion, voice, pain, and unresponsive each score 3. magent does not compute GCS here.\n\nTemperature is in °C as published. magent does not convert Fahrenheit.\n\nclinical_risk follows RCP 2017 Chart 2 (low / low-medium / medium / high). A single parameter scoring 3 is a RED score and is low-medium unless the aggregate is ≥5 (medium) or ≥7 (high). High wins. It is not a sepsis band and not an ICU-admission order. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"systolic_mm_hg","description":"Systolic blood pressure in mm Hg (integer 0-300). RCP NEWS2 2017 Chart 1: ≤90 → 3, 91-100 → 2, 101-110 → 1, 111-219 → 0, ≥220 → 3.","required":true,"schema":{"type":"integer"},"example":"120"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats/min (integer 30-220). RCP NEWS2 2017 Chart 1: ≤40 → 3, 41-50 → 1, 51-90 → 0, 91-110 → 1, 111-130 → 2, ≥131 → 3.","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"respiratory_rate","description":"Respiratory rate in breaths/min (integer 0-80). RCP NEWS2 2017 Chart 1: ≤8 → 3, 9-11 → 1, 12-20 → 0, 21-24 → 2, ≥25 → 3.","required":true,"schema":{"type":"integer"},"example":"16"},{"in":"query","name":"temperature_c","description":"Temperature in °C (30.0-45.0). RCP NEWS2 2017 Chart 1: ≤35.0 → 3, 35.1-36.0 → 1, 36.1-38.0 → 0, 38.1-39.0 → 1, ≥39.1 → 2. magent does not convert Fahrenheit.","required":true,"schema":{"type":"number"},"example":"37.0"},{"in":"query","name":"spo2_percent","description":"Oxygen saturation percent (50-100). Scale 1: ≤91 → 3, 92-93 → 2, 94-95 → 1, ≥96 → 0. Scale 2: ≤83 → 3, 84-85 → 2, 86-87 → 1, 88-92 → 0; ≥93 on air → 0; 93-94 on oxygen → 1, 95-96 on oxygen → 2, ≥97 on oxygen → 3.","required":true,"schema":{"type":"number"},"example":"98"},{"in":"query","name":"spo2_scale","description":"Caller-assigned SpO2 scale (1 or 2). Scale 1 is the usual target. Scale 2 is only for a prescribed 88-92% target in confirmed hypercapnic respiratory failure. magent does not choose the scale.","required":true,"schema":{"type":"integer","enum":[1,2]},"example":"1"},{"in":"query","name":"supplemental_oxygen","description":"Any supplemental oxygen as assigned by the caller (true or false). RCP NEWS2 2017 Chart 1: true → 2, false → 0. On Scale 2 this also selects air vs oxygen SpO2 bands at ≥93%.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"acvpu","description":"Caller-assigned ACVPU (alert, confusion, voice, pain, or unresponsive). RCP NEWS2 2017 Chart 1: alert → 0; confusion, voice, pain, or unresponsive → 3 each. magent does not compute GCS here.","required":true,"schema":{"type":"string","enum":["alert","confusion","voice","pain","unresponsive"]},"example":"alert"}],"summary":"NEWS2","operationId":"get_api_calc_news2","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, clinical_risk, red_score, systolic_mm_hg, heart_rate_bpm, respiratory_rate, temperature_c, spo2_percent, spo2_scale, supplemental_oxygen, acvpu, components, citation, disclaimer."},"400":{"description":"invalid_rts_systolic: systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_rts_respiratory_rate: respiratory_rate must be an integer from 0 to 80. Returned before settlement; you are not charged.; invalid_temperature: temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_news2_scale: spo2_scale must be 1 (usual target) or 2 (prescribed 88-92% target in hypercapnic respiratory failure) (RCP NEWS2 2017). Returned before settlement; you are not charged.; invalid_news2_acvpu: acvpu must be alert, confusion, voice, pain, or unresponsive (RCP NEWS2 2017 ACVPU). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/news2"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"NEWS2 (bulk)","operationId":"post_api_calc_news2","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rts_systolic: systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_rts_respiratory_rate: respiratory_rate must be an integer from 0 to 80. Returned before settlement; you are not charged.; invalid_temperature: temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_news2_scale: spo2_scale must be 1 (usual target) or 2 (prescribed 88-92% target in hypercapnic respiratory failure) (RCP NEWS2 2017). Returned before settlement; you are not charged.; invalid_news2_acvpu: acvpu must be alert, confusion, voice, pain, or unresponsive (RCP NEWS2 2017 ACVPU). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/news2"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"acvpu":"alert","heart_rate_bpm":"70","respiratory_rate":"16","spo2_percent":"98","spo2_scale":"1","supplemental_oxygen":"false","systolic_mm_hg":"120","temperature_c":"37.0"},{"acvpu":"alert","heart_rate_bpm":"70","respiratory_rate":"16","spo2_percent":"98","spo2_scale":"1","supplemental_oxygen":"false","systolic_mm_hg":"120","temperature_c":"37.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/bclc":{"get":{"description":"Apply Reig 2022 BCLC staging and return bclc_stage (0, A, B, C, or D) with the published expected median survival. Stage only. Not a treatment recommendation.\n\nWhen an agent already has cancer-related ECOG PS, caller-assigned preserved liver function, transplant option, vascular invasion, extrahepatic disease, tumor count, and largest diameter as in Reig 2022, and needs the published BCLC stage. magent does not assign ECOG, compute Child-Pugh, or interpret imaging.\n\nNot a medical device.\n\nNot a treatment recommendation. This tool returns Reig 2022 BCLC stage and expected median survival only. 2022 treatment-stage-migration is out of scope.\n\nmagent does not read imaging or compute Child-Pugh or ALBI. preserved_liver_function, transplant_option, ECOG, vascular_invasion, extrahepatic, tumor_count, and largest_cm are caller-assigned.\n\nNot UCSF or Milan listing (see related milan). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ecog","description":"Cancer-related ECOG performance status 0-4 as assigned by the caller (Reig 2022: do not count baseline comorbidity PS). Integer 0-4. magent does not assign ECOG.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"preserved_liver_function","description":"Preserved liver function as assigned by the caller (Reig 2022 abandoned Child-Pugh class for this assignment). true or false. magent does not compute Child-Pugh or ALBI.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"transplant_option","description":"Option of liver transplantation when liver function is not preserved, as assigned by the caller (Reig 2022). true or false. magent does not list for transplant.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"vascular_invasion","description":"Vascular (vessel) invasion as assigned by the caller. true or false. magent does not interpret imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"extrahepatic","description":"Extrahepatic spread as assigned by the caller. true or false. magent does not interpret imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"tumor_count","description":"Number of HCC nodules (integer 1-20) as assigned by the caller. Stage 0 is a single tumor <=2 cm; stage A allows a solitary tumor of any size or 2-3 nodules none >3 cm; four or more nodules are stage B when otherwise 0/A/B-eligible. magent does not interpret imaging.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"largest_cm","description":"Largest tumor diameter in centimetres (0.1-30). Stage 0 meets at 2.0 cm and is A at 2.1 when solitary. Two or three nodules meet A at 3.0 cm and are B at 3.1. magent does not interpret imaging.","required":true,"schema":{"type":"number"},"example":"1.5"}],"summary":"BCLC","operationId":"get_api_calc_bclc","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, bclc_stage, expected_median_survival, ecog, preserved_liver_function, transplant_option, vascular_invasion, extrahepatic, tumor_count, largest_cm, criteria, citation, disclaimer."},"400":{"description":"invalid_ecog_ps: ecog must be an integer from 0 to 4 (Oken 1982). Grade 5 (dead) is not scored. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_tumor_count: tumor_count must be an integer from 1 to 20 (Mazzaferro 1996). Returned before settlement; you are not charged.; invalid_largest_cm: largest_cm must be a number from 0.1 to 30 (Mazzaferro 1996). Returned before settlement; you are not charged.; invalid_bclc_profile: ecog, preserved_liver_function, transplant_option, vascular_invasion, extrahepatic, and tumor burden do not match a Reig 2022 BCLC stage (0, A, B, C, or D). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bclc"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"BCLC (bulk)","operationId":"post_api_calc_bclc","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ecog_ps: ecog must be an integer from 0 to 4 (Oken 1982). Grade 5 (dead) is not scored. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_tumor_count: tumor_count must be an integer from 1 to 20 (Mazzaferro 1996). Returned before settlement; you are not charged.; invalid_largest_cm: largest_cm must be a number from 0.1 to 30 (Mazzaferro 1996). Returned before settlement; you are not charged.; invalid_bclc_profile: ecog, preserved_liver_function, transplant_option, vascular_invasion, extrahepatic, and tumor burden do not match a Reig 2022 BCLC stage (0, A, B, C, or D). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bclc"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ecog":"0","extrahepatic":"false","largest_cm":"1.5","preserved_liver_function":"true","transplant_option":"false","tumor_count":"1","vascular_invasion":"false"},{"ecog":"0","extrahepatic":"false","largest_cm":"1.5","preserved_liver_function":"true","transplant_option":"false","tumor_count":"1","vascular_invasion":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/reynolds":{"get":{"description":"Compute the Ridker JAMA 2007 Reynolds Risk Score 10-year CVD percent for women using clinically simplified Model B (age, SBP, hsCRP, total cholesterol, HDL-C, HbA1c if diabetic, current smoking, and parental MI before age 60).\n\nWhen an agent already has those Model B predictors for a woman aged 45-84 and needs that paper's 10-year CVD percent. Not a diagnosis, statin order, or 2013 pooled-cohort equation.\n\nNot a medical device. Not a diagnosis of cardiovascular disease. Not a statin order or treatment recommendation.\n\nRidker JAMA 2007 Model B for women aged 45 years or older only (magent accepts 45-84). Not the Reynolds algorithm for men (Ridker Circulation 2008).\n\nNot ATP-III. Not the 2013 ACC/AHA pooled-cohort equations. No race parameter.\n\nCaller assigns labs, blood pressure, diabetes, smoking, and parental MI before age 60. magent does not assay lipids, hsCRP, or HbA1c and does not measure blood pressure. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 45-84). Ridker JAMA 2007 Model B was derived in women 45 years or older. magent accepts 45-84 only. Not men.","required":true,"schema":{"type":"integer"},"example":55},{"in":"query","name":"sbp_mm_hg","description":"Systolic blood pressure in mm Hg (50-250). Enters as ln(SBP). magent does not measure blood pressure.","required":true,"schema":{"type":"number"},"example":125},{"in":"query","name":"hscrp_mg_l","description":"High-sensitivity C-reactive protein in mg/L (0.1-50). Enters as ln(hsCRP). magent does not assay hsCRP.","required":true,"schema":{"type":"number"},"example":2},{"in":"query","name":"total_cholesterol_mg_dl","description":"Total cholesterol in mg/dL (50-800). Enters as ln(total cholesterol). magent does not assay lipids.","required":true,"schema":{"type":"number"},"example":200},{"in":"query","name":"hdl_mg_dl","description":"HDL cholesterol in mg/dL (5-150). Enters as ln(HDL-C). magent does not assay lipids.","required":true,"schema":{"type":"number"},"example":50},{"in":"query","name":"diabetes","description":"Diabetes as assigned by the caller. If true, a1c_percent (4-15) is required and adds 0.134*HbA1c(%). If false, omit a1c; the HbA1c term is not added. magent does not diagnose diabetes.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"a1c_percent","description":"HbA1c in percent (4-15). Required when diabetes=true. Ignored when diabetes=false. magent does not assay HbA1c.","required":false,"schema":{"type":"number"},"example":7.5},{"in":"query","name":"smoker","description":"Current cigarette smoking as assigned by the caller. true adds 0.818. magent does not take a smoking history.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"family_mi_before_60","description":"Parental myocardial infarction before age 60 as assigned by the caller. true adds 0.438. magent does not take a family history.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"Reynolds Risk Score","operationId":"get_api_calc_reynolds","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age, sbp_mm_hg, hscrp_mg_l, total_cholesterol_mg_dl, hdl_mg_dl, diabetes, a1c_percent, smoker, family_mi_before_60, b, risk_percent, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_crp: crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.; invalid_medped_lipid: provide exactly one of total_cholesterol_mg_dl (50-800) or total_cholesterol_mmol_l (1.3-20). Returned before settlement; you are not charged.; invalid_hdl: hdl_mg_dl must be a number from 5 to 150, or hdl_mmol_l from 0.1 to 3.9, not both. Returned before settlement; you are not charged.; invalid_a1c: a1c_percent must be a number from 4 to 15 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/reynolds"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Reynolds Risk Score (bulk)","operationId":"post_api_calc_reynolds","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_crp: crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.; invalid_medped_lipid: provide exactly one of total_cholesterol_mg_dl (50-800) or total_cholesterol_mmol_l (1.3-20). Returned before settlement; you are not charged.; invalid_hdl: hdl_mg_dl must be a number from 5 to 150, or hdl_mmol_l from 0.1 to 3.9, not both. Returned before settlement; you are not charged.; invalid_a1c: a1c_percent must be a number from 4 to 15 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/reynolds"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"55","diabetes":"false","family_mi_before_60":"false","hdl_mg_dl":"50","hscrp_mg_l":"2","sbp_mm_hg":"125","smoker":"false","total_cholesterol_mg_dl":"200"},{"age":"55","diabetes":"false","family_mi_before_60":"false","hdl_mg_dl":"50","hscrp_mg_l":"2","sbp_mm_hg":"125","smoker":"false","total_cholesterol_mg_dl":"200"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/chip":{"get":{"description":"Apply the Smits 2007 simple CHIP rule and return whether CT is indicated from caller-assigned major and minor findings plus GCS and age after minor head injury.\n\nWhen an agent has caller-assigned findings after blunt head trauma in a patient 16 or older with GCS 13-15 as published and needs the 2007 simple CHIP rule, not Canadian CT Head, NEXUS Head CT, PECARN, New Orleans, or the 2022 CHIP update.\n\nNot a medical device. Not a diagnosis of intracranial injury. magent does not examine the patient.\n\nmagent does not interpret imaging or order a CT. This tool returns whether CT is indicated by the published simple CHIP rule only.\n\nSmits 2007 simple rule only (CT if ≥1 major or ≥2 minor). Not the detailed CHIP logistic model and not the 2022 CHIP update (different coefficients; drops anticoagulants; adds antiplatelet).\n\nNot the Canadian CT Head Rule, not NEXUS Head CT, not New Orleans, and not PECARN. Published for adults ≥16 years with GCS 13-15.\n\nThe caller assigns every clinical flag. GCS is an integer 13-15. Age is an integer ≥16. magent does not assign GCS, classify mechanism, or read a coagulation assay.\n\nPTA ≥4 h is major; PTA of 2 to <4 h is minor. GCS deterioration ≥2 points at 1 hour is major; 1 point is minor. Age ≥60 is major; age 40-59 is the 40-60 y minor band. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 16-120). Age ≥60 is a major criterion. Age 40-59 is the 40-60 y minor band; 39 is neither. The published rule is for patients ≥16 years.","required":true,"schema":{"type":"integer"},"example":"30"},{"in":"query","name":"gcs","description":"Glasgow Coma Scale integer 13-15 as published. GCS 13 or 14 (GCS <15) is a major criterion; 15 is not. magent does not assign GCS from an exam.","required":true,"schema":{"type":"integer"},"example":"15"},{"in":"query","name":"pedestrian_or_cyclist_vs_vehicle","description":"Pedestrian or cyclist versus vehicle (Smits 2007 major). true or false as assigned by the caller. magent does not classify mechanism.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ejected_from_vehicle","description":"Ejected from vehicle (Smits 2007 major). true or false as assigned by the caller. magent does not classify mechanism.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"vomiting","description":"Vomiting (Smits 2007 major). true or false as assigned by the caller. magent does not take a vomit count.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pta_ge_4h","description":"Posttraumatic amnesia ≥4 hours (Smits 2007 major). true or false as assigned by the caller. Mutually exclusive with pta_2_to_lt_4h. magent does not measure amnesia duration.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"clinical_signs_skull_fracture","description":"Clinical signs of skull fracture (Smits 2007 major): any injury that suggests a skull fracture, such as palpable discontinuity of the skull, leakage of cerebrospinal fluid, raccoon-eye bruising, and bleeding from the ear, as assigned by the caller. true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"gcs_deterioration_ge_2","description":"GCS deterioration ≥2 points 1 hour after presentation (Smits 2007 major). true or false as assigned by the caller. Mutually exclusive with gcs_deterioration_1. magent does not assign GCS change.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"anticoagulant_therapy","description":"Use of anticoagulant therapy (Smits 2007 major). true or false as assigned by the caller. This is the 2007 simple rule, not the 2022 CHIP update. magent does not interpret a coagulation assay.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"posttraumatic_seizure","description":"Posttraumatic seizure (Smits 2007 major). true or false as assigned by the caller. magent does not witness a seizure.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"fall_from_any_elevation","description":"Fall from any elevation (Smits 2007 minor). true or false as assigned by the caller. magent does not classify mechanism.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"persistent_anterograde_amnesia","description":"Persistent anterograde amnesia, any deficit of short-term memory (Smits 2007 minor). true or false as assigned by the caller. magent does not test memory.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pta_2_to_lt_4h","description":"Posttraumatic amnesia of 2 to <4 hours (Smits 2007 minor). true or false as assigned by the caller. Mutually exclusive with pta_ge_4h. magent does not measure amnesia duration.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"skull_contusion","description":"Contusion of the skull (Smits 2007 minor). true or false as assigned by the caller. magent does not examine the scalp.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"neurologic_deficit","description":"Neurologic deficit (Smits 2007 minor). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"loss_of_consciousness","description":"Loss of consciousness (Smits 2007 minor). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"gcs_deterioration_1","description":"GCS deterioration of 1 point 1 hour after presentation (Smits 2007 minor). true or false as assigned by the caller. Mutually exclusive with gcs_deterioration_ge_2. magent does not assign GCS change.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"CHIP","operationId":"get_api_calc_chip","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, ct_indicated, major_count, minor_count, gcs, age_years, criteria, citation, disclaimer."},"400":{"description":"invalid_chip: CHIP inputs must match Smits 2007 simple major/minor criteria from that paper only. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/chip"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CHIP (bulk)","operationId":"post_api_calc_chip","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_chip: CHIP inputs must match Smits 2007 simple major/minor criteria from that paper only. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/chip"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"30","anticoagulant_therapy":"false","clinical_signs_skull_fracture":"false","ejected_from_vehicle":"false","fall_from_any_elevation":"false","gcs":"15","gcs_deterioration_1":"false","gcs_deterioration_ge_2":"false","loss_of_consciousness":"false","neurologic_deficit":"false","pedestrian_or_cyclist_vs_vehicle":"false","persistent_anterograde_amnesia":"false","posttraumatic_seizure":"false","pta_2_to_lt_4h":"false","pta_ge_4h":"false","skull_contusion":"false","vomiting":"false"},{"age":"30","anticoagulant_therapy":"false","clinical_signs_skull_fracture":"false","ejected_from_vehicle":"false","fall_from_any_elevation":"false","gcs":"15","gcs_deterioration_1":"false","gcs_deterioration_ge_2":"false","loss_of_consciousness":"false","neurologic_deficit":"false","pedestrian_or_cyclist_vs_vehicle":"false","persistent_anterograde_amnesia":"false","posttraumatic_seizure":"false","pta_2_to_lt_4h":"false","pta_ge_4h":"false","skull_contusion":"false","vomiting":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/qsofa":{"get":{"description":"Compute the Sepsis-3 qSOFA score from respiratory rate, caller-assigned altered mentation, and systolic blood pressure.\n\nWhen an agent needs the published three-point qSOFA total and must not invent the criteria or treat the total as a sepsis diagnosis.\n\nNot a diagnosis of sepsis and not a treatment recommendation.\n\nAltered mentation is caller-assigned. magent does not compute GCS here.\n\nThresholds are respiratory rate ≥22, systolic BP ≤100 mm Hg, and altered mentation as in Seymour 2016. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"respiratory_rate","description":"Respiratory rate in breaths/min (integer 4-80). ≥22 scores 1.","required":true,"schema":{"type":"integer"},"example":"16"},{"in":"query","name":"systolic_mm_hg","description":"Systolic blood pressure in mm Hg (50-250). ≤100 scores 1.","required":true,"schema":{"type":"number"},"example":"120"},{"in":"query","name":"altered_mentation","description":"Altered mentation as assigned by the caller (GCS <15 in Seymour 2016). true or false. magent does not compute GCS here.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"qSOFA","operationId":"get_api_calc_qsofa","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_respiratory_rate: respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/qsofa"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"qSOFA (bulk)","operationId":"post_api_calc_qsofa","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_respiratory_rate: respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/qsofa"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"altered_mentation":"false","respiratory_rate":"16","systolic_mm_hg":"120"},{"altered_mentation":"false","respiratory_rate":"16","systolic_mm_hg":"120"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/revised-geneva":{"get":{"description":"Compute the Le Gal 2006 revised Geneva score for suspected pulmonary embolism in the emergency department from age, heart rate, and six caller-assigned findings.\n\nWhen an agent needs the published original revised Geneva arithmetic (not simplified Geneva, not Wells) from caller-assigned findings.\n\nNot a diagnosis of pulmonary embolism. magent does not diagnose PE.\n\nThis tool is the original revised Geneva score (Le Gal 2006), not simplified Geneva (Klok 2008) and not Wells.\n\nAge 65 does not score; only age older than 65 years scores 1.\n\nPain on deep-vein palpation and unilateral edema is a single AND item (4 points), not two separate findings.\n\nHeart rate 75-94 scores 3; 95 or higher scores 5; never both. The caller assigns findings; magent does not examine the patient. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Scores 1 when age >65; 65 does not score.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"previous_dvt_or_pe","description":"Previous DVT or PE as assigned by the caller. true or false. 3 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"surgery_or_fracture_within_1_month","description":"Surgery under general anesthesia or lower-limb fracture within 1 month (one combined flag). true or false. 2 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"active_malignancy","description":"Solid or hematologic malignancy currently active or considered cured <1 year (caller-applied). true or false. 2 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"unilateral_lower_limb_pain","description":"Unilateral lower-limb pain. true or false. 3 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hemoptysis","description":"Hemoptysis. true or false. 2 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats per minute (integer 30-220). Scores 3 when 75-94 inclusive, 5 when ≥95, and 0 when ≤74. Never both 3 and 5.","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"pain_on_deep_vein_palpation_and_unilateral_edema","description":"Pain on deep-vein palpation AND unilateral edema as one combined flag. true or false. 4 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Revised Geneva score","operationId":"get_api_calc_revised_geneva","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, geneva_band, age_years, heart_rate_bpm, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/revised-geneva"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Revised Geneva score (bulk)","operationId":"post_api_calc_revised_geneva","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/revised-geneva"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"active_malignancy":"false","age":"50","heart_rate_bpm":"70","hemoptysis":"false","pain_on_deep_vein_palpation_and_unilateral_edema":"false","previous_dvt_or_pe":"false","surgery_or_fracture_within_1_month":"false","unilateral_lower_limb_pain":"false"},{"active_malignancy":"false","age":"50","heart_rate_bpm":"70","hemoptysis":"false","pain_on_deep_vein_palpation_and_unilateral_edema":"false","previous_dvt_or_pe":"false","surgery_or_fracture_within_1_month":"false","unilateral_lower_limb_pain":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/aub-has2":{"get":{"description":"Sum the six Dakik 2019 AUB-HAS2 1-point elements and return the integer score with low / intermediate / high bands.\n\nWhen an agent needs the published AUB-HAS2 point total for noncardiac surgery and must not invent an operative-clearance decision, an RCRI class, or an ACS treatment.\n\nNot a medical device. Not an operative clearance, cancellation, or monitoring order.\n\nNot RCRI and not ACS treatment. AUB-HAS2 is a noncardiac-surgery 30-day death/MI/stroke index (Dakik 2019 derivation).\n\nmagent does not take a cardiac history or assay hemoglobin. history_of_heart_disease, angina_or_dyspnea, vascular_surgery, and emergency_surgery are caller-assigned.\n\nThe paper writes hemoglobin as mg/dl; this tool uses g/dL (or g/L / 10). Provide hemoglobin_g_dl or hemoglobin_g_l, not both. Hemoglobin <12 g/dL scores 1 (12.0 does not).\n\nDerivation event rates are published cohort percents by integer score (0 / 0.5 / 2.0 / 5.6 / 15.7), not a patient-level prediction. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Age ≥75 scores 1 (Dakik 2019). 75 scores; 74 does not.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"hemoglobin_g_dl","description":"Hemoglobin in g/dL (3-22). Provide this or hemoglobin_g_l, not both. Dakik 2019 writes mg/dl; clinical use is g/dL. <12 g/dL scores 1 (11.9 scores; 12.0 does not). magent does not assay hemoglobin.","required":false,"schema":{"type":"number"},"example":"13"},{"in":"query","name":"hemoglobin_g_l","description":"Hemoglobin in g/L (30-220). Converted as hemoglobin_g_dl = hemoglobin_g_l / 10. Provide this or hemoglobin_g_dl, not both.","required":false,"schema":{"type":"number"},"example":"130"},{"in":"query","name":"history_of_heart_disease","description":"History of heart disease as assigned by the caller (Dakik 2019). true or false. magent does not take a cardiac history. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"angina_or_dyspnea","description":"Symptoms of angina or dyspnea as assigned by the caller (Dakik 2019). true or false. magent does not take a symptom history. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"vascular_surgery","description":"Vascular surgery as assigned by the caller (Dakik 2019). true or false. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"emergency_surgery","description":"Emergency surgery as assigned by the caller (Dakik 2019). true or false. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"AUB-HAS2","operationId":"get_api_calc_aub_has2","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk_band, derivation_event_rate_percent, age_years, hemoglobin_g_dl, history_of_heart_disease, angina_or_dyspnea, vascular_surgery, emergency_surgery, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/aub-has2"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"AUB-HAS2 (bulk)","operationId":"post_api_calc_aub_has2","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/aub-has2"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","angina_or_dyspnea":"false","emergency_surgery":"false","hemoglobin_g_dl":"13","history_of_heart_disease":"false","vascular_surgery":"false"},{"age":"50","angina_or_dyspnea":"false","emergency_surgery":"false","hemoglobin_g_dl":"13","history_of_heart_disease":"false","vascular_surgery":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/drip":{"get":{"description":"Sum the Webb 2016 DRIP (drug resistance in pneumonia) major and minor flags and return score, max, and high_risk at ≥4.\n\nWhen an agent needs the published DRIP point total and must not invent an antibiotic order or HCAP criteria.\n\nNot a medical device.\n\nNot an antibiotic order and not a diagnosis of drug-resistant pneumonia.\n\nThis tool is the Webb 2016 DRIP table only. It is not HCAP (healthcare-associated pneumonia) criteria.\n\nlong_term_care is long-term acute care, skilled nursing, or inpatient rehabilitation as in Webb 2016; not assisted living or a group home. The caller assigns the flag; magent does not classify the facility.\n\npoor_functional_status is Karnofsky <70 or non-ambulatory as in Webb 2016. The caller supplies the boolean; magent does not compute Karnofsky. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"antibiotics_60d","description":"Antibiotic use within 60 days (Webb 2016 major, 2 points). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"long_term_care","description":"Residence in long-term acute care, a skilled nursing facility, or inpatient rehabilitation (Webb 2016 major, 2 points). Not assisted living or a group home. The caller assigns the flag; magent does not classify the facility. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"tube_feeding","description":"Tube feeding (Webb 2016 major, 2 points). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"prior_drp_1yr","description":"Prior drug-resistant pneumonia within 1 year (Webb 2016 major, 2 points). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hospitalization_60d","description":"Hospitalization within 60 days (Webb 2016 minor, 1 point). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"chronic_pulmonary_disease","description":"Chronic pulmonary disease (Webb 2016 minor, 1 point). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"poor_functional_status","description":"Poor functional status as in Webb 2016 (Karnofsky <70 or non-ambulatory). Caller-assigned boolean; magent does not compute Karnofsky. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"gastric_acid_suppression","description":"Gastric acid suppression (Webb 2016 minor, 1 point). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"wound_care","description":"Wound care (Webb 2016 minor, 1 point). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"mrsa_colonization_1yr","description":"MRSA colonization within 1 year (Webb 2016 minor, 1 point). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"DRIP","operationId":"get_api_calc_drip","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, high_risk, components, citation, disclaimer."},"400":{"description":"invalid_drip: each DRIP flag must be true or false (Webb 2016). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/drip"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"DRIP (bulk)","operationId":"post_api_calc_drip","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_drip: each DRIP flag must be true or false (Webb 2016). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/drip"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"antibiotics_60d":"false","chronic_pulmonary_disease":"false","gastric_acid_suppression":"false","hospitalization_60d":"false","long_term_care":"false","mrsa_colonization_1yr":"false","poor_functional_status":"false","prior_drp_1yr":"false","tube_feeding":"false","wound_care":"false"},{"antibiotics_60d":"false","chronic_pulmonary_disease":"false","gastric_acid_suppression":"false","hospitalization_60d":"false","long_term_care":"false","mrsa_colonization_1yr":"false","poor_functional_status":"false","prior_drp_1yr":"false","tube_feeding":"false","wound_care":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/kfre":{"get":{"description":"Compute 2-year and 5-year risk of kidney failure (dialysis or preemptive transplant) from the Tangri 2011 4-variable Kidney Failure Risk Equation (age, sex, eGFR, urine ACR).\n\nWhen an agent already has age, male/female, a caller-supplied eGFR, and urine ACR in mg/g and needs that paper's 4-variable 2- and 5-year risks. Not a dialysis or transplant order, not CKD-EPI, and not the 8-variable or 2016 country-recalibrated equations.\n\nNot a medical device. Not a dialysis or transplant order or referral threshold. magent does not assay creatinine or ACR and does not compute CKD-EPI eGFR.\n\nTangri 2011 4-variable model only (age, sex, eGFR, urine ACR). Does not ship the 8-variable model (calcium, phosphate, bicarbonate, albumin).\n\nDoes not apply Tangri 2016 country recalibrations or North-America vs non-North-America S0 splits. No race input.\n\nDerivation was referred CKD stages 3-5 (eGFR about 10-59 mL/min/1.73 m2). Age 18-90 is a magent adult clamp. Caller supplies eGFR; magent does not estimate it.\n\nEmits 2-year and 5-year risk percents. Does not assign a named risk class; Tangri 2011 printed stage-specific NRI cutoffs, not a class field on this equation. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_years","description":"Age in years (18-90, magent clamp). Tangri 2011 4-variable model uses age as a continuous predictor (per 10 years, centered at 7.036). Adult CKD 3-5 derivation.","required":true,"schema":{"type":"integer"},"example":55},{"in":"query","name":"male","description":"true if male, false if female. Enters the linear predictor as 1 or 0 (centered at 0.5642). No race coefficient.","required":true,"schema":{"type":"boolean"},"example":true},{"in":"query","name":"egfr_ml_min","description":"Caller-supplied eGFR in mL/min/1.73 m2 (1-150, magent clamp; must be positive). Tangri 2011 derivation was CKD stages 3-5. magent does not compute CKD-EPI eGFR and does not assay creatinine.","required":true,"schema":{"type":"number"},"example":30},{"in":"query","name":"acr_mg_g","description":"Urine albumin-to-creatinine ratio in mg/g (0.1-10000, magent clamp; must be positive). Enters as natural log, centered at 5.137. magent does not assay ACR and does not convert from mg/mmol.","required":true,"schema":{"type":"number"},"example":300}],"summary":"KFRE","operationId":"get_api_calc_kfre","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, male, egfr_ml_min, acr_mg_g, linear_predictor, two_year_risk_percent, five_year_risk_percent, s0_2_year, s0_5_year, citation, disclaimer."},"400":{"description":"invalid_kfre: Kidney failure risk inputs must be numeric age, eGFR, and urine ACR with a binary sex as used in Tangri 2011. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/kfre"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"KFRE (bulk)","operationId":"post_api_calc_kfre","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_kfre: Kidney failure risk inputs must be numeric age, eGFR, and urine ACR with a binary sex as used in Tangri 2011. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/kfre"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"acr_mg_g":"300","age_years":"55","egfr_ml_min":"30","male":"true"},{"acr_mg_g":"300","age_years":"55","egfr_ml_min":"30","male":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-levator-ani":{"get":{"description":"Apply the Rao 2016 Rome IV levator ani syndrome (F2a) diagnostic criteria and return whether the published levator ani box holds (rome_iv_levator_ani).\n\nWhen an agent already has the six caller-assigned Rao 2016 Rome IV levator ani syndrome flags and needs whether the published F2a box holds. magent does not perform traction on the puborectalis.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose levator ani syndrome.\n\nThe caller assigns the six flags. magent does not perform traction on the puborectalis.\n\nThis tool is Rao 2016 Rome IV levator ani syndrome (F2a) only. Not proctalgia fugax. Not unspecified functional anorectal pain (F2b). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"chronic_or_recurrent_rectal_pain_or_aching","description":"Chronic or recurrent rectal pain or aching (Rao 2016 Rome IV levator ani syndrome F2a). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"episodes_last_30_minutes_or_longer","description":"Episodes last 30 minutes or longer (Rao 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"tenderness_during_puborectalis_traction","description":"Tenderness during posterior traction on the puborectalis (Rao 2016 F2a). true or false as assigned by the caller. magent does not perform traction on the puborectalis.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"other_causes_of_rectal_pain_excluded","description":"Other causes of rectal pain excluded (IBD, intramuscular abscess, anal fissure, thrombosed hemorrhoids, prostatitis, coccygodynia, major pelvic-floor structural alteration), as assigned (Rao 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"fulfilled_last_3_months","description":"Criteria fulfilled for the last 3 months, as assigned (Rao 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"onset_at_least_6_months","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Rao 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rao 2016 Rome IV levator ani syndrome","operationId":"get_api_calc_rome_iv_levator_ani","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, rome_iv_levator_ani, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_levator_ani: Rome IV levator ani syndrome needs the Rao 2016 anorectal levator-ani flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-levator-ani"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rao 2016 Rome IV levator ani syndrome (bulk)","operationId":"post_api_calc_rome_iv_levator_ani","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_levator_ani: Rome IV levator ani syndrome needs the Rao 2016 anorectal levator-ani flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-levator-ani"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"chronic_or_recurrent_rectal_pain_or_aching":"true","episodes_last_30_minutes_or_longer":"true","fulfilled_last_3_months":"true","onset_at_least_6_months":"true","other_causes_of_rectal_pain_excluded":"true","tenderness_during_puborectalis_traction":"true"},{"chronic_or_recurrent_rectal_pain_or_aching":"true","episodes_last_30_minutes_or_longer":"true","fulfilled_last_3_months":"true","onset_at_least_6_months":"true","other_causes_of_rectal_pain_excluded":"true","tenderness_during_puborectalis_traction":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rcvs2":{"get":{"description":"Sum the Rocha 2019 RCVS2 integer points (recurrent or single thunderclap headache, intracranial ICA involvement, vasoconstrictive trigger, female sex, subarachnoid hemorrhage) and return score -2 to 10 with the published against, equivocal, or supports band.\n\nWhen an agent already has caller-assigned Rocha 2019 RCVS2 items and needs the published point total and band, not a diagnosis of RCVS or PACNS, not angiogram reading, and not PACNS treatment advice.\n\nNot a medical device. Not a diagnosis of RCVS or PACNS. magent does not examine the patient.\n\nmagent does not read angiograms. intracranial_ica_involvement is a caller-assigned Rocha 2019 flag (true scores -2).\n\nRecurrent and single thunderclap headache both score 5 as published; the paper does not split those patterns into different point values.\n\nBands follow Rocha 2019: score >=5 supports RCVS; <=2 against RCVS; 3-4 equivocal. Not PACNS treatment advice. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"thunderclap_headache","description":"Recurrent or single thunderclap headache as assigned by the caller (Rocha 2019). Both patterns score 5; the paper does not split them. true or false. magent does not take a headache history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"intracranial_ica_involvement","description":"Intracranial internal carotid artery involvement as assigned by the caller (Rocha 2019). true scores -2. magent does not read angiograms.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"vasoconstrictive_trigger","description":"Identified vasoconstrictive trigger as assigned by the caller (Rocha 2019). true scores 3. magent does not take a trigger history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"sex","description":"female or male (Rocha 2019). Female scores 1; male scores 0.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"sah","description":"Subarachnoid hemorrhage on imaging as assigned by the caller (Rocha 2019). true scores 1. magent does not interpret imaging.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"RCVS2","operationId":"get_api_calc_rcvs2","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, band, components, citation, disclaimer."},"400":{"description":"invalid_rcvs2: RCVS2 inputs must be the five Rocha 2019 caller-assigned items (thunderclap headache, intracranial ICA involvement, vasoconstrictive trigger, sex, subarachnoid hemorrhage). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rcvs2"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"RCVS2 (bulk)","operationId":"post_api_calc_rcvs2","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rcvs2: RCVS2 inputs must be the five Rocha 2019 caller-assigned items (thunderclap headache, intracranial ICA involvement, vasoconstrictive trigger, sex, subarachnoid hemorrhage). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rcvs2"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"intracranial_ica_involvement":"false","sah":"false","sex":"male","thunderclap_headache":"false","vasoconstrictive_trigger":"false"},{"intracranial_ica_involvement":"false","sah":"false","sex":"male","thunderclap_headache":"false","vasoconstrictive_trigger":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/motzer":{"get":{"description":"Sum the Motzer 1999 MSKCC adverse factors for advanced RCC and return favorable (0), intermediate (1–2), or poor (≥3). Motzer 1999 reported median survival of 20, 10, and 4 months in those interferon-era groups as published cohort results, not a predicted survival.\n\nWhen an agent needs the published Motzer 1999 MSKCC point total and risk group and must not invent an RCC diagnosis or treatment recommendation, must not use IMDC or Motzer 2002/2004, and must not assign KPS or assay labs.\n\nNot a medical device and not an RCC diagnosis or treatment recommendation. magent does not examine the patient.\n\nNot IMDC (Heng 2009). This tool does not include neutrophils or platelets.\n\nNot Motzer 2002 or Motzer 2004. The fifth factor is absence of prior nephrectomy, not time from diagnosis to treatment.\n\nmagent does not assay LDH, hemoglobin, or calcium, apply ULN/LLN, or observe Karnofsky performance status. All five inputs are caller-assigned flags.\n\nMotzer 1999 overall-survival figures are published interferon-era cohort results, not a predicted survival or a treatment choice. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"kps_lt_80","description":"Karnofsky performance status <80% as assigned by the caller (Motzer 1999). true scores 1. magent does not observe KPS.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ldh_gt_1_5_uln","description":"Serum LDH >1.5 × institutional ULN as assigned by the caller (Motzer 1999). true scores 1. magent does not assay LDH or apply ULN.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hemoglobin_lt_lln","description":"Hemoglobin below the institutional lower limit of normal as assigned by the caller (Motzer 1999). true scores 1. magent does not assay hemoglobin or apply LLN.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"corrected_calcium_gt_10","description":"Corrected calcium >10 mg/dL as assigned by the caller (Motzer 1999 paper threshold, not institutional ULN). true scores 1. magent does not assay calcium.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"no_prior_nephrectomy","description":"Absence of prior nephrectomy as assigned by the caller (Motzer 1999). true scores 1. Not Motzer 2004 time from diagnosis to treatment. magent does not review operative history.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Motzer","operationId":"get_api_calc_motzer","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, motzer_band, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/motzer"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Motzer (bulk)","operationId":"post_api_calc_motzer","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/motzer"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"corrected_calcium_gt_10":"false","hemoglobin_lt_lln":"false","kps_lt_80":"false","ldh_gt_1_5_uln":"false","no_prior_nephrectomy":"false"},{"corrected_calcium_gt_10":"false","hemoglobin_lt_lln":"false","kps_lt_80":"false","ldh_gt_1_5_uln":"false","no_prior_nephrectomy":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-child-rumination":{"get":{"description":"Apply the Hyams 2016 Rome IV H1c child/adolescent rumination syndrome diagnostic criteria and return whether the published rumination box holds (rome_iv_child_rumination).\n\nWhen an agent already has the five caller-assigned Hyams 2016 Rome IV H1c flags and needs whether the published child/adolescent rumination box holds. magent does not observe regurgitation.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose rumination syndrome.\n\nThe caller assigns the five flags, including not_explained_by_another_condition_or_eating_disorder. magent does not observe regurgitation and does not examine the child.\n\nThis tool is Hyams 2016 Rome IV H1c child/adolescent rumination only. Not adult Rome IV rumination (Stanghellini 2016 B4). Not neonate/toddler rumination (Benninga 2016 G2).\n\nGERD-treatment failure and weekly frequency are not required (Rome IV dropped those). Manometry is not parsed. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"repeated_regurgitation_rechewing_or_expulsion_soon_after_meals","description":"Repeated regurgitation and rechewing or expulsion of food that begins soon after ingestion of a meal, as assigned (Hyams 2016 Rome IV H1c). The paper's 1a (begins soon after meals) is folded into this flag. true or false as assigned by the caller. magent does not observe regurgitation.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"does_not_occur_during_sleep","description":"The regurgitation does not occur during sleep, as assigned (Hyams 2016 Rome IV H1c). The paper's 1b (not during sleep) is this flag. true or false as assigned by the caller. magent does not observe regurgitation.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"not_preceded_by_retching","description":"Not preceded by retching, as assigned (Hyams 2016 Rome IV H1c). true or false as assigned by the caller. magent does not observe regurgitation.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"not_explained_by_another_condition_or_eating_disorder","description":"After appropriate evaluation, the symptoms cannot be fully explained by another medical condition, and an eating disorder has been ruled out, as assigned (Hyams 2016 Rome IV H1c). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"fulfilled_at_least_2_months","description":"Criteria fulfilled for at least 2 months prior to diagnosis, as assigned (Hyams 2016 Rome IV H1c). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV Child Rumination","operationId":"get_api_calc_rome_iv_child_rumination","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, rome_iv_child_rumination, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_child_rumination: Rome IV child rumination needs the Hyams 2016 child/adolescent H1c flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-child-rumination"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV Child Rumination (bulk)","operationId":"post_api_calc_rome_iv_child_rumination","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_child_rumination: Rome IV child rumination needs the Hyams 2016 child/adolescent H1c flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-child-rumination"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"does_not_occur_during_sleep":"true","fulfilled_at_least_2_months":"true","not_explained_by_another_condition_or_eating_disorder":"true","not_preceded_by_retching":"true","repeated_regurgitation_rechewing_or_expulsion_soon_after_meals":"true"},{"does_not_occur_during_sleep":"true","fulfilled_at_least_2_months":"true","not_explained_by_another_condition_or_eating_disorder":"true","not_preceded_by_retching":"true","repeated_regurgitation_rechewing_or_expulsion_soon_after_meals":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/hemorr2hages":{"get":{"description":"Compute the Gage 2006 HEMORR2HAGES bleeding-risk score from age and caller-assigned clinical flags, with published warfarin major-bleed rates per 100 patient-years.\n\nWhen an agent needs the published HEMORR2HAGES AF bleeding-risk arithmetic (not HAS-BLED, not ORBIT, not ATRIA) and must not invent the point total from prose.\n\nNot a medical device. Not a diagnosis and not a decision to start or stop anticoagulation.\n\nNot a warfarin prescription. magent does not dose warfarin or interpret INR.\n\nNot HAS-BLED, not ORBIT, and not ATRIA. This tool is the Gage 2006 HEMORR2HAGES score only.\n\nAge >75 scores 1 (76 scores; 75 does not). Prior bleed scores 2. Hepatic or renal disease is one caller flag. magent does not measure platelets, hemoglobin, or CYP2C9. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Age >75 scores 1 (76 scores; 75 does not).","required":true,"schema":{"type":"integer"},"example":"60"},{"in":"query","name":"prior_bleed","description":"Prior bleed / rebleeding as assigned by the caller. true or false. Scores 2 (the 2 in HEMORR2HAGES).","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hepatic_or_renal","description":"Hepatic or renal disease as assigned by the caller. true or false. Scores 1 as a single flag.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ethanol","description":"Ethanol abuse as assigned by the caller. true or false. Scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"malignancy","description":"Malignancy as assigned by the caller. true or false. Scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"reduced_platelet","description":"Reduced platelet count or function as assigned by the caller. true or false. Scores 1. magent does not take a platelet count.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"uncontrolled_hypertension","description":"Uncontrolled hypertension as assigned by the caller. true or false. Scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"anemia","description":"Anemia as assigned by the caller. true or false. Scores 1. magent does not take hemoglobin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"genetic_factors","description":"Genetic factors as assigned by the caller (paper: CYP2C9). true or false. Scores 1. magent does not genotype.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"excessive_fall_risk","description":"Excessive fall risk as assigned by the caller. true or false. Scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"stroke","description":"Prior stroke as assigned by the caller. true or false. Scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"HEMORR2HAGES","operationId":"get_api_calc_hemorr2hages","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, bleed_rate_per_100_pt_years, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hemorr2hages"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HEMORR2HAGES (bulk)","operationId":"post_api_calc_hemorr2hages","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hemorr2hages"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"60","anemia":"false","ethanol":"false","excessive_fall_risk":"false","genetic_factors":"false","hepatic_or_renal":"false","malignancy":"false","prior_bleed":"false","reduced_platelet":"false","stroke":"false","uncontrolled_hypertension":"false"},{"age":"60","anemia":"false","ethanol":"false","excessive_fall_risk":"false","genetic_factors":"false","hepatic_or_renal":"false","malignancy":"false","prior_bleed":"false","reduced_platelet":"false","stroke":"false","uncontrolled_hypertension":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/malt-ipi":{"get":{"description":"Sum the Thieblemont 2017 three-factor MALT-IPI (IELSG-19) and return low (0), intermediate (1), or high (≥2).\n\nWhen an agent needs the published original MALT-IPI 2017 point total and risk group and must not invent a lymphoma diagnosis or treatment choice, and must not substitute Revised MALT-IPI or Shipp IPI.\n\nNot a medical device and not a lymphoma diagnosis or treatment choice. magent does not examine the patient.\n\nThis is original Thieblemont 2017 MALT-IPI (IELSG-19), not Revised MALT-IPI (no MMS; age is ≥70 not >60), and not Shipp IPI.\n\nmagent does not stage lymphoma or assay LDH. stage_iii_or_iv and ldh_gt_uln are caller-assigned flags. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Age ≥70 scores 1 (Thieblemont 2017). Age 69 scores 0. This is not IPI's >60 cutoff.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"stage_iii_or_iv","description":"Ann Arbor stage III or IV as assigned by the caller (Thieblemont 2017). true scores 1. magent does not stage lymphoma.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ldh_gt_uln","description":"Serum LDH above the upper limit of normal as assigned by the caller (Thieblemont 2017). true scores 1. magent does not assay LDH.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"MALT-IPI","operationId":"get_api_calc_malt_ipi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, malt_ipi_risk, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/malt-ipi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"MALT-IPI (bulk)","operationId":"post_api_calc_malt_ipi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/malt-ipi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","ldh_gt_uln":"false","stage_iii_or_iv":"false"},{"age":"50","ldh_gt_uln":"false","stage_iii_or_iv":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pascal":{"get":{"description":"Apply the Kent 2021 PASCAL classification (Table 1) from a caller-assigned RoPE total and large-shunt plus atrial-septal-aneurysm flags, and return probable, possible, or unlikely PFO-related stroke likelihood.\n\nWhen an agent already has a caller-assigned RoPE total (0-10) and caller-assigned large-shunt and ASA flags after cryptogenic stroke with PFO, and must not invent a closure order, recompute RoPE, or apply ESUS.\n\nNot a medical device. Not a PFO diagnosis and not a closure or device-indication order.\n\nrope_score is the caller-assigned Kent 2013 RoPE total (0-10). magent does not recompute RoPE; use the related rope tool for that index.\n\nlarge_shunt and atrial_septal_aneurysm are caller-assigned. magent does not read echocardiography and does not echo those flags.\n\nThis is Kent 2021 PASCAL, not RoPE itself and not the Hart 2014 ESUS construct.\n\nPooled-trial ages were 18-60 years. That eligibility is a limitation, not an HTTP 400; RoPE already encodes age. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"rope_score","description":"Caller-assigned RoPE total integer 0-10 (Kent 2013 components already summed; related tool rope). magent does not recompute RoPE. high_rope is true when rope_score is 7 or greater (Kent 2021 Table 1 / NCBI reprint; not greater-than-7 only).","required":true,"schema":{"type":"integer"},"example":"8"},{"in":"query","name":"large_shunt","description":"Large-sized shunt as assigned by the caller (Kent 2021 Table 1 high-risk PFO feature). true or false. high_risk_pfo is true if this flag or atrial_septal_aneurysm is true. magent does not echo this flag and does not read echocardiography.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"atrial_septal_aneurysm","description":"Atrial septal aneurysm (ASA) as assigned by the caller (Kent 2021 Table 1 high-risk PFO feature). true or false. high_risk_pfo is true if this flag or large_shunt is true. magent does not echo this flag and does not read echocardiography.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"PASCAL","operationId":"get_api_calc_pascal","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, pascal_class, high_rope, high_risk_pfo, rope_score, criteria, citation, disclaimer."},"400":{"description":"invalid_pascal: rope_score must be an integer from 0 to 10 (Kent 2021 PASCAL; magent does not recompute RoPE). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pascal"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PASCAL (bulk)","operationId":"post_api_calc_pascal","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pascal: rope_score must be an integer from 0 to 10 (Kent 2021 PASCAL; magent does not recompute RoPE). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pascal"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"atrial_septal_aneurysm":"false","large_shunt":"true","rope_score":"8"},{"atrial_septal_aneurysm":"false","large_shunt":"true","rope_score":"8"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/v1/catalog":{"get":{"description":"Lists paid tools with prices, query parameters, example URLs, error codes, compact docs (purpose, formula, citation), and the shared x402 handshake (400/402/503). Example JSON lives on /docs/{slug}, not this index. `?compact=1` is a slim index. `limit` and `offset` page `tools`.","summary":"Machine-readable tool catalog","operationId":"get_v1_catalog","responses":{"200":{"description":"Catalog"}},"security":[]}},"/api/calc/irae-colitis":{"get":{"description":"Apply Brahmer 2018 ASCO Table 2.1 immune-related colitis grading (CTCAE diarrhea as used in the table) and return grade 1-4 plus icpi_action from stools_over_baseline and four caller-assigned flags.\n\nWhen an agent already has the increase of stools per day over baseline and caller-assigned incontinence, hospitalization-indicated, limiting-self-care, and life-threatening flags and needs the published first-match grade and ICI hold or discontinue action. magent does not count stools.\n\nNot a medical device.\n\nNot a diagnosis. Not a steroid dose or immunosuppression order.\n\nmagent does not count stools. stools_over_baseline and the four flags are caller-assigned (Brahmer 2018 Table 2.1 CTCAE diarrhea as used in the table).\n\nOstomy-output bands are not implemented (stool-increase plus incontinence, hospitalization_indicated, limiting_self_care, and life_threatening only).\n\nNot SITC 2021. Not CTCAE v5 diarrhea as a separate instrument. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"stools_over_baseline","description":"Increase of stools per day over baseline as assigned by the caller (integer 0-40; Brahmer 2018 Table 2.1 CTCAE diarrhea). Fewer than four is grade 1; four to six is grade 2; seven or more is grade 3 unless life_threatening is true. Ostomy-output increase is not an input. magent does not count stools.","required":true,"schema":{"type":"integer"},"example":"2"},{"in":"query","name":"incontinence","description":"Incontinence as assigned by the caller (Brahmer 2018 Table 2.1 grade 3). true or false. When true and life_threatening is false, grade is 3. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hospitalization_indicated","description":"Hospitalization indicated as assigned by the caller (Brahmer 2018 Table 2.1 grade 3). true or false. When true and life_threatening is false, grade is 3. magent does not admit the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"limiting_self_care","description":"Limiting self-care ADL as assigned by the caller (Brahmer 2018 Table 2.1 grade 3). true or false. When true and life_threatening is false, grade is 3. magent does not assess ADL.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"life_threatening","description":"Life-threatening consequences with urgent intervention indicated, as assigned by the caller (Brahmer 2018 Table 2.1 grade 4). true or false. When true, grade is 4 regardless of stool count. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"irAE colitis","operationId":"get_api_calc_irae_colitis","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, grade, icpi_action, stools_over_baseline, incontinence, hospitalization_indicated, limiting_self_care, life_threatening, criteria, citation, disclaimer."},"400":{"description":"invalid_stools_over_baseline: stools_over_baseline must be an integer from 0 to 40 (Brahmer 2018 CTCAE diarrhea stools per day over baseline). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/irae-colitis"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"irAE colitis (bulk)","operationId":"post_api_calc_irae_colitis","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_stools_over_baseline: stools_over_baseline must be an integer from 0 to 40 (Brahmer 2018 CTCAE diarrhea stools per day over baseline). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/irae-colitis"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"hospitalization_indicated":"false","incontinence":"false","life_threatening":"false","limiting_self_care":"false","stools_over_baseline":"2"},{"hospitalization_indicated":"false","incontinence":"false","life_threatening":"false","limiting_self_care":"false","stools_over_baseline":"2"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/scorten":{"get":{"description":"Sum the seven Bastuji-Garin 2000 SCORTEN risk factors from caller-assigned flags and return the 0–7 score and that paper's predicted in-hospital mortality token.\n\nWhen an agent has already assigned the published Bastuji-Garin 2000 SI cutoffs as flags and needs the SCORTEN total and predicted in-hospital mortality band. magent does not measure labs or BSA, and does not diagnose TEN/SJS or order ICU care or IVIG.\n\nNot a medical device and not a diagnosis of TEN or SJS.\n\nmagent does not order ICU care or IVIG.\n\nEach of the seven Bastuji-Garin 2000 risk factors is a caller-assigned flag using that paper's SI cutoffs. magent does not measure age, heart rate, BSA, urea, glucose, or bicarbonate, and does not convert BUN.\n\nPredicted in-hospital mortality tokens are from Bastuji-Garin 2000 only (3.2%, 12.1%, 35.3%, 58.3%, 90%). Not ABCD-10. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_gt_40","description":"Age >40 years (Bastuji-Garin 2000). true or false as assigned by the caller. magent does not compute age.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"malignancy","description":"Presence of malignancy (Bastuji-Garin 2000). true or false as assigned by the caller. magent does not diagnose cancer.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"heart_rate_gt_120","description":"Heart rate >120 beats/min (Bastuji-Garin 2000). true or false as assigned by the caller. magent does not measure heart rate.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"epidermal_detachment_gt_10_percent","description":"Epidermal detachment >10% of body surface area (Bastuji-Garin 2000). true or false as assigned by the caller. magent does not measure BSA.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"urea_gt_10_mmol_l","description":"Serum urea >10 mmol/L (Bastuji-Garin 2000; equivalent BUN >28 mg/dL). true or false as assigned by the caller. magent does not assay urea or convert BUN.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"glucose_gt_14_mmol_l","description":"Serum glucose >14 mmol/L (Bastuji-Garin 2000). true or false as assigned by the caller. magent does not assay glucose.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bicarbonate_lt_20_mmol_l","description":"Serum bicarbonate <20 mmol/L (Bastuji-Garin 2000). true or false as assigned by the caller. magent does not assay bicarbonate.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"SCORTEN","operationId":"get_api_calc_scorten","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, predicted_mortality, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/scorten"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SCORTEN (bulk)","operationId":"post_api_calc_scorten","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/scorten"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_gt_40":"false","bicarbonate_lt_20_mmol_l":"false","epidermal_detachment_gt_10_percent":"false","glucose_gt_14_mmol_l":"false","heart_rate_gt_120":"false","malignancy":"false","urea_gt_10_mmol_l":"false"},{"age_gt_40":"false","bicarbonate_lt_20_mmol_l":"false","epidermal_detachment_gt_10_percent":"false","glucose_gt_14_mmol_l":"false","heart_rate_gt_120":"false","malignancy":"false","urea_gt_10_mmol_l":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/nadler":{"get":{"description":"Compute Nadler 1962 predicted blood volume in liters and milliliters from height, weight, and sex.\n\nWhen an agent needs published Nadler blood volume and must not invent liters, apply 70 mL/kg, or silently use Lemmens–Bernstein–Brodsky.\n\nAdults as published. Nadler 1962 did not take age; this tool does not take age.\n\nNot a transfusion order. magent does not choose a product, rate, or threshold.\n\nNadler 1962 only. Not Lemmens–Bernstein–Brodsky and not a 70 mL/kg rule of thumb. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"height_cm","description":"Height in centimeters. Provide height_cm or height_in.","required":false,"schema":{"type":"number"},"example":"170"},{"in":"query","name":"height_in","description":"Height in inches. Converted as cm = in * 2.54.","required":false,"schema":{"type":"number"},"example":"66.92913385826772"},{"in":"query","name":"weight_kg","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"weight_lb","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"schema":{"type":"number"},"example":"154.3236"},{"in":"query","name":"sex","description":"Sex used by Nadler 1962 (separate male and female equations).","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"}],"summary":"Nadler blood volume","operationId":"get_api_calc_nadler","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, sex, height_cm, weight_kg, blood_volume_l, blood_volume_ml, citation, disclaimer."},"400":{"description":"invalid_height: height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nadler"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Nadler blood volume (bulk)","operationId":"post_api_calc_nadler","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_height: height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nadler"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"height_cm":"170","sex":"male","weight_kg":"70"},{"height_cm":"170","sex":"male","weight_kg":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pawss":{"get":{"description":"Apply the Maldonado 2014 PAWSS Part A threshold and ten yes/no items and return the published 0–10 total with the ≥4 high-risk band.\n\nWhen an agent has already assigned the PAWSS threshold and ten item flags and needs the published score and high-risk cutoff, not a later prophylaxis protocol.\n\nNot a medical device and not a diagnosis of alcohol withdrawal syndrome (AWS) or a prophylaxis order.\n\nNot CIWA-Ar.\n\nThe Part A threshold (any alcohol in the last 30 days or positive BAL on admission) is required. If it is false, magent returns score 0 and pawss_band outside_window and does not add the ten item points.\n\nmagent does not interview the patient or measure BAL. Each flag is caller-assigned.\n\nPublished cutoff is ≥4 high risk for complicated AWS. Scores 0–3 with a true threshold are low. magent does not invent a moderate class. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"alcohol_last_30d_or_positive_bal","description":"Part A threshold (0 points). Caller-assigned: consumed any alcohol in the last 30 days or a positive BAL on admission (Maldonado 2014). If false, score is 0 and pawss_band is outside_window; the ten items are not added. magent does not interview the patient or measure BAL.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"recently_intoxicated_30d","description":"Recently intoxicated or drunk within the last 30 days as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"alcohol_rehab","description":"Ever alcohol-use-disorder rehabilitation or AA as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"previous_withdrawal","description":"Any previous alcohol withdrawal as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"blackouts","description":"Ever blackouts as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"withdrawal_seizures","description":"Ever alcohol withdrawal seizures as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"delirium_tremens","description":"Ever delirium tremens as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"combined_downers_90d","description":"Combined alcohol with benzodiazepines or barbiturates in the last 90 days as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"combined_other_substances_90d","description":"Combined alcohol with any other substance of abuse in the last 90 days as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bal_ge_200","description":"BAL on presentation ≥200 as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not measure BAL.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"increased_autonomic_activity","description":"Increased autonomic activity as assigned by the caller (Maldonado 2014), for example HR>120, tremor, sweating, agitation, or nausea. true scores 1 when the Part A threshold is true. magent does not observe the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"PAWSS","operationId":"get_api_calc_pawss","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, pawss_band, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pawss"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PAWSS (bulk)","operationId":"post_api_calc_pawss","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pawss"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"alcohol_last_30d_or_positive_bal":"false","alcohol_rehab":"false","bal_ge_200":"false","blackouts":"false","combined_downers_90d":"false","combined_other_substances_90d":"false","delirium_tremens":"false","increased_autonomic_activity":"false","previous_withdrawal":"false","recently_intoxicated_30d":"false","withdrawal_seizures":"false"},{"alcohol_last_30d_or_positive_bal":"false","alcohol_rehab":"false","bal_ge_200":"false","blackouts":"false","combined_downers_90d":"false","combined_other_substances_90d":"false","delirium_tremens":"false","increased_autonomic_activity":"false","previous_withdrawal":"false","recently_intoxicated_30d":"false","withdrawal_seizures":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/licurse":{"get":{"description":"Sum the Licurse 2010 seven-factor integer points used for that paper's low versus higher-risk hydronephrosis split in AKI (history of hydronephrosis 4; each of the other six factors 1).\n\nWhen an agent already has the seven Licurse 2010 flags, including caller-assigned Black, and needs the published 0–10 total and 2010 validation band (≤2 low, ≥3 higher), not an ultrasound order. magent does not assign race and does not perform ultrasound.\n\nNot a medical device.\n\nNot an imaging order and not a diagnosis of obstruction. magent does not perform ultrasonography.\n\nblack is caller-assigned as used in Licurse 2010 (nonblack race scores 1); magent does not assign race.\n\nTwo-level 2010 validation split only: score ≤2 low (validation HN 3.1%, HNRI 0.4%); score ≥3 higher (validation HN 15.7%, HNRI 4.7%). Not a three-level medium band.\n\nobstruction_diagnosis is one caller-assigned flag covering abdominal or pelvic mass, BPH, pelvic surgery, or neurogenic bladder.\n\nnephrotoxins, chf, and prerenal_aki (pressor use or sepsis) each score 1 when absent. magent does not identify medications or diagnose sepsis. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"history_hydronephrosis","description":"History of hydronephrosis as assigned by the caller (Licurse 2010). true scores 4. magent does not read imaging or perform ultrasound.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"black","description":"Caller-assigned Black as used in Licurse 2010; magent does not assign race. Nonblack race (false) scores 1. true or false.","required":true,"schema":{"type":"boolean"},"example":true},{"in":"query","name":"recurrent_uti","description":"Recurrent urinary tract infections as assigned by the caller (Licurse 2010). true scores 1. magent does not take a culture history.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"obstruction_diagnosis","description":"Diagnosis consistent with possible obstruction (abdominal or pelvic mass, BPH, pelvic surgery, or neurogenic bladder) as one caller-assigned flag (Licurse 2010). true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"nephrotoxins","description":"Inpatient nephrotoxic exposure as assigned by the caller (Licurse 2010). Absence (false) scores 1. magent does not identify medications.","required":true,"schema":{"type":"boolean"},"example":true},{"in":"query","name":"chf","description":"Congestive heart failure as assigned by the caller (Licurse 2010). Absence (false) scores 1. magent does not diagnose heart failure.","required":true,"schema":{"type":"boolean"},"example":true},{"in":"query","name":"prerenal_aki","description":"Prerenal AKI (pressor use or sepsis) as assigned by the caller (Licurse 2010). Absence (false) scores 1. magent does not diagnose sepsis or read pressor use.","required":true,"schema":{"type":"boolean"},"example":true}],"summary":"Licurse","operationId":"get_api_calc_licurse","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk_band, validation_hn_percent, validation_hnri_percent, history_hydronephrosis, black, recurrent_uti, obstruction_diagnosis, nephrotoxins, chf, prerenal_aki, components, citation, disclaimer."},"400":{"description":"invalid_licurse: Licurse inputs must match the 2010 hydronephrosis flags including caller-assigned black and the six other Table factors. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/licurse"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Licurse (bulk)","operationId":"post_api_calc_licurse","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_licurse: Licurse inputs must match the 2010 hydronephrosis flags including caller-assigned black and the six other Table factors. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/licurse"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"black":"true","chf":"true","history_hydronephrosis":"false","nephrotoxins":"true","obstruction_diagnosis":"false","prerenal_aki":"true","recurrent_uti":"false"},{"black":"true","chf":"true","history_hydronephrosis":"false","nephrotoxins":"true","obstruction_diagnosis":"false","prerenal_aki":"true","recurrent_uti":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/hiri-msm":{"get":{"description":"Sum the published Smith 2012 seven-item HIV incidence risk index for MSM (age plus six prior-6-month behaviors, 0–47) and return at_or_above_10 when the total is ≥10.\n\nWhen an agent needs the published Smith 2012 point total from caller-assigned counts and must not invent a diagnosis, a PrEP order, or a sexual history.\n\nNot a medical device. Not a diagnosis of HIV infection and not a PrEP, nPEP, or antiretroviral order.\n\nSmith 2012 seven-item index only (age + six 6-month behaviors). Range 0–47. Published screening cutoff score ≥10. Not Menza 2009 and not the SexPro model.\n\nCounts and flags are caller-assigned. magent does not take a sexual history or a substance-use history. No race field.\n\nKeeps the HIV-positive partner count. Not a simplified 6-input website variant that drops that item or changes the published bands.\n\nAge is 18–120. The paper listed <18 as 0 points; magent rejects age outside 18–120 as invalid_age. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Smith 2012: 18-28 scores 8; 29-40 scores 5; 41-48 scores 2; ≥49 scores 0. Caller-assigned. magent does not take a sexual history.","required":true,"schema":{"type":"integer"},"example":"55"},{"in":"query","name":"male_sex_partners_6mo","description":"Caller-assigned number of male sex partners in the prior 6 months (0-500). Smith 2012: 0-5 scores 0; 6-10 scores 4; ≥11 scores 7.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"hiv_positive_male_partners_6mo","description":"Caller-assigned number of HIV-positive male sex partners in the prior 6 months (0-500). Smith 2012: 0 scores 0; 1 scores 4; ≥2 scores 8. Do not drop this item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"unprotected_receptive_anal_6mo","description":"Caller-assigned times the person had unprotected receptive anal sex with a male partner of any HIV status in the prior 6 months (0-500). Smith 2012: 0 scores 0; ≥1 scores 10.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"insertive_anal_hiv_positive_6mo","description":"Caller-assigned times the person had insertive anal sex with an HIV-positive male partner in the prior 6 months (0-500). Smith 2012: 0-4 scores 0; ≥5 scores 6.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"poppers_6mo","description":"Caller-assigned popper (amyl nitrate) use in the prior 6 months (Smith 2012). true or false. magent does not take a substance-use history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"amphetamines_6mo","description":"Caller-assigned amphetamine use in the prior 6 months (Smith 2012). true or false. magent does not take a substance-use history.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"HIRI-MSM","operationId":"get_api_calc_hiri_msm","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, at_or_above_10, age_years, male_sex_partners_6mo, hiv_positive_male_partners_6mo, unprotected_receptive_anal_6mo, insertive_anal_hiv_positive_6mo, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex_partner_count: male_sex_partners_6mo must be an integer from 0 to 500 (Smith 2012 HIRI-MSM male partners in the prior 6 months). Returned before settlement; you are not charged.; invalid_anal_act_count: unprotected_receptive_anal_6mo and insertive_anal_hiv_positive_6mo must each be an integer from 0 to 500 (Smith 2012 HIRI-MSM act counts in the prior 6 months). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hiri-msm"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HIRI-MSM (bulk)","operationId":"post_api_calc_hiri_msm","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex_partner_count: male_sex_partners_6mo must be an integer from 0 to 500 (Smith 2012 HIRI-MSM male partners in the prior 6 months). Returned before settlement; you are not charged.; invalid_anal_act_count: unprotected_receptive_anal_6mo and insertive_anal_hiv_positive_6mo must each be an integer from 0 to 500 (Smith 2012 HIRI-MSM act counts in the prior 6 months). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hiri-msm"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"55","amphetamines_6mo":"false","hiv_positive_male_partners_6mo":"0","insertive_anal_hiv_positive_6mo":"0","male_sex_partners_6mo":"0","poppers_6mo":"false","unprotected_receptive_anal_6mo":"0"},{"age":"55","amphetamines_6mo":"false","hiv_positive_male_partners_6mo":"0","insertive_anal_hiv_positive_6mo":"0","male_sex_partners_6mo":"0","poppers_6mo":"false","unprotected_receptive_anal_6mo":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/safe":{"get":{"description":"Compute the Sripongpun 2023 steatosis-associated fibrosis estimator (SAFE) from age, caller-supplied BMI, diabetes, AST, ALT, globulin in g/dL, and platelets.\n\nWhen an agent needs published Sripongpun 2023 SAFE arithmetic and must not invent FIB-4, NAFLD fibrosis, or BARD cutoffs or a biopsy result.\n\nNot a medical device. Not a diagnosis and not a biopsy or fibrosis stage. SAFE bands are published cut-points, not histology.\n\nBMI is caller-supplied. magent does not compute BMI from height and weight in this tool. BMI above 40 is set to 40 in the formula only (Sripongpun 2023).\n\nSripongpun 2023 SAFE only. Not FIB-4, not the NAFLD fibrosis score, and not the BARD score.\n\nGlobulin must be in g/dL (total protein minus albumin). magent does not convert g/L or split protein and albumin. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120).","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"bmi_kg_m2","description":"Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI from height and weight. Values above 40 are set to 40 in the formula only (Sripongpun 2023); the caller BMI is still echoed.","required":true,"schema":{"type":"number"},"example":"30"},{"in":"query","name":"diabetes","description":"Diabetes as assigned by the caller (Sripongpun 2023; 0 or 1 in the equation). true or false. magent does not diagnose diabetes.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ast_u_l","description":"Aspartate aminotransferase in U/L (1-10000).","required":true,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"alt_u_l","description":"Alanine aminotransferase in U/L (1-10000).","required":true,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"globulin_g_dl","description":"Globulin in g/dL (0.5-8.0). Total protein minus albumin. magent does not convert g/L or split protein and albumin.","required":true,"schema":{"type":"number"},"example":"3"},{"in":"query","name":"platelets_10e9_l","description":"Platelet count in 10^9/L (1-2000).","required":true,"schema":{"type":"number"},"example":"200"}],"summary":"SAFE score","operationId":"get_api_calc_safe","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, bmi_kg_m2, bmi_used, diabetes, ast_u_l, alt_u_l, globulin_g_dl, platelets_10e9_l, safe, safe_band, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_ast: ast_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.; invalid_alt: alt_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.; invalid_globulin: globulin_g_dl must be a number from 0.5 to 8.0 (g/dL; total protein minus albumin). Returned before settlement; you are not charged.; invalid_platelets: platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/safe"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SAFE score (bulk)","operationId":"post_api_calc_safe","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_ast: ast_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.; invalid_alt: alt_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.; invalid_globulin: globulin_g_dl must be a number from 0.5 to 8.0 (g/dL; total protein minus albumin). Returned before settlement; you are not charged.; invalid_platelets: platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/safe"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","alt_u_l":"40","ast_u_l":"40","bmi_kg_m2":"30","diabetes":"false","globulin_g_dl":"3","platelets_10e9_l":"200"},{"age":"50","alt_u_l":"40","ast_u_l":"40","bmi_kg_m2":"30","diabetes":"false","globulin_g_dl":"3","platelets_10e9_l":"200"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/fena":{"get":{"description":"Compute fractional excretion of sodium from plasma and urine sodium and creatinine using Espinel 1976.\n\nWhen an agent needs Espinel FENa arithmetic and must not invent a prerenal versus ATN cutoff.\n\nNot a diagnosis and not a treatment order. Espinel 1976 strata were described in oliguric acute renal failure; FENa <1 prerenal and FENa >3 ATN are paper cutoffs, not an AKI taxonomy.\n\nDiuretics, CKD, and non-oliguric injury confound FENa. This tool does not adjust for those states. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sodium_mmol_l","description":"Plasma or serum sodium in mmol/L (110-160).","required":true,"schema":{"type":"number"},"example":"140"},{"in":"query","name":"creatinine_mg_dl","description":"Plasma creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l.","required":false,"schema":{"type":"number"},"example":"2.0"},{"in":"query","name":"creatinine_umol_l","description":"Plasma creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42.","required":false,"schema":{"type":"number"},"example":"176.84"},{"in":"query","name":"urine_sodium_mmol_l","description":"Urine sodium in mmol/L (1-300).","required":true,"schema":{"type":"number"},"example":"20"},{"in":"query","name":"urine_creatinine_mg_dl","description":"Urine creatinine in mg/dL (1-500). Provide this or urine_creatinine_umol_l.","required":false,"schema":{"type":"number"},"example":"100"},{"in":"query","name":"urine_creatinine_umol_l","description":"Urine creatinine in µmol/L (88-44210). Converted as mg/dL = µmol/L / 88.42.","required":false,"schema":{"type":"number"},"example":"8842"}],"summary":"FENa","operationId":"get_api_calc_fena","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, sodium_mmol_l, creatinine_mg_dl, urine_sodium_mmol_l, urine_creatinine_mg_dl, fena_percent, espinel_stratum, citation, disclaimer."},"400":{"description":"invalid_sodium: sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_urine_sodium: urine_sodium_mmol_l must be a number from 1 to 300. Returned before settlement; you are not charged.; invalid_urine_creatinine: urine_creatinine_mg_dl (1-500) or urine_creatinine_umol_l (88-44210) is required. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/fena"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"FENa (bulk)","operationId":"post_api_calc_fena","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_sodium: sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_urine_sodium: urine_sodium_mmol_l must be a number from 1 to 300. Returned before settlement; you are not charged.; invalid_urine_creatinine: urine_creatinine_mg_dl (1-500) or urine_creatinine_umol_l (88-44210) is required. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/fena"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"creatinine_mg_dl":"2.0","sodium_mmol_l":"140","urine_creatinine_mg_dl":"100","urine_sodium_mmol_l":"20"},{"creatinine_mg_dl":"2.0","sodium_mmol_l":"140","urine_creatinine_mg_dl":"100","urine_sodium_mmol_l":"20"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pbsc-collection":{"get":{"description":"Compute Rosenbaum 2012 predicted daily CD34+ yield (×10^6 per kg) from pre-apheresis peripheral blood CD34+ cells/µL, processed blood volume, and recipient or patient weight, using that paper's adjusted collection efficiency of 30%.\n\nWhen an agent needs the published Rosenbaum 2012 prediction and must not invent a collection-efficiency term, write an apheresis order, or run a collection.\n\nNot a medical device. magent does not run the collection, write an apheresis order, choose a machine protocol, or set a collection goal.\n\nUses only the Rosenbaum 2012 adjusted collection efficiency of 30%. Later papers that substitute a different constant are not this tool.\n\nCD34, processed-volume, and weight clamps are fail-closed magent ranges (positive, clinically plausible). Rosenbaum 2012 does not print those input bands.\n\nNot Kaplan plasma volume, Ganzoni iron deficit, CCI, or a plasma dose. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"peripheral_cd34_per_ul","description":"Pre-apheresis peripheral blood CD34+ cells per µL (0.1-1000, magent clamp). Rosenbaum 2012 uses this count with the printed 30% efficiency. magent does not assay CD34.","required":true,"schema":{"type":"number"},"example":40},{"in":"query","name":"processed_volume_l","description":"Processed blood volume in liters (1-40, magent clamp). Rosenbaum 2012 validated 30 L large-volume leukapheresis and smaller non-LVL collections. magent does not set a processed volume.","required":true,"schema":{"type":"number"},"example":15},{"in":"query","name":"weight_kg","description":"Recipient or patient weight in kilograms. Provide weight_kg or weight_lb.","required":false,"schema":{"type":"number"},"example":70},{"in":"query","name":"weight_lb","description":"Recipient or patient weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"schema":{"type":"number"},"example":154.32}],"summary":"predicted CD34+ leukapheresis yield","operationId":"get_api_calc_pbsc_collection","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, peripheral_cd34_per_ul, processed_volume_l, weight_kg, collection_efficiency, predicted_cd34_e6_per_kg, citation, disclaimer."},"400":{"description":"invalid_pbsc_collection: Rosenbaum 2012 CD34 yield inputs must match that paper's peripheral CD34 count, processed volume, collection-efficiency term, and recipient weight. Returned before settlement; you are not charged.; invalid_cd34_count: peripheral_cd34_per_ul must be a positive number in the range printed for Rosenbaum 2012. Returned before settlement; you are not charged.; invalid_processed_volume: processed_volume_l must be a positive number in the range used by Rosenbaum 2012. Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pbsc-collection"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"predicted CD34+ leukapheresis yield (bulk)","operationId":"post_api_calc_pbsc_collection","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pbsc_collection: Rosenbaum 2012 CD34 yield inputs must match that paper's peripheral CD34 count, processed volume, collection-efficiency term, and recipient weight. Returned before settlement; you are not charged.; invalid_cd34_count: peripheral_cd34_per_ul must be a positive number in the range printed for Rosenbaum 2012. Returned before settlement; you are not charged.; invalid_processed_volume: processed_volume_l must be a positive number in the range used by Rosenbaum 2012. Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pbsc-collection"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"peripheral_cd34_per_ul":"40","processed_volume_l":"15","weight_kg":"70"},{"peripheral_cd34_per_ul":"40","processed_volume_l":"15","weight_kg":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/setscore":{"get":{"description":"Sum the fifteen Schönenberger 2016 SETscore items from caller-assigned flags and return whether the total is elevated (score ≥ 8).\n\nWhen an agent already has the fifteen Schönenberger 2016 Table 1 items assigned as present or absent and needs the published 0–48 total and the 2016 ROC cut-off of 8, not a tracheostomy order, NIHSS total, APACHE II computation, or SETPOINT2 enrollment threshold.\n\nNot a medical device. Not a tracheostomy order, timing decision, or airway procedure. magent does not examine the patient, read imaging, or compute APACHE II, lung injury score, or PaO2/FiO2.\n\nEach of the 15 items is a caller-assigned boolean from Schönenberger 2016 Table 1. magent does not invent extra weights or probabilities.\n\nelevated and setscore_ge_8 are true iff score ≥ 8, the 2016 ROC cut-off for prolonged NICU stay, ventilation time, and tracheostomy need. This is not the SETPOINT2 enrollment threshold of >10 and not NIHSS. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"dysphagia","description":"Dysphagia (Schönenberger 2016 Table 1, +4 if true). true or false as assigned by the caller. magent does not examine swallow.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"observed_aspiration","description":"Observed aspiration (Schönenberger 2016 Table 1, +3 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"gcs_lt_10","description":"GCS on admission <10 (Schönenberger 2016 Table 1, +3 if true). true or false as assigned by the caller. magent does not compute GCS.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"brainstem_lesion","description":"Brainstem lesion (Schönenberger 2016 Table 1, +4 if true). true or false as assigned by the caller. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"space_occupying_cerebellar","description":"Space-occupying cerebellar lesion (Schönenberger 2016 Table 1, +3 if true). true or false as assigned by the caller. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"mca_infarct_gt_two_thirds","description":"Ischemic infarct >2/3 MCA territory (Schönenberger 2016 Table 1, +4 if true). true or false as assigned by the caller. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ich_volume_gt_25_ml","description":"ICH volume >25 mL (Schönenberger 2016 Table 1, +4 if true). true or false as assigned by the caller. magent does not measure hematoma volume.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"diffuse_lesion","description":"Diffuse lesion (Schönenberger 2016 Table 1, +3 if true). true or false as assigned by the caller. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hydrocephalus","description":"Hydrocephalus (Schönenberger 2016 Table 1, +4 if true). true or false as assigned by the caller. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"neurosurgical_intervention","description":"(Neuro)surgical intervention (Schönenberger 2016 Table 1, +2 if true). true or false as assigned by the caller. magent does not record procedures.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"additional_respiratory_disease","description":"Additional respiratory disease (Schönenberger 2016 Table 1, +3 if true). true or false as assigned by the caller. magent does not diagnose lung disease.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pao2_fio2_lt_150","description":"PaO2/FiO2 <150 (Schönenberger 2016 Table 1, +2 if true). true or false as assigned by the caller. magent does not compute the P/F ratio.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"apache_ii_gt_20","description":"APACHE II acute physiology score >20 (Schönenberger 2016 Table 1, +4 if true). true or false as assigned by the caller. magent does not compute APACHE II.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"lung_injury_score_gt_1","description":"Lung injury score >1 (Schönenberger 2016 Table 1, +2 if true). true or false as assigned by the caller. magent does not compute LIS.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"sepsis","description":"Sepsis (Schönenberger 2016 Table 1, +3 if true). true or false as assigned by the caller. magent does not diagnose sepsis.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"SETscore","operationId":"get_api_calc_setscore","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, elevated, setscore_ge_8, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/setscore"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SETscore (bulk)","operationId":"post_api_calc_setscore","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/setscore"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"additional_respiratory_disease":"false","apache_ii_gt_20":"false","brainstem_lesion":"false","diffuse_lesion":"false","dysphagia":"false","gcs_lt_10":"false","hydrocephalus":"false","ich_volume_gt_25_ml":"false","lung_injury_score_gt_1":"false","mca_infarct_gt_two_thirds":"false","neurosurgical_intervention":"false","observed_aspiration":"false","pao2_fio2_lt_150":"false","sepsis":"false","space_occupying_cerebellar":"false"},{"additional_respiratory_disease":"false","apache_ii_gt_20":"false","brainstem_lesion":"false","diffuse_lesion":"false","dysphagia":"false","gcs_lt_10":"false","hydrocephalus":"false","ich_volume_gt_25_ml":"false","lung_injury_score_gt_1":"false","mca_infarct_gt_two_thirds":"false","neurosurgical_intervention":"false","observed_aspiration":"false","pao2_fio2_lt_150":"false","sepsis":"false","space_occupying_cerebellar":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/hfa-icos-anthracycline":{"get":{"description":"Apply the Lyon 2020 HFA-ICOS anthracycline baseline cardiovascular risk proforma from caller-assigned age, LVEF, and published Very high, High, Medium 2, and Medium 1 factors. Returns risk_level, medium_points, and the paper's expert-opinion cardiotoxicity_guide.\n\nWhen an agent already has the published anthracycline-table assignments (age, LVEF, and yes/no factors) and needs the HFA-ICOS class. magent does not examine the patient, read imaging, assay labs, or compute BMI.\n\nNot a medical device and not a diagnosis or treatment order.\n\nmagent does not examine the patient or read imaging. Age, LVEF, and yes/no factors are caller-assigned.\n\nClassification follows Lyon 2020: very high if any Very high factor; else high if any High factor or medium_points >=5; else medium if medium_points 2-4; else low (no factors or one Medium 1).\n\nmedium_points sums only Medium 1 (1) and Medium 2 (2). High and Very high do not add to medium_points.\n\nAge bands are mutually exclusive (highest matching): >=80 High; 65-79 Medium 2; <65 none. LVEF: <50 High; 50-54 Medium 2; >=55 none.\n\nTroponin, BNP or NT-proBNP, hypertension, diabetes, CKD, and obesity are caller-assigned from the published local-ULN, blood-pressure, HbA1c, eGFR, and BMI >30 cutoffs. magent does not assay labs or compute BMI.\n\ncardiotoxicity_guide is the paper's expert-opinion guide (low <2%, medium 2-9%, high 10-19%, very high >=20%), not a validated absolute risk.\n\nNot a chemotherapy, imaging, or cardioprotective-drug order. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_years","description":"Age in years (18-100, integer). Lyon 2020: >=80 High; 65-79 Medium 2; <65 no age factor. Highest matching band only.","required":true,"schema":{"type":"integer"},"example":50},{"in":"query","name":"lvef_percent","description":"LVEF percent (10-80, integer). Lyon 2020: <50 High; 50-54 Medium 2; >=55 no LVEF factor. Highest matching printed band only. magent does not read imaging.","required":true,"schema":{"type":"integer"},"example":60},{"in":"query","name":"heart_failure_or_cardiomyopathy","description":"Heart failure or cardiomyopathy (Lyon 2020 Very high). true or false as assigned by the caller. magent does not examine the patient or read imaging.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"severe_valvular_heart_disease","description":"Severe valvular heart disease (Lyon 2020 High). true or false as assigned by the caller. magent does not examine the patient or read imaging.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"mi_or_coronary_revascularization","description":"Myocardial infarction or previous coronary revascularization (PCI or CABG) (Lyon 2020 High). true or false as assigned by the caller. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"stable_angina","description":"Stable angina (Lyon 2020 High). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"previous_anthracycline","description":"Previous anthracycline exposure (Lyon 2020 High). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"prior_left_chest_or_mediastinal_rt","description":"Prior radiotherapy to the left chest or mediastinum (Lyon 2020 High). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"elevated_troponin","description":"Baseline troponin above the local laboratory ULN as assigned by the caller (Lyon 2020 Medium 1). true or false. magent does not assay troponin.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"elevated_bnp","description":"Baseline BNP or NT-proBNP above the local laboratory ULN as assigned by the caller (Lyon 2020 Medium 1). true or false. magent does not assay natriuretic peptides.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"hypertension","description":"Hypertension (SBP >140 mmHg or DBP >90 mmHg or on treatment) as assigned by the caller (Lyon 2020 Medium 1). true or false. magent does not measure blood pressure.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"diabetes","description":"Diabetes mellitus (HbA1c >7.0% or >53 mmol/mol or on treatment) as assigned by the caller (Lyon 2020 Medium 1). true or false. magent does not assay HbA1c.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"ckd","description":"Chronic kidney disease (eGFR <60 mL/min/1.73 m2) as assigned by the caller (Lyon 2020 Medium 1). true or false. magent does not compute eGFR.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"previous_non_anthracycline_chemo","description":"Previous non-anthracycline-based chemotherapy (Lyon 2020 Medium 1). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"current_or_significant_smoker","description":"Current smoker or significant smoking history (Lyon 2020 Medium 1). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"obesity","description":"Obesity (BMI >30 kg/m2) as assigned by the caller (Lyon 2020 Medium 1). true or false. magent does not compute BMI.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"HFA-ICOS anthracycline baseline CV risk","operationId":"get_api_calc_hfa_icos_anthracycline","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, lvef_percent, medium_points, risk_level, cardiotoxicity_guide, components, citation, disclaimer."},"400":{"description":"invalid_hfa_icos_anthracycline: Lyon 2020 HFA-ICOS anthracycline inputs must match that table's age, LVEF, and yes/no factors. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hfa-icos-anthracycline"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HFA-ICOS anthracycline baseline CV risk (bulk)","operationId":"post_api_calc_hfa_icos_anthracycline","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_hfa_icos_anthracycline: Lyon 2020 HFA-ICOS anthracycline inputs must match that table's age, LVEF, and yes/no factors. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hfa-icos-anthracycline"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_years":"50","ckd":"false","current_or_significant_smoker":"false","diabetes":"false","elevated_bnp":"false","elevated_troponin":"false","heart_failure_or_cardiomyopathy":"false","hypertension":"false","lvef_percent":"60","mi_or_coronary_revascularization":"false","obesity":"false","previous_anthracycline":"false","previous_non_anthracycline_chemo":"false","prior_left_chest_or_mediastinal_rt":"false","severe_valvular_heart_disease":"false","stable_angina":"false"},{"age_years":"50","ckd":"false","current_or_significant_smoker":"false","diabetes":"false","elevated_bnp":"false","elevated_troponin":"false","heart_failure_or_cardiomyopathy":"false","hypertension":"false","lvef_percent":"60","mi_or_coronary_revascularization":"false","obesity":"false","previous_anthracycline":"false","previous_non_anthracycline_chemo":"false","prior_left_chest_or_mediastinal_rt":"false","severe_valvular_heart_disease":"false","stable_angina":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pedis":{"get":{"description":"Apply Schaper 2004 IWGDF PEDIS research grades and return the five independent grades (perfusion 1-3, extent 1-3, depth 1-3, infection 1-4, sensation 1-2) plus a pedis label like 1-1-1-1-1.\n\nWhen an agent already has caller-assigned PEDIS grades for a diabetic foot ulcer as in Schaper 2004 and needs the published five-grade label. magent does not measure the ulcer, diagnose PAD, or probe bone.\n\nNot a medical device.\n\nNot IWGDF treatment guidance. This tool is the Schaper 2004 research classification only.\n\nmagent does not measure the ulcer or diagnose PAD. The caller assigns perfusion, extent, depth, infection, and sensation.\n\nmagent does not probe bone. Depth grade 3 (bone and/or joint) is caller-assigned.\n\nThe five grades are independent. This tool does not return a summed PEDIS total or extra bands. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"perfusion","description":"Perfusion grade 1-3 as assigned by the caller (Schaper 2004): 1 no PAD symptoms/signs; 2 PAD without critical limb ischemia; 3 critical limb ischemia. magent does not diagnose PAD or measure pulses or pressures.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"extent","description":"Extent (ulcer area) grade 1-3 as assigned by the caller (Schaper 2004): 1 <1 cm2; 2 1-3 cm2; 3 >3 cm2. magent does not measure the ulcer.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"depth","description":"Depth grade 1-3 as assigned by the caller (Schaper 2004): 1 superficial (not through dermis to subcutaneous); 2 to subcutaneous/fascia/muscle/tendon (not bone/joint); 3 bone and/or joint. magent does not probe bone.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"infection","description":"Infection grade 1-4 as assigned by the caller (Schaper 2004): 1 none; 2 skin/subcutaneous only; 3 deeper than skin (abscess, osteomyelitis, septic arthritis, fasciitis) without SIRS; 4 infection with SIRS. magent does not diagnose infection.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"sensation","description":"Sensation grade 1-2 as assigned by the caller (Schaper 2004): 1 no loss of protective sensation; 2 loss of protective sensation. magent does not test sensation.","required":true,"schema":{"type":"integer"},"example":"1"}],"summary":"PEDIS","operationId":"get_api_calc_pedis","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, perfusion, extent, depth, infection, sensation, pedis, criteria, citation, disclaimer."},"400":{"description":"invalid_pedis: perfusion 1-3, extent 1-3, depth 1-3, infection 1-4, and sensation 1-2 (Schaper 2004 IWGDF PEDIS grades). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pedis"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PEDIS (bulk)","operationId":"post_api_calc_pedis","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pedis: perfusion 1-3, extent 1-3, depth 1-3, infection 1-4, and sensation 1-2 (Schaper 2004 IWGDF PEDIS grades). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pedis"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"depth":"1","extent":"1","infection":"1","perfusion":"1","sensation":"1"},{"depth":"1","extent":"1","infection":"1","perfusion":"1","sensation":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/astct-icans":{"get":{"description":"Apply Lee 2019 Table 6 adult ASTCT ICANS consensus grading and return the overall grade (0-4) as the most severe of the ICE, depressed LOC, seizure, motor, and ICP/edema domains, with icans true when grade is 1 or greater.\n\nWhen an agent already has a caller-assigned ICE total (0-10), depressed LOC category, seizure category, deep focal motor-weakness flag, and ICP/edema category, and needs the published adult ICANS grade. magent does not perform ICE testing, examine the patient, interpret EEG, or read imaging. Not CRS and not pediatric CAPD.\n\nNot a medical device and not a diagnosis of ICANS.\n\nAdult Lee 2019 Table 6 only. Not pediatric CAPD. Not ASTCT CRS (Lee 2019 Table 1).\n\nice_score is the caller-assigned ICE total (0-10). magent does not perform orientation, naming, following commands, writing, or attention testing and is not the 10-item ICE calculator.\n\nloc, seizure, motor_weakness, and icp are caller-assigned. magent does not examine the patient, interpret EEG, or read neuroimaging.\n\nGrade uses only findings not attributable to another cause; magent does not determine attribution.\n\nMotor weakness is published as N/A for grades 1-3; true maps to domain grade 4 (deep focal motor weakness such as hemiparesis or paraparesis). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ice_score","description":"Caller-assigned Immune Effector Cell-Associated Encephalopathy (ICE) total 0-10 (Lee 2019 Table 6). Domain: 10 → grade 0; 7-9 → 1; 3-6 → 2; 0-2 → 3. ICE 0 is grade 3 if awake (loc is not unarousable) and grade 4 if unarousable/unable to perform ICE. magent does not score orientation, naming, following commands, writing, or attention and is not the 10-item ICE calculator.","required":true,"schema":{"type":"integer"},"example":"8"},{"in":"query","name":"loc","description":"Caller-assigned depressed level of consciousness (Lee 2019 Table 6): none (no depressed LOC, domain 0); spontaneous (awakens spontaneously, 1); voice (awakens to voice, 2); tactile (awakens only to tactile stimulus, 3); unarousable (unarousable or requires vigorous or repetitive tactile stimuli; stupor or coma, 4). Case-insensitive. magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["none","spontaneous","voice","tactile","unarousable"]},"example":"none"},{"in":"query","name":"seizure","description":"Caller-assigned seizure (Lee 2019 Table 6): none (domain 0); rapidly_resolving (any clinical seizure, focal or generalized, that resolves rapidly, or nonconvulsive seizures on EEG that resolve with intervention, 3); life_threatening (life-threatening prolonged seizure >5 min or repetitive clinical or electrical seizures without return to baseline, 4). Case-insensitive. magent does not interpret EEG.","required":true,"schema":{"type":"string","enum":["none","rapidly_resolving","life_threatening"]},"example":"none"},{"in":"query","name":"motor_weakness","description":"Deep focal motor weakness such as hemiparesis or paraparesis as assigned by the caller (Lee 2019 Table 6). true maps to domain grade 4. false maps to 0. Motor is N/A for grades 1-3. true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"icp","description":"Caller-assigned raised intracranial pressure / cerebral edema (Lee 2019 Table 6): none (domain 0); focal_edema (focal/local edema on neuroimaging, 3); diffuse_edema (diffuse cerebral edema on imaging, or decerebrate/decorticate posturing, cranial nerve VI palsy, papilledema, or Cushing triad, 4). Case-insensitive. magent does not read imaging or examine the patient.","required":true,"schema":{"type":"string","enum":["none","focal_edema","diffuse_edema"]},"example":"none"}],"summary":"ASTCT ICANS","operationId":"get_api_calc_astct_icans","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, ice_score, loc, seizure, motor_weakness, icp, ice_grade, loc_grade, seizure_grade, motor_grade, icp_grade, grade, icans, components, citation, disclaimer."},"400":{"description":"invalid_astct_icans: ice_score must be an integer 0–10; loc none, spontaneous, voice, tactile, or unarousable; seizure none, rapidly_resolving, or life_threatening; icp none, focal_edema, or diffuse_edema (Lee 2019 ASTCT ICANS Table 6). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/astct-icans"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ASTCT ICANS (bulk)","operationId":"post_api_calc_astct_icans","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_astct_icans: ice_score must be an integer 0–10; loc none, spontaneous, voice, tactile, or unarousable; seizure none, rapidly_resolving, or life_threatening; icp none, focal_edema, or diffuse_edema (Lee 2019 ASTCT ICANS Table 6). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/astct-icans"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ice_score":"8","icp":"none","loc":"none","motor_weakness":"false","seizure":"none"},{"ice_score":"8","icp":"none","loc":"none","motor_weakness":"false","seizure":"none"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/urine-pcr":{"get":{"description":"Compute the Ginsberg 1983 urine protein/creatinine ratio (mg/mg) from a single-void urine protein and urine creatinine, and return that rounded ratio as estimated_g_day (numeric estimate of 24-h protein g/day).\n\nWhen an agent has a single-void urine protein and urine creatinine and must not invent a 24-h collection or an albumin/creatinine (ACR) result.\n\nNot a medical device. Ginsberg 1983 bands are published protein/creatinine cut-points (ratio <0.2 within normal limits; ratio >3.5 nephrotic-range), not a diagnosis of nephrotic syndrome.\n\nmagent does not collect urine. This is not a 24-hour urine collection. estimated_g_day equals the rounded ratio as a numeric estimate of 24-h protein g/day from Ginsberg 1983, not a measured collection.\n\nNot ACR (albumin/creatinine). This calculator uses total urine protein, not albumin.\n\nExact ratios 0.2 and 3.5 are the mid band (the paper says less than 0.2 and more than 3.5). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"urine_protein_mg_dl","description":"Urine total protein in mg/dL (0.1-2000). Total protein, not albumin.","required":true,"schema":{"type":"number"},"example":"100"},{"in":"query","name":"urine_creatinine_mg_dl","description":"Urine creatinine in mg/dL (1-500). Provide this or urine_creatinine_umol_l.","required":false,"schema":{"type":"number"},"example":"100"},{"in":"query","name":"urine_creatinine_umol_l","description":"Urine creatinine in µmol/L (88-44210). Converted as mg/dL = µmol/L / 88.42.","required":false,"schema":{"type":"number"},"example":"8842"}],"summary":"Urine PCR","operationId":"get_api_calc_urine_pcr","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, urine_protein_mg_dl, urine_creatinine_mg_dl, protein_creatinine_ratio, estimated_g_day, ginsberg_band, citation, disclaimer."},"400":{"description":"invalid_urine_pcr: urine_protein_mg_dl must be a number from 0.1 to 2000 (Ginsberg 1983 protein/creatinine ratio). Returned before settlement; you are not charged.; invalid_urine_creatinine: urine_creatinine_mg_dl (1-500) or urine_creatinine_umol_l (88-44210) is required. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/urine-pcr"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Urine PCR (bulk)","operationId":"post_api_calc_urine_pcr","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_urine_pcr: urine_protein_mg_dl must be a number from 0.1 to 2000 (Ginsberg 1983 protein/creatinine ratio). Returned before settlement; you are not charged.; invalid_urine_creatinine: urine_creatinine_mg_dl (1-500) or urine_creatinine_umol_l (88-44210) is required. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/urine-pcr"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"urine_creatinine_mg_dl":"100","urine_protein_mg_dl":"100"},{"urine_creatinine_mg_dl":"100","urine_protein_mg_dl":"100"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/care":{"get":{"description":"Return the caller-assigned Cardiac Anesthesia Risk Evaluation (CARE) class 1-5 with optional emergency suffix E for classes 3-5 and Dupuis 2001 Table 4 mortality and morbidity percents.\n\nWhen an agent already has a Dupuis 2001 CARE class 1-5 and whether the case is an emergency requiring immediate surgery, and needs the canonical label (e.g. 1 or 3E). magent does not examine the patient or assign the class. Not an anesthetic plan and not Gupta MICA.\n\nNot a medical device. Not an anesthetic plan or surgical booking.\n\nThe caller assigns CARE class 1-5 and the emergency flag. magent does not examine the patient. Footnote definitions of controlled or uncontrolled medical problems and complex surgery in Dupuis 2001 Table 1 are not extra scored items.\n\nEmergency E applies only to classes 3-5 (Dupuis 2001). Class 1 or 2 with emergency true is rejected. Unstable conditions needing surgery within 24 h but not immediately are uncontrolled medical problems, not E.\n\nMortality and morbidity percents are Dupuis 2001 Table 4 logistic-regression probabilities from the Ottawa Heart Institute reference population (n=2000), not individual prognosis. Not Parsonnet, EuroSCORE, or Gupta MICA. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"care_class","description":"Dupuis 2001 CARE class 1-5 as assigned by the caller (1 stable cardiac disease, no other medical problem, noncomplex surgery; 2 stable cardiac disease, one or more controlled medical problems, noncomplex surgery; 3 any uncontrolled medical problem or complex surgery; 4 uncontrolled medical problem and complex surgery; 5 chronic or advanced cardiac disease, surgery as last hope). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"emergency","description":"true appends E for emergency surgery as soon as the diagnosis is made and an operating room is available (Dupuis 2001). Required. E applies only to classes 3-5 (labels 3E, 4E, 5E). Class 1 or 2 with emergency true is rejected. Unstable conditions needing surgery within 24 h but not immediately are uncontrolled medical problems, not E. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"CARE","operationId":"get_api_calc_care","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, care_class, emergency, care_label, description, mortality_percent, morbidity_percent, components, citation, disclaimer."},"400":{"description":"invalid_care: CARE class must be a caller-assigned integer 1-5; emergency E applies only to classes 3-5 (Dupuis 2001). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/care"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CARE (bulk)","operationId":"post_api_calc_care","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_care: CARE class must be a caller-assigned integer 1-5; emergency E applies only to classes 3-5 (Dupuis 2001). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/care"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"care_class":"1","emergency":"false"},{"care_class":"1","emergency":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/itas2010":{"get":{"description":"Sum Misra 2013 ITAS2010 weights from 44 caller-assigned clinical items (new or worsening within 3 months and ascribed to active vasculitis) and return the integer score (max 51) plus active_disease (true iff score ≥ 2). Not a diagnosis.\n\nWhen an agent already has the 44 Misra 2013 ITAS2010 items assigned as true or false and needs that paper's weighted total and ≥2 active-disease cut. magent does not examine the patient, score ITAS-A (ESR/CRP), read angiography, or diagnose Takayasu arteritis.\n\nNot a medical device and not a diagnosis of Takayasu arteritis or a treatment order.\n\nEach of the 44 items is caller-assigned true only if new or worsening within 3 months and ascribed to active vasculitis. magent does not examine the patient, auscultate bruits, palpate pulses, measure blood pressure, or read imaging.\n\nSeven items score 2 when present (diastolic BP >90 mmHg, stroke, bruits, pulse inequality, pulse loss, claudication, carotidodynia). The other 37 items score 1. Parent items and named sites are independent caller flags; magent does not infer a parent from a site.\n\nActive disease is the published ITAS2010 cut: active_disease true iff score ≥ 2. magent does not invent mild, moderate, or severe bands.\n\nThis is the Misra 2013 clinical ITAS2010 integer only (max 51). It does not add ITAS-A ESR/CRP points. Angiography is not in the score. Does not invent extra BVAS items. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"malaise_weight_loss","description":"Misra 2013 ITAS2010: malaise or weight loss >2 kg, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"myalgia_arthralgia_arthritis","description":"Misra 2013 ITAS2010: myalgia, arthralgia, or arthritis, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"headache","description":"Misra 2013 ITAS2010: headache, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"severe_abdominal_pain","description":"Misra 2013 ITAS2010: severe abdominal pain, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"abortions","description":"Misra 2013 ITAS2010: abortion (genitourinary item), new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"diastolic_hypertension","description":"Misra 2013 ITAS2010: diastolic blood pressure >90 mmHg, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. Weighted item (scores 2). true scores 2. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"systolic_hypertension","description":"Misra 2013 ITAS2010: systolic blood pressure >140 mmHg, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"stroke","description":"Misra 2013 ITAS2010: stroke, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. Weighted item (scores 2). true scores 2. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"seizures","description":"Misra 2013 ITAS2010: seizures (not hypertensive), new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"syncope","description":"Misra 2013 ITAS2010: syncope, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"vertigo_dizziness","description":"Misra 2013 ITAS2010: vertigo or dizziness, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bruits","description":"Misra 2013 ITAS2010: bruits (weighted parent item), new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. Weighted item (scores 2). true scores 2. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bruit_right_carotid","description":"Misra 2013 ITAS2010: right carotid bruit, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bruit_left_carotid","description":"Misra 2013 ITAS2010: left carotid bruit, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bruit_right_subclavian","description":"Misra 2013 ITAS2010: right subclavian bruit, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bruit_left_subclavian","description":"Misra 2013 ITAS2010: left subclavian bruit, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bruit_right_renal","description":"Misra 2013 ITAS2010: right renal bruit, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bruit_left_renal","description":"Misra 2013 ITAS2010: left renal bruit, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulse_inequality","description":"Misra 2013 ITAS2010: pulse inequality, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. Weighted item (scores 2). true scores 2. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bp_inequality","description":"Misra 2013 ITAS2010: blood-pressure inequality, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulse_loss","description":"Misra 2013 ITAS2010: new loss of pulses (weighted parent item), new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. Weighted item (scores 2). true scores 2. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulse_loss_right_carotid","description":"Misra 2013 ITAS2010: new loss of the right carotid pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulse_loss_left_carotid","description":"Misra 2013 ITAS2010: new loss of the left carotid pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulse_loss_right_subclavian","description":"Misra 2013 ITAS2010: new loss of the right subclavian pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulse_loss_left_subclavian","description":"Misra 2013 ITAS2010: new loss of the left subclavian pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulse_loss_right_brachial","description":"Misra 2013 ITAS2010: new loss of the right brachial pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulse_loss_left_brachial","description":"Misra 2013 ITAS2010: new loss of the left brachial pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulse_loss_right_radial","description":"Misra 2013 ITAS2010: new loss of the right radial pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulse_loss_left_radial","description":"Misra 2013 ITAS2010: new loss of the left radial pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulse_loss_right_femoral","description":"Misra 2013 ITAS2010: new loss of the right femoral pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulse_loss_left_femoral","description":"Misra 2013 ITAS2010: new loss of the left femoral pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulse_loss_right_popliteal","description":"Misra 2013 ITAS2010: new loss of the right popliteal pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulse_loss_left_popliteal","description":"Misra 2013 ITAS2010: new loss of the left popliteal pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulse_loss_right_posterior_tibial","description":"Misra 2013 ITAS2010: new loss of the right posterior tibial pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulse_loss_left_posterior_tibial","description":"Misra 2013 ITAS2010: new loss of the left posterior tibial pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulse_loss_right_dorsalis_pedis","description":"Misra 2013 ITAS2010: new loss of the right dorsalis pedis pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulse_loss_left_dorsalis_pedis","description":"Misra 2013 ITAS2010: new loss of the left dorsalis pedis pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"claudication","description":"Misra 2013 ITAS2010: claudication (weighted parent item), new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. Weighted item (scores 2). true scores 2. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"claudication_arm","description":"Misra 2013 ITAS2010: arm claudication, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"claudication_leg","description":"Misra 2013 ITAS2010: leg claudication, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"carotidodynia","description":"Misra 2013 ITAS2010: carotidodynia, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. Weighted item (scores 2). true scores 2. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"aortic_incompetence","description":"Misra 2013 ITAS2010: aortic incompetence, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"myocardial_infarct_angina","description":"Misra 2013 ITAS2010: myocardial infarction or angina, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cardiomyopathy_cardiac_failure","description":"Misra 2013 ITAS2010: cardiomyopathy or cardiac failure, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"ITAS2010","operationId":"get_api_calc_itas2010","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, active_disease, components, citation, disclaimer."},"400":{"description":"invalid_itas2010: ITAS2010 needs Misra 2013 Takayasu clinical-activity items as true or false or the paper's tokens. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/itas2010"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ITAS2010 (bulk)","operationId":"post_api_calc_itas2010","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_itas2010: ITAS2010 needs Misra 2013 Takayasu clinical-activity items as true or false or the paper's tokens. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/itas2010"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bruit_right_renal":"false","malaise_weight_loss":"false","pulse_loss_left_carotid":"false","pulse_loss_right_radial":"false","stroke":"false","claudication_leg":"false","pulse_loss_left_subclavian":"false","pulse_loss_left_posterior_tibial":"false","claudication":"false","diastolic_hypertension":"false","bruit_right_carotid":"false","pulse_loss_right_posterior_tibial":"false","bruit_left_subclavian":"false","pulse_loss_left_brachial":"false","pulse_loss_left_femoral":"false","cardiomyopathy_cardiac_failure":"false","pulse_loss_right_dorsalis_pedis":"false","carotidodynia":"false","pulse_loss_right_femoral":"false","pulse_loss_left_dorsalis_pedis":"false","seizures":"false","pulse_loss_right_popliteal":"false","abortions":"false","severe_abdominal_pain":"false","pulse_inequality":"false","pulse_loss_left_radial":"false","bruits":"false","bruit_left_carotid":"false","pulse_loss_right_subclavian":"false","pulse_loss":"false","aortic_incompetence":"false","claudication_arm":"false","myocardial_infarct_angina":"false","systolic_hypertension":"false","pulse_loss_right_carotid":"false","bp_inequality":"false","vertigo_dizziness":"false","pulse_loss_right_brachial":"false","bruit_left_renal":"false","myalgia_arthralgia_arthritis":"false","syncope":"false","headache":"false","bruit_right_subclavian":"false","pulse_loss_left_popliteal":"false"},{"bruit_right_renal":"false","malaise_weight_loss":"false","pulse_loss_left_carotid":"false","pulse_loss_right_radial":"false","stroke":"false","claudication_leg":"false","pulse_loss_left_subclavian":"false","pulse_loss_left_posterior_tibial":"false","claudication":"false","diastolic_hypertension":"false","bruit_right_carotid":"false","pulse_loss_right_posterior_tibial":"false","bruit_left_subclavian":"false","pulse_loss_left_brachial":"false","pulse_loss_left_femoral":"false","cardiomyopathy_cardiac_failure":"false","pulse_loss_right_dorsalis_pedis":"false","carotidodynia":"false","pulse_loss_right_femoral":"false","pulse_loss_left_dorsalis_pedis":"false","seizures":"false","pulse_loss_right_popliteal":"false","abortions":"false","severe_abdominal_pain":"false","pulse_inequality":"false","pulse_loss_left_radial":"false","bruits":"false","bruit_left_carotid":"false","pulse_loss_right_subclavian":"false","pulse_loss":"false","aortic_incompetence":"false","claudication_arm":"false","myocardial_infarct_angina":"false","systolic_hypertension":"false","pulse_loss_right_carotid":"false","bp_inequality":"false","vertigo_dizziness":"false","pulse_loss_right_brachial":"false","bruit_left_renal":"false","myalgia_arthralgia_arthritis":"false","syncope":"false","headache":"false","bruit_right_subclavian":"false","pulse_loss_left_popliteal":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/alteplase-stroke":{"get":{"description":"Compute NINDS 1995 intravenous alteplase milligrams from weight: 0.9 mg/kg capped at 90 mg, with 10% as a bolus and the remainder over 60 minutes.\n\nWhen an agent needs published NINDS 1995 alteplase milligram arithmetic and must not invent eligibility, door-to-needle time, blood-pressure targets, or a tenecteplase dose.\n\nNot a medical device. A licensed clinician remains responsible for the prescription and administration.\n\nNot a prescription and not an eligibility screen. magent does not encode NINDS exclusion criteria, door-to-needle time, or blood-pressure targets.\n\nAlteplase milligrams only. Not tenecteplase. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"weight_kg","description":"Weight in kilograms (1-500). NINDS 1995 dose is 0.9 mg/kg, maximum 90 mg. magent clamp, not an eligibility band.","required":true,"schema":{"type":"number"},"example":"80"}],"summary":"Alteplase stroke dose","operationId":"get_api_calc_alteplase_stroke","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, weight_kg, total_mg, bolus_mg, infusion_mg, infusion_minutes, capped, citation, disclaimer."},"400":{"description":"invalid_alteplase: Alteplase dose inputs must match the NINDS 1995 weight window from that trial protocol. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/alteplase-stroke"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Alteplase stroke dose (bulk)","operationId":"post_api_calc_alteplase_stroke","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_alteplase: Alteplase dose inputs must match the NINDS 1995 weight window from that trial protocol. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/alteplase-stroke"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"weight_kg":"80"},{"weight_kg":"80"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/esus":{"get":{"description":"Apply the Hart 2014 ESUS construct (Panel 2 criteria plus Panel 3 minimum diagnostic assessment) and return whether caller-assigned flags meet embolic stroke of undetermined source.\n\nWhen an agent has caller-assigned imaging and workup flags after ischaemic stroke and needs the Hart 2014 ESUS construct, not TOAST cryptogenic stroke and not an anticoagulation recommendation.\n\nNot a medical device. Not a stroke diagnosis. magent does not read imaging or examine the patient.\n\nThis tool is the Hart 2014 ESUS construct only (Panel 2 plus Panel 3 minimum diagnostic assessment). It is not TOAST cryptogenic stroke, which includes incomplete workup and multiple causes.\n\nIncomplete workup (minimum_workup false) means the construct is not met (esus false). It is not an HTTP 400.\n\nNot a recommendation for anticoagulation. Later NAVIGATE ESUS and RESPECT ESUS trials did not show a uniform DOAC benefit; those trials are not the formula.\n\nThe caller assigns all five booleans. magent does not enumerate each major-risk cardioembolic source as a separate required param and does not classify infarct size from raw imaging. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"non_lacunar_infarct","description":"Stroke detected by CT or MRI that is not lacunar, as assigned by the caller (Hart 2014 Panel 2). Lacunar = subcortical infarct ≤1.5 cm (≤2.0 cm on MRI diffusion images) in largest dimension, in the distribution of the small penetrating cerebral arteries. true or false. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"no_stenosis_ge_50","description":"Absence of extracranial or intracranial atherosclerosis causing ≥50% luminal stenosis in arteries supplying the area of ischaemia, as assigned by the caller (Hart 2014 Panel 2). true means no such stenosis. true or false. magent does not read vascular imaging.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"no_major_risk_cardioembolic","description":"No major-risk cardioembolic source, as assigned by the caller (Hart 2014 Panel 2). Major-risk sources (paper footnote): permanent or paroxysmal atrial fibrillation, sustained atrial flutter, intracardiac thrombus, prosthetic cardiac valve, atrial myxoma or other cardiac tumours, mitral stenosis, recent (<4 weeks) myocardial infarction, left ventricular ejection fraction less than 30%, valvular vegetations, or infective endocarditis. true or false. The caller assigns this boolean; magent does not enumerate each source as a separate required param.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"no_other_specific_cause","description":"No other specific cause identified, as assigned by the caller (Hart 2014 Panel 2). Paper examples: arteritis, dissection, migraine/vasospasm, drug misuse. true or false. magent does not diagnose an alternative aetiology.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"minimum_workup","description":"Hart 2014 Panel 3 minimum diagnostic assessment, as assigned by the caller. true only if brain CT or MRI, 12-lead ECG, precordial echocardiography, cardiac monitoring for ≥24 h with automated rhythm detection (telemetry is not sufficient), and imaging of both extracranial and intracranial arteries supplying the ischaemic territory have been done. Incomplete workup returns esus false (not HTTP 400). true or false. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"ESUS","operationId":"get_api_calc_esus","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, esus, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/esus"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ESUS (bulk)","operationId":"post_api_calc_esus","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/esus"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"minimum_workup":"true","no_major_risk_cardioembolic":"true","no_other_specific_cause":"true","no_stenosis_ge_50":"true","non_lacunar_infarct":"true"},{"minimum_workup":"true","no_major_risk_cardioembolic":"true","no_other_specific_cause":"true","no_stenosis_ge_50":"true","non_lacunar_infarct":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/berg-balance":{"get":{"description":"Sum fourteen caller-assigned Berg 1992 Berg Balance Scale items (each integer 0-4) and return the published 0-56 total. Does not apply later 0-20/21-40/41-56 website bands.\n\nWhen an agent already has Berg 1992 integers 0-4 for the fourteen Berg Balance Scale items and needs the published total. magent does not observe the patient, diagnose fall risk, score Timed Up and Go, or apply later 0-20 wheelchair / 21-40 walking-with-assistance / 41-56 independent website bands.\n\nNot a medical device and not a diagnosis of fall risk or a treatment order.\n\nEach of the fourteen items is a caller-assigned integer 0-4. magent does not observe the patient.\n\nThis is Berg 1992 Berg Balance Scale only (fourteen items; max 56). magent does not score Timed Up and Go.\n\nBerg 1992 (PMID 1468055) published no 0-20 wheelchair / 21-40 walking-with-assistance / 41-56 independent website bands and no <45 fall-risk response field. This tool returns score and max_score only. It does not apply later website cutoffs. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sitting_to_standing","description":"Caller-assigned Berg 1992 sitting to standing (integer 0-4): 4 able to stand without using hands and stabilize independently; 3 able to stand independently using hands; 2 able to stand using hands after several tries; 1 needs minimal aid to stand or stabilize; 0 needs moderate or maximal assist to stand. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"standing_unsupported","description":"Caller-assigned Berg 1992 standing unsupported (integer 0-4): 4 able to stand safely for 2 minutes; 3 able to stand 2 minutes with supervision; 2 able to stand 30 seconds unsupported; 1 needs several tries to stand 30 seconds unsupported; 0 unable to stand 30 seconds unassisted. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"sitting_unsupported","description":"Caller-assigned Berg 1992 sitting unsupported, feet supported (integer 0-4): 4 able to sit safely and securely for 2 minutes; 3 able to sit 2 minutes under supervision; 2 able to sit 30 seconds; 1 able to sit 10 seconds; 0 unable to sit without support 10 seconds. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"standing_to_sitting","description":"Caller-assigned Berg 1992 standing to sitting (integer 0-4): 4 sits safely with minimal use of hands; 3 controls descent by using hands; 2 uses back of legs against chair to control descent; 1 sits independently but has uncontrolled descent; 0 needs assistance to sit. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"transfers","description":"Caller-assigned Berg 1992 transfers (integer 0-4): 4 able to transfer safely with minor use of hands; 3 able to transfer safely definite need of hands; 2 able to transfer with verbal cuing and/or supervision; 1 needs one person to assist; 0 needs two people to assist or supervise to be safe. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"standing_eyes_closed","description":"Caller-assigned Berg 1992 standing unsupported with eyes closed (integer 0-4): 4 able to stand 10 seconds safely; 3 able to stand 10 seconds with supervision; 2 able to stand 3 seconds; 1 unable to keep eyes closed 3 seconds but stays standing; 0 needs help to keep from falling. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"standing_feet_together","description":"Caller-assigned Berg 1992 standing unsupported with feet together (integer 0-4): 4 able to place feet together independently and stand 1 minute safely; 3 able to place feet together independently and stand 1 minute with supervision; 2 able to place feet together independently but unable to hold 30 seconds; 1 needs help to attain position but able to stand 15 seconds; 0 needs help to attain position and unable to hold 15 seconds. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"reaching_forward","description":"Caller-assigned Berg 1992 reaching forward with outstretched arm while standing (integer 0-4): 4 can reach forward confidently more than 25 cm (10 inches); 3 can reach forward more than 12 cm (5 inches) safely; 2 can reach forward more than 5 cm (2 inches) safely; 1 reaches forward but needs supervision; 0 loses balance while trying or requires external support. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"retrieving_object_from_floor","description":"Caller-assigned Berg 1992 retrieving object from floor from a standing position (integer 0-4): 4 able to pick up slipper safely and easily; 3 able to pick up slipper but needs supervision; 2 unable to pick up but reaches 2-5 cm from slipper and keeps balance independently; 1 unable to pick up and needs supervision while trying; 0 unable to try or needs assist to keep from losing balance. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"turning_to_look_behind","description":"Caller-assigned Berg 1992 turning to look behind over left and right shoulders while standing (integer 0-4): 4 looks behind from both sides with weight shift; 3 looks behind one side only other side shows less weight shift; 2 turns sideways only but maintains balance; 1 needs supervision when turning; 0 needs assist to keep from losing balance or falling. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"turning_360","description":"Caller-assigned Berg 1992 turning 360 degrees (integer 0-4): 4 able to turn 360 degrees safely in 4 seconds or less; 3 able to turn 360 degrees safely one side only in 4 seconds or less; 2 able to turn 360 degrees safely but slowly; 1 needs close supervision or verbal cuing; 0 needs assistance while turning. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"alternate_foot_on_stool","description":"Caller-assigned Berg 1992 placing alternate foot on step or stool while standing unsupported (integer 0-4): 4 able to stand independently and safely and complete 8 steps in 20 seconds; 3 able to stand independently and complete 8 steps in more than 20 seconds; 2 able to complete 4 steps without aid with supervision; 1 able to complete more than 2 steps needs minimal assist; 0 needs assistance to keep from falling or unable to try. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"tandem_stance","description":"Caller-assigned Berg 1992 standing unsupported one foot in front (integer 0-4): 4 able to place foot tandem independently and hold 30 seconds; 3 able to place foot ahead of other independently and hold 30 seconds; 2 able to take small step independently and hold 30 seconds; 1 needs help to step but can hold 15 seconds; 0 loses balance while stepping or standing. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"standing_on_one_foot","description":"Caller-assigned Berg 1992 standing on one foot (integer 0-4): 4 able to lift leg independently and hold more than 10 seconds; 3 able to lift leg independently and hold 5-10 seconds; 2 able to lift leg independently and hold at least 3 seconds; 1 tries to lift leg unable to hold 3 seconds but remains standing independently; 0 unable to try or needs assist to prevent fall. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"BBS","operationId":"get_api_calc_berg_balance","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_berg_balance: Berg Balance Scale needs the fourteen Berg 1992 items each as an integer 0-4. Returned before settlement; you are not charged.; invalid_berg_balance_item: each Berg Balance Scale item must be an integer from 0 to 4 (Berg 1992). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/berg-balance"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"BBS (bulk)","operationId":"post_api_calc_berg_balance","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_berg_balance: Berg Balance Scale needs the fourteen Berg 1992 items each as an integer 0-4. Returned before settlement; you are not charged.; invalid_berg_balance_item: each Berg Balance Scale item must be an integer from 0 to 4 (Berg 1992). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/berg-balance"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"alternate_foot_on_stool":"0","reaching_forward":"0","retrieving_object_from_floor":"0","sitting_to_standing":"0","sitting_unsupported":"0","standing_eyes_closed":"0","standing_feet_together":"0","standing_on_one_foot":"0","standing_to_sitting":"0","standing_unsupported":"0","tandem_stance":"0","transfers":"0","turning_360":"0","turning_to_look_behind":"0"},{"alternate_foot_on_stool":"0","reaching_forward":"0","retrieving_object_from_floor":"0","sitting_to_standing":"0","sitting_unsupported":"0","standing_eyes_closed":"0","standing_feet_together":"0","standing_on_one_foot":"0","standing_to_sitting":"0","standing_unsupported":"0","tandem_stance":"0","transfers":"0","turning_360":"0","turning_to_look_behind":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rai":{"get":{"description":"Apply Rai 1975 original clinical staging of chronic lymphocytic leukemia and return rai_stage 0-4 from four caller-assigned flags.\n\nWhen an agent already has lymphadenopathy, hepatosplenomegaly, anemia (Hb <11 g/dL), and thrombocytopenia (platelets <100,000/mm3) assigned as in Rai 1975 for a patient recognized as CLL, and needs the published original stage. magent does not examine the patient or read a CBC.\n\nNot a medical device.\n\nNot a CLL diagnosis. Lymphocytosis is assumed; this tool is for a patient already recognized as having chronic lymphocytic leukemia.\n\nmagent does not examine the patient or read a CBC. The caller assigns lymphadenopathy, hepatosplenomegaly, anemia_hb_lt_11, and thrombocytopenia_plt_lt_100 using the 1975 cutoffs (hemoglobin <11 g/dL; platelets <100,000/mm3).\n\nThis tool is original Rai 1975 stages 0-IV only. It is not modified Rai (low / intermediate / high grouping).\n\nThis tool is not Binet staging (Binet C uses hemoglobin <10 g/dL). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"lymphadenopathy","description":"Lymphadenopathy as assigned by the caller (Rai 1975 stage I when this is the highest finding). true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hepatosplenomegaly","description":"Enlarged spleen or liver or both as assigned by the caller (Rai 1975 stage II). true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"anemia_hb_lt_11","description":"Anemia as assigned by the caller using the Rai 1975 cutoff hemoglobin <11 g/dL (hematocrit <33% is the same clinical call). true or false. magent does not read a CBC.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"thrombocytopenia_plt_lt_100","description":"Thrombocytopenia as assigned by the caller using the Rai 1975 cutoff platelets <100,000/mm3 (<100×10^9/L). true or false. magent does not read a CBC.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Rai","operationId":"get_api_calc_rai","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, rai_stage, lymphadenopathy, hepatosplenomegaly, anemia_hb_lt_11, thrombocytopenia_plt_lt_100, criteria, citation, disclaimer."},"400":{"description":"invalid_rai: each Rai 1975 staging flag must be true or false. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rai"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rai (bulk)","operationId":"post_api_calc_rai","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rai: each Rai 1975 staging flag must be true or false. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rai"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"anemia_hb_lt_11":"false","hepatosplenomegaly":"false","lymphadenopathy":"false","thrombocytopenia_plt_lt_100":"false"},{"anemia_hb_lt_11":"false","hepatosplenomegaly":"false","lymphadenopathy":"false","thrombocytopenia_plt_lt_100":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/dka-mpm":{"get":{"description":"Sum the Efstathiou 2002 DKA-MPM flags (max 25) and return the published in-hospital death percents only for scores 0–14 (0.86%) and 19–25 (93.3%).\n\nWhen an agent already has the six Efstathiou 2002 presentation and first-day flags and needs the published point total, not a DKA treatment order, insulin dose, pH or glucose assay, later 72-hour DKA score, or invented percents for scores 15–18.\n\nNot a medical device and not a DKA treatment, fluid, or insulin-dose order.\n\nmagent does not assay pH or glucose. All six predictors are caller-assigned flags.\n\nEfstathiou 2002 published in-hospital death of 0.86% for scores 0–14 and 93.3% for scores 19–25. Scores 15–18 return the point total without a percent.\n\nDoes not implement later 72-hour DKA mortality scores. Does not invent Low/High labels or intermediate percents that paper did not publish. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"severe_comorbidity","description":"Severe coexisting disease at presentation as assigned by the caller (Efstathiou 2002). true scores 6. true or false. magent does not diagnose comorbidity.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ph_lt_7","description":"Arterial pH < 7.0 at presentation as assigned by the caller (Efstathiou 2002). true scores 4. true or false. magent does not assay pH.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"insulin_gt_50_12h","description":"Regular insulin > 50 IU in the first 12 h as assigned by the caller (Efstathiou 2002). true scores 4. true or false. Not an insulin dose. magent does not order insulin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"glucose_gt_16_7_12h","description":"Serum glucose > 16.7 mmol/L after 12 h as assigned by the caller (Efstathiou 2002). true scores 4. true or false. magent does not assay glucose.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"depressed_mental_24h","description":"Depressed mental state after 24 h as assigned by the caller (Efstathiou 2002). true scores 4. true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"fever_24h","description":"Fever after 24 h as assigned by the caller (Efstathiou 2002). true scores 3. true or false. magent does not take temperature.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"DKA-MPM","operationId":"get_api_calc_dka_mpm","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, observed_mortality_percent, components, citation, disclaimer."},"400":{"description":"invalid_dka_mpm: DKA-MPM inputs must match Efstathiou 2002 presentation and first-day binary predictors from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dka-mpm"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"DKA-MPM (bulk)","operationId":"post_api_calc_dka_mpm","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_dka_mpm: DKA-MPM inputs must match Efstathiou 2002 presentation and first-day binary predictors from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dka-mpm"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"depressed_mental_24h":"false","fever_24h":"false","glucose_gt_16_7_12h":"false","insulin_gt_50_12h":"false","ph_lt_7":"false","severe_comorbidity":"false"},{"depressed_mental_24h":"false","fever_24h":"false","glucose_gt_16_7_12h":"false","insulin_gt_50_12h":"false","ph_lt_7":"false","severe_comorbidity":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/smm-22020":{"get":{"description":"Count Lakshman 2018 2/20/20 smoldering-myeloma risk factors (BMPC >20%, M-protein >2 g/dL, involved/uninvolved FLC ratio >20) and return low, intermediate, or high with published median TTP.\n\nWhen an agent has caller-supplied bone-marrow plasma-cell percent, serum M-protein, and involved/uninvolved FLC ratio for smoldering myeloma and needs the published Lakshman 2018 2/20/20 factor count, not Mayo 70/20, not PETHEMA, not myeloma ISS, and not a treatment order.\n\nNot a medical device. magent does not examine the patient and does not assay marrow, M-protein, or free light chains.\n\nNot a myeloma diagnosis or treatment order. This is Lakshman 2018 2/20/20 SMM risk only, not Mayo 70/20, not PETHEMA, not Greipp ISS, and not R-ISS.\n\nIMWG 2014 myeloma-defining SLiM criteria stay outside this score: BMPC 60% or above and involved/uninvolved FLC ratio 100 or above are rejected, not scored. MRI focal lesions are not an input.\n\nThe three 2/20/20 cutoffs are strict greater-than (BMPC >20, M-protein >2 g/dL, FLC ratio >20). Values equal to 20, 2, and 20 do not add a factor. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"bmpc_percent","description":"Bone-marrow plasma cells as a percent (10-59). >20 scores 1 (Lakshman 2018 2/20/20). 20 scores 0. 10 is the SMM floor. 60 or above is IMWG 2014 myeloma and is rejected, not scored. magent does not read a marrow.","required":true,"schema":{"type":"number"},"example":"25"},{"in":"query","name":"m_protein_g_dl","description":"Serum M-protein in g/dL (0-15). >2 scores 1 (Lakshman 2018 2/20/20). 2 scores 0. magent does not assay M-protein.","required":true,"schema":{"type":"number"},"example":"2.5"},{"in":"query","name":"flc_ratio","description":"Involved/uninvolved serum free light-chain ratio as assigned by the caller (0.01-99.9). >20 scores 1 (Lakshman 2018 2/20/20). 20 scores 0. 100 or above is IMWG 2014 myeloma and is rejected, not scored. magent does not assay free light chains.","required":true,"schema":{"type":"number"},"example":"25"}],"summary":"SMM 2/20/20","operationId":"get_api_calc_smm_22020","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, bmpc_percent, m_protein_g_dl, flc_ratio, score, max_score, factor_count, risk_group, median_ttp_months, components, citation, disclaimer."},"400":{"description":"invalid_bmpc: bmpc_percent must be a number from 10 to 59 (Lakshman 2018 SMM bone-marrow plasma cells; ≥60 is myeloma). Returned before settlement; you are not charged.; invalid_m_protein: m_protein_g_dl must be a number from 0 to 15 (Lakshman 2018 serum M-protein g/dL). Returned before settlement; you are not charged.; invalid_flc_ratio: flc_ratio must be a number from 0.01 to 99.9 (Lakshman 2018 involved/uninvolved FLC ratio; ≥100 is myeloma). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/smm-22020"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SMM 2/20/20 (bulk)","operationId":"post_api_calc_smm_22020","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_bmpc: bmpc_percent must be a number from 10 to 59 (Lakshman 2018 SMM bone-marrow plasma cells; ≥60 is myeloma). Returned before settlement; you are not charged.; invalid_m_protein: m_protein_g_dl must be a number from 0 to 15 (Lakshman 2018 serum M-protein g/dL). Returned before settlement; you are not charged.; invalid_flc_ratio: flc_ratio must be a number from 0.01 to 99.9 (Lakshman 2018 involved/uninvolved FLC ratio; ≥100 is myeloma). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/smm-22020"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bmpc_percent":"25","flc_ratio":"25","m_protein_g_dl":"2.5"},{"bmpc_percent":"25","flc_ratio":"25","m_protein_g_dl":"2.5"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ain-risk":{"get":{"description":"Compute the Moledina 2022 development-model logistic probability of biopsy-proven acute interstitial nephritis from serum creatinine, BUN:creatinine ratio, urine dipstick specific gravity, and dipstick protein.\n\nWhen an agent needs the published Moledina 2022 EHR-model probability and must not invent a biopsy decision, a diagnosis, urine cytokine inputs, or a low/high cutoff.\n\nNot a medical device. Not a diagnosis and not a kidney biopsy.\n\nMoledina 2022 development-model coefficients only (Table 4 intercept and supplement weights). This is not the urine IL-9 and TNF-α biomarker model.\n\nmagent does not apply a later intercept-correction for local AIN prevalence.\n\nMoledina 2022 does not publish a named low or high probability cutoff; magent does not invent one.\n\nprotein is the published binary dipstick category (0 or 1+ versus 2+ or higher) as assigned by the caller. magent does not interpret the dipstick.\n\nDerived and validated in patients selected for native-kidney biopsy. External validity outside that population is unknown. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"creatinine_mg_dl","description":"Serum creatinine in mg/dL (0.1-20). Moledina 2022 Table 4: +0.8367518 per natural log. µmol/L is not accepted on this tool. magent does not assay creatinine.","required":true,"schema":{"type":"number"},"example":"2.1"},{"in":"query","name":"bun_cr_ratio","description":"BUN:creatinine ratio (mg/dL : mg/dL, 0.5-200) as computed by the caller. Moledina 2022 Table 4: -0.9181938 per natural log. magent does not compute BUN from other labs.","required":true,"schema":{"type":"number"},"example":"15"},{"in":"query","name":"specific_gravity","description":"Urine dipstick specific gravity (1.000-1.050) as assigned by the caller, e.g. 1.015. Moledina 2022 Table 4: -0.0501203 per 0.001 unit. magent does not read the dipstick.","required":true,"schema":{"type":"number"},"example":"1.015"},{"in":"query","name":"protein","description":"Moledina 2022 dipstick protein category as assigned by the caller: le_1 (0 or 1+, +0.9360127) or ge_2 (2+ or higher, reference, 0). magent does not interpret the dipstick.","required":true,"schema":{"type":"string","enum":["le_1","ge_2"]},"example":"le_1"}],"summary":"AIN risk","operationId":"get_api_calc_ain_risk","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, creatinine_mg_dl, bun_cr_ratio, specific_gravity, protein, logit, estimated_probability_percent, citation, disclaimer."},"400":{"description":"invalid_ain_risk: AIN risk needs Moledina 2022 creatinine, BUN:creatinine, urine specific gravity, and dipstick protein in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ain-risk"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"AIN risk (bulk)","operationId":"post_api_calc_ain_risk","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ain_risk: AIN risk needs Moledina 2022 creatinine, BUN:creatinine, urine specific gravity, and dipstick protein in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ain-risk"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bun_cr_ratio":"15","creatinine_mg_dl":"2.1","protein":"le_1","specific_gravity":"1.015"},{"bun_cr_ratio":"15","creatinine_mg_dl":"2.1","protein":"le_1","specific_gravity":"1.015"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/cpis":{"get":{"description":"Sum the six Pugin 1991 CPIS domains (temperature, leukocytes, tracheal secretions, oxygenation, chest radiograph, tracheal-aspirate culture) and return le_6 or gt_6.\n\nWhen an agent needs the published Pugin 1991 CPIS total and >6 band and must not invent a VAP diagnosis, an antibiotic order, or Singh 2000 modified CPIS radiographic progression.\n\nNot a medical device and not a VAP diagnosis or antibiotic order. CPIS >6 suggested pulmonary infection in the Pugin 1991 derivation; it is not a diagnosis.\n\nThis is original Pugin 1991 CPIS (max 12). It is not Singh 2000 modified CPIS and does not score day-3 radiographic progression.\n\nChest radiograph (none, diffuse, or localized) and culture (none, pathogen, or pathogen_and_gram) are caller-assigned. magent does not read radiographs or Gram stains.\n\nLeukocyte band forms are the caller-assigned bands_ge_50 flag (≥50% bands). magent does not compute a differential.\n\nPugin 1991 temperature bins are one-decimal. 36.1–36.4 and 38.91–38.99 are unpublished and score 0 (not ≤36.0, not 38.5–38.9, not ≥39.0). Do not invent a <39 one-point band. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"temperature_c","description":"Temperature in °C (30.0-45.0). 36.5-38.4 scores 0; 38.5-38.9 scores 1; ≥39.0 or ≤36.0 scores 2 (Pugin 1991).","required":true,"schema":{"type":"number"},"example":"37.0"},{"in":"query","name":"wbc_k_ul","description":"WBC in 10^3/mm^3 (same as 10^3/µL or 10^9/L). Range 0.01-500. 4.0-11.0 scores 0; <4.0 or >11.0 scores 1. Abnormal WBC plus bands_ge_50 scores 2 for this domain.","required":true,"schema":{"type":"number"},"example":"8.0"},{"in":"query","name":"bands_ge_50","description":"Caller-assigned ≥50% band forms (Pugin 1991). true adds 1 only when WBC is already <4.0 or >11.0. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"tracheal_secretions","description":"Caller-assigned tracheal secretions. none scores 0; nonpurulent scores 1; purulent scores 2 (Pugin 1991).","required":true,"schema":{"type":"string","enum":["none","nonpurulent","purulent"]},"example":"none"},{"in":"query","name":"pf_ratio","description":"PaO2/FiO2 in mm Hg (20-800). >240 or ards=true scores 0; ≤240 and ards=false scores 2 (Pugin 1991).","required":true,"schema":{"type":"number"},"example":"300"},{"in":"query","name":"ards","description":"Caller-assigned ARDS. true scores 0 for oxygenation even when pf_ratio ≤240. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"chest_radiograph","description":"Caller-assigned chest radiograph. none scores 0; diffuse scores 1; localized scores 2. magent does not read the radiograph.","required":true,"schema":{"type":"string","enum":["none","diffuse","localized"]},"example":"none"},{"in":"query","name":"culture","description":"Caller-assigned tracheal-aspirate culture. none scores 0; pathogen (moderate/heavy pathogenic growth) scores 1; pathogen_and_gram (same pathogen on Gram stain) scores 2. magent does not read Gram stains.","required":true,"schema":{"type":"string","enum":["none","pathogen","pathogen_and_gram"]},"example":"none"}],"summary":"CPIS","operationId":"get_api_calc_cpis","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, cpis_band, temperature_c, wbc_k_ul, bands_ge_50, tracheal_secretions, pf_ratio, ards, chest_radiograph, culture, components, citation, disclaimer."},"400":{"description":"invalid_temperature: temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_pf_ratio: pf_ratio must be a number from 20 to 800. Returned before settlement; you are not charged.; invalid_tracheal_secretions: tracheal_secretions must be none, nonpurulent, or purulent (Pugin 1991 CPIS). Returned before settlement; you are not charged.; invalid_chest_radiograph: chest_radiograph must be none, diffuse, or localized (Pugin 1991 CPIS). Returned before settlement; you are not charged.; invalid_cpis_culture: culture must be none, pathogen, or pathogen_and_gram (Pugin 1991 CPIS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cpis"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CPIS (bulk)","operationId":"post_api_calc_cpis","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_temperature: temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_pf_ratio: pf_ratio must be a number from 20 to 800. Returned before settlement; you are not charged.; invalid_tracheal_secretions: tracheal_secretions must be none, nonpurulent, or purulent (Pugin 1991 CPIS). Returned before settlement; you are not charged.; invalid_chest_radiograph: chest_radiograph must be none, diffuse, or localized (Pugin 1991 CPIS). Returned before settlement; you are not charged.; invalid_cpis_culture: culture must be none, pathogen, or pathogen_and_gram (Pugin 1991 CPIS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cpis"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ards":"false","bands_ge_50":"false","chest_radiograph":"none","culture":"none","pf_ratio":"300","temperature_c":"37.0","tracheal_secretions":"none","wbc_k_ul":"8.0"},{"ards":"false","bands_ge_50":"false","chest_radiograph":"none","culture":"none","pf_ratio":"300","temperature_c":"37.0","tracheal_secretions":"none","wbc_k_ul":"8.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-child-fap-nos":{"get":{"description":"Apply the Hyams 2016 Rome IV H2d child/adolescent Functional Abdominal Pain NOS diagnostic criteria and return whether the published FAP-NOS box holds (rome_iv_child_fap_nos).\n\nWhen an agent already has the five caller-assigned Hyams 2016 Rome IV H2d FAP-NOS flags, including the residual insufficient_criteria_for_ibs_fd_or_abdominal_migraine flag, and needs whether the published child FAP-NOS box holds. magent does not re-run IBS, functional dyspepsia, or abdominal migraine.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose child FAP-NOS.\n\nThe caller assigns the five flags, including insufficient_criteria_for_ibs_fd_or_abdominal_migraine. magent does not re-run IBS, functional dyspepsia, or abdominal migraine. magent does not examine the patient.\n\nThis tool is Hyams 2016 Rome IV H2d Functional Abdominal Pain NOS only. Not adult CAPS (Keefer 2016). Functional abdominal pain syndrome (FAPS) was dropped in Rome IV and is not scored here. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"episodic_or_continuous_abdominal_pain_not_solely_during_physiologic_events","description":"Episodic or continuous abdominal pain that does not occur solely during physiologic events (eating, menses), as assigned (Hyams 2016 Rome IV H2d). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"pain_at_least_4_times_per_month","description":"Abdominal pain at least 4 times per month, as assigned (Hyams 2016 Rome IV H2d). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"insufficient_criteria_for_ibs_fd_or_abdominal_migraine","description":"Insufficient criteria for IBS, functional dyspepsia, or abdominal migraine, as assigned (Hyams 2016 Rome IV H2d). Residual flag: magent does not re-run those tools. true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"not_explained_by_another_condition","description":"After appropriate evaluation, the abdominal pain cannot be fully explained by another medical condition, as assigned (Hyams 2016 Rome IV H2d). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"fulfilled_at_least_2_months","description":"Criteria fulfilled for at least 2 months, as assigned (Hyams 2016 Rome IV H2d). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV child FAP-NOS","operationId":"get_api_calc_rome_iv_child_fap_nos","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, rome_iv_child_fap_nos, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_child_fap_nos: Rome IV child FAP-NOS needs the Hyams 2016 child/adolescent H2d flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-child-fap-nos"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV child FAP-NOS (bulk)","operationId":"post_api_calc_rome_iv_child_fap_nos","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_child_fap_nos: Rome IV child FAP-NOS needs the Hyams 2016 child/adolescent H2d flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-child-fap-nos"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"episodic_or_continuous_abdominal_pain_not_solely_during_physiologic_events":"true","fulfilled_at_least_2_months":"true","insufficient_criteria_for_ibs_fd_or_abdominal_migraine":"true","not_explained_by_another_condition":"true","pain_at_least_4_times_per_month":"true"},{"episodic_or_continuous_abdominal_pain_not_solely_during_physiologic_events":"true","fulfilled_at_least_2_months":"true","insufficient_criteria_for_ibs_fd_or_abdominal_migraine":"true","not_explained_by_another_condition":"true","pain_at_least_4_times_per_month":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/asas-peripheral-spa":{"get":{"description":"Apply the 2011 ASAS classification criteria for peripheral spondyloarthritis (Rudwaleit set 2D / figure 1): require current arthritis, enthesitis, or dactylitis, then return whether arm A (≥1 of 6 SpA features) or arm B (≥2 of 5 additional features) classifies peripheral SpA. Not a diagnosis.\n\nWhen an agent already has caller-assigned Rudwaleit 2011 entry and SpA feature flags and needs the published peripheral SpA classification result for research, not a diagnosis, not ASAS 2009 axial, and not ESSG/Amor.\n\nNot a medical device and not a diagnosis of peripheral spondyloarthritis, psoriatic arthritis, reactive arthritis, or IBD-associated SpA. Classification criteria for research.\n\nEntry (current arthritis, enthesitis, or dactylitis) must be met or the request is HTTP 400 and is not returned as classified=false.\n\nAge at onset is a study limitation (Rudwaleit 2011 usually ≤45 years) and is not a parameter and not an HTTP 400.\n\nThis tool is ASAS 2011 peripheral SpA classification (set 2D) only. It is not the 2009 ASAS axial criteria and not ESSG or Amor criteria.\n\nArthritis, enthesitis, dactylitis, psoriasis, IBD, preceding infection, HLA-B27, uveitis, sacroiliitis on imaging, IBP in the past, and family history are caller-assigned. magent does not examine joints or assay HLA-B27. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"arthritis","description":"Current peripheral arthritis (usually asymmetric and/or of lower limbs) as assigned by the caller (Rudwaleit 2011 set 2D entry). Table 5 additional feature is past or present synovitis diagnosed by a physician; the same caller flag counts toward arm B. true or false. magent does not examine joints.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"enthesitis","description":"Current enthesitis as assigned by the caller (Rudwaleit 2011 set 2D entry). Table 5 additional feature is past or present spontaneous pain or tenderness at an enthesis; the same caller flag counts toward arm B. true or false. magent does not examine entheses.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"dactylitis","description":"Current dactylitis as assigned by the caller (Rudwaleit 2011 set 2D entry). Table 5 additional feature is past or present dactylitis diagnosed by a physician; the same caller flag counts toward arm B. true or false. magent does not examine digits.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"psoriasis","description":"Past or present psoriasis diagnosed by a physician, as assigned by the caller (Rudwaleit 2011 arm A). true or false. magent does not examine skin.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"ibd","description":"Past or present Crohn's disease or ulcerative colitis diagnosed by a physician, as assigned by the caller (Rudwaleit 2011 arm A). true or false. magent does not diagnose IBD.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"preceding_infection","description":"Urethritis/cervicitis or diarrhoea within 1 month before arthritis, enthesitis, or dactylitis, as assigned by the caller (Rudwaleit 2011 arm A). true or false. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hla_b27","description":"HLA-B27 positive as assigned by the caller (Rudwaleit 2011 arm A). true or false. magent does not assay HLA-B27.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"uveitis","description":"Past or present uveitis confirmed by an ophthalmologist, as assigned by the caller (Rudwaleit 2011 arm A). true or false. magent does not examine the eye.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"sacroiliitis_on_imaging","description":"Sacroiliitis on imaging as assigned by the caller (Rudwaleit 2011 arm A): definite radiographic sacroiliitis (bilateral grade 2–4 or unilateral grade 3–4) or active inflammation on MRI highly suggestive of SpA-associated sacroiliitis. true or false. magent does not read films.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ibp_past","description":"Inflammatory back pain in the past according to experts, as assigned by the caller (Rudwaleit 2011 arm B). true or false. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"family_history_spa","description":"Family history of SpA as assigned by the caller (Rudwaleit 2011 arm B): first-degree or second-degree relatives with ankylosing spondylitis, psoriasis, acute uveitis, reactive arthritis, or IBD. true or false. magent does not take a pedigree.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"ASAS peripheral SpA","operationId":"get_api_calc_asas_peripheral_spa","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, classified, arm_a, arm_b, arm_a_count, arm_b_count, citation, disclaimer."},"400":{"description":"invalid_asas_peripheral: arthritis, enthesitis, or dactylitis must be true (Rudwaleit 2011 ASAS peripheral SpA set 2D entry: current peripheral arthritis, enthesitis, or dactylitis). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/asas-peripheral-spa"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ASAS peripheral SpA (bulk)","operationId":"post_api_calc_asas_peripheral_spa","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_asas_peripheral: arthritis, enthesitis, or dactylitis must be true (Rudwaleit 2011 ASAS peripheral SpA set 2D entry: current peripheral arthritis, enthesitis, or dactylitis). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/asas-peripheral-spa"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"arthritis":"true","dactylitis":"false","enthesitis":"false","family_history_spa":"false","hla_b27":"false","ibd":"false","ibp_past":"false","preceding_infection":"false","psoriasis":"true","sacroiliitis_on_imaging":"false","uveitis":"false"},{"arthritis":"true","dactylitis":"false","enthesitis":"false","family_history_spa":"false","hla_b27":"false","ibd":"false","ibp_past":"false","preceding_infection":"false","psoriasis":"true","sacroiliitis_on_imaging":"false","uveitis":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/modified-hoehn-yahr":{"get":{"description":"Echo the caller-assigned Goetz 2004 Table 1 modified Hoehn and Yahr stage (1.0, 1.5, 2.0, 2.5, 3.0, 4.0, or 5.0) with the published description. No stage 0. magent does not examine the patient.\n\nWhen an agent already has a modified Hoehn and Yahr stage as assigned by the caller and needs the published Table 1 description. magent does not examine the patient, assign stage from findings, map to UPDRS, or use the original integer-only 1-5 scale.\n\nNot a medical device. magent does not examine the patient.\n\nThe caller assigns modified Hoehn and Yahr stage 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, or 5.0. magent does not examine the patient, perform a pull test, or assign stage from findings.\n\nNot UPDRS. Not a diagnosis. Not an outcome measure.\n\nGoetz 2004 recommended the original 1-5 Hoehn and Yahr scale for group description pending clinimetric testing of the modified form. This tool still implements the widely used modified Table 1 tokens (1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0).\n\nStage 0 is not in Table 1. This is not the original integer-only 1-5 scale as a separate tool. Not a treatment order. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"hy_stage","description":"Goetz 2004 Table 1 modified Hoehn and Yahr stage as assigned by the caller: 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, or 5.0 (exact tokens; reject 1, 3, 0, 0.5, 2.5.0). 1.0 unilateral only; 1.5 unilateral and axial; 2.0 bilateral without impairment of balance; 2.5 mild bilateral with recovery on pull test; 3.0 mild to moderate bilateral with some postural instability, physically independent; 4.0 severe disability, still able to walk or stand unassisted; 5.0 wheelchair bound or bedridden unless aided. No stage 0. Not the original integer-only 1-5 scale. Not UPDRS. magent does not examine the patient.","required":true,"schema":{"type":"string"},"example":"1.0"}],"summary":"Modified Hoehn and Yahr","operationId":"get_api_calc_modified_hoehn_yahr","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, hy_stage, description, components, citation, disclaimer."},"400":{"description":"invalid_modified_hoehn_yahr: hy_stage must be 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, or 5.0 (Goetz 2004 modified Hoehn and Yahr Table 1). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/modified-hoehn-yahr"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Modified Hoehn and Yahr (bulk)","operationId":"post_api_calc_modified_hoehn_yahr","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_modified_hoehn_yahr: hy_stage must be 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, or 5.0 (Goetz 2004 modified Hoehn and Yahr Table 1). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/modified-hoehn-yahr"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"hy_stage":"1.0"},{"hy_stage":"1.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/cns-ipi":{"get":{"description":"Sum the Schmitz 2016 CNS International Prognostic Index (Shipp IPI factors plus kidney/adrenal involvement) and return low (0–1), intermediate (2–3), or high (4–6).\n\nWhen an agent needs the published CNS-IPI point total and CNS-relapse risk group for DLBCL treated with R-CHOP and must not invent a CNS prophylaxis or LP order, a DLBCL diagnosis, or substitute NCCN-IPI or R-IPI.\n\nNot a medical device and not a DLBCL diagnosis or treatment choice. magent does not examine the patient.\n\nThis is Schmitz 2016 CNS-IPI (Shipp IPI factors plus kidney/adrenal involvement). It is not a CNS prophylaxis or LP order, not NCCN-IPI, and not R-IPI.\n\nmagent does not stage lymphoma or image kidneys. stage_iii_or_iv, extranodal_gt_1, ldh_gt_uln, and kidney_or_adrenal are caller-assigned flags; ECOG is a caller-assigned integer 0–4. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Age >60 scores 1 (Schmitz 2016). Age 60 is the ≤60 arm and scores 0.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"ecog","description":"ECOG performance status 0-4 as assigned by the caller (Schmitz 2016). ≥2 scores 1. magent does not assign ECOG.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"ldh_gt_uln","description":"Serum LDH above the upper limit of normal as assigned by the caller (Schmitz 2016). true scores 1. magent does not assay LDH.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"stage_iii_or_iv","description":"Ann Arbor stage III or IV as assigned by the caller (Schmitz 2016). true scores 1. magent does not stage lymphoma.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"extranodal_gt_1","description":"More than one extranodal site as assigned by the caller (Schmitz 2016). true scores 1. magent does not count extranodal sites.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"kidney_or_adrenal","description":"Kidney and/or adrenal involvement as assigned by the caller (Schmitz 2016). true scores 1. magent does not image kidneys.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"CNS-IPI","operationId":"get_api_calc_cns_ipi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, cns_ipi_risk, age_years, ecog, kidney_or_adrenal, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_ecog: ecog must be an integer from 0 to 4 (Shipp 1993 IPI). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cns-ipi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CNS-IPI (bulk)","operationId":"post_api_calc_cns_ipi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_ecog: ecog must be an integer from 0 to 4 (Shipp 1993 IPI). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cns-ipi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","ecog":"0","extranodal_gt_1":"false","kidney_or_adrenal":"false","ldh_gt_uln":"false","stage_iii_or_iv":"false"},{"age":"50","ecog":"0","extranodal_gt_1":"false","kidney_or_adrenal":"false","ldh_gt_uln":"false","stage_iii_or_iv":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/catch":{"get":{"description":"Apply the Osmond 2010 CATCH derivation and return high, medium, or low risk plus whether CT of the head is indicated from seven caller-assigned findings after pediatric minor head injury.\n\nWhen an agent has caller-assigned findings after minor head injury in a child and needs the Osmond 2010 CATCH CT rule, not PECARN, CHALICE, Canadian CT Head, NEXUS, or CATCH-2.\n\nNot a medical device. Not a diagnosis. magent does not examine the child or read CT.\n\nThis tool is the Osmond 2010 CATCH derivation only. It is not CATCH-2 (2018) and does not use CATCH-2 refinement items or cutoffs.\n\nNot PECARN, not CHALICE, not the Canadian CT Head Rule, and not NEXUS.\n\nDerivation enrolled children 0-16 years with minor head injury (GCS 13-15 plus loss of consciousness, amnesia, disorientation, persistent vomiting, or irritability). magent does not take numeric age.\n\nThe caller assigns all seven findings. Dangerous mechanism is caller-assigned (paper examples: motor vehicle collision, fall from elevation ≥3 ft / ≥91 cm or 5 stairs, fall from bicycle with no helmet). magent does not classify mechanism. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"gcs_lt_15_at_2h","description":"GCS score <15 at two hours after injury. true or false as assigned by the caller. High-risk (need for neurologic intervention). magent does not take a GCS integer.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"suspected_open_or_depressed_skull_fracture","description":"Suspected open or depressed skull fracture. true or false as assigned by the caller. High-risk (need for neurologic intervention). magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"worsening_headache","description":"History of worsening headache. true or false as assigned by the caller. High-risk (need for neurologic intervention).","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"irritability","description":"Irritability on examination. true or false as assigned by the caller. High-risk (need for neurologic intervention). magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"basal_skull_fracture","description":"Any sign of basal skull fracture. true or false as assigned by the caller. Medium-risk (brain injury on CT). magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"large_boggy_scalp_hematoma","description":"Large, boggy hematoma of the scalp. true or false as assigned by the caller. Medium-risk (brain injury on CT). magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"dangerous_mechanism","description":"Dangerous mechanism of injury as assigned by the caller. true or false. Medium-risk (brain injury on CT). Paper examples: motor vehicle collision, fall from elevation ≥3 ft / ≥91 cm or 5 stairs, fall from bicycle with no helmet. magent does not classify mechanism.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"CATCH","operationId":"get_api_calc_catch","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, catch_high_risk, catch_medium_risk, catch_low_risk, ct_indicated, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/catch"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CATCH (bulk)","operationId":"post_api_calc_catch","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/catch"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"basal_skull_fracture":"false","dangerous_mechanism":"false","gcs_lt_15_at_2h":"false","irritability":"false","large_boggy_scalp_hematoma":"false","suspected_open_or_depressed_skull_fracture":"false","worsening_headache":"false"},{"basal_skull_fracture":"false","dangerous_mechanism":"false","gcs_lt_15_at_2h":"false","irritability":"false","large_boggy_scalp_hematoma":"false","suspected_open_or_depressed_skull_fracture":"false","worsening_headache":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ada-diabetes":{"get":{"description":"Sum the Bang 2009 Table 2 development screening score for undiagnosed diabetes and return high_risk when the total is ≥5.\n\nWhen an agent needs the published Bang 2009 Table 2 point total (BMI-only, no waist) and must not invent a diabetes diagnosis or a prediabetes cutpoint of 4.\n\nNot a medical device. magent does not diagnose diabetes or assay glucose.\n\nBang 2009 Table 2 development scores only. Not Appendix ARIC/CHS coefficients. Not the ADA questionnaires the paper compared.\n\nhigh_risk is score ≥5 from that paper (chosen cutpoint for undiagnosed diabetes). A prediabetes cutpoint of 4 is not implemented.\n\nObesity is from caller-supplied BMI only. This tool does not take waist circumference.\n\nPhysically active scores −1; the total may be −1. BMI is caller-supplied kg/m^2; magent does not compute BMI from height and weight. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (20-120). Bang 2009 Table 2: <40 scores 0; 40-49 scores 1; 50-59 scores 2; ≥60 scores 3. Age 40 and 49 score 1; 50 and 59 score 2; 60 scores 3.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"sex","description":"female or male. Bang 2009 Table 2: female scores 0; male scores 1.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"bmi_kg_m2","description":"Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI from height and weight. Bang 2009 Table 2 obesity from BMI only (no waist): ≥40 extremely obese scores 3; 30 ≤ BMI < 40 obese scores 2; 25 ≤ BMI < 30 overweight scores 1; else 0. 25.0 scores 1; 30.0 scores 2; 40.0 scores 3.","required":true,"schema":{"type":"number"},"example":"22"},{"in":"query","name":"family_history_diabetes","description":"Family history of diabetes (Bang 2009 Table 2). true scores 1; false scores 0.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypertension","description":"History of hypertension (Bang 2009 Table 2). true scores 1; false scores 0. magent does not read a medication list or measure blood pressure.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"physically_active","description":"Physically active (Bang 2009 Table 2). true scores −1; false scores 0. The total may be −1.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Bang diabetes screening","operationId":"get_api_calc_ada_diabetes","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, high_risk, age_years, bmi_kg_m2, sex, components, citation, disclaimer."},"400":{"description":"invalid_ada_diabetes: ADA diabetes screening-score inputs must be numeric age 20-120, sex, BMI, and the Bang 2009 family-history, hypertension, and physical-activity flags. Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ada-diabetes"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Bang diabetes screening (bulk)","operationId":"post_api_calc_ada_diabetes","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ada_diabetes: ADA diabetes screening-score inputs must be numeric age 20-120, sex, BMI, and the Bang 2009 family-history, hypertension, and physical-activity flags. Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ada-diabetes"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","bmi_kg_m2":"22","family_history_diabetes":"false","hypertension":"false","physically_active":"true","sex":"female"},{"age":"40","bmi_kg_m2":"22","family_history_diabetes":"false","hypertension":"false","physically_active":"true","sex":"female"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/das28-crp":{"get":{"description":"Compute the Wells 2009 28-joint Disease Activity Score based on C-reactive protein from caller-assigned TJC28, SJC28, CRP in mg/L, and 0–100 mm general health, including the +0.96 constant, and return DAS28-defined remission when the score is <2.6.\n\nWhen an agent already has caller-assigned 28-joint tender and swollen counts, CRP in mg/L, and general health on a 0–100 mm VAS and needs the published Wells 2009 DAS28(CRP), not DAS28-ESR, not SDAI (CRP mg/dL and 0–10 globals), and not CDAI.\n\nNot a medical device and not a rheumatoid arthritis diagnosis or a treatment order.\n\nmagent does not count joints or assay CRP. tjc28, sjc28, crp_mg_l, and gh are caller-assigned. CRP is mg/L as published, not mg/dL (SDAI). GH is 0–100 mm VAS, not 0–10 cm. The 0–500 CRP range is a magent clamp.\n\nComputes DAS28(CRP) only, including the +0.96 constant. Does not compute DAS28(ESR). Not SDAI. Not CDAI.\n\nWells 2009 classifies DAS28-defined remission as a score <2.6. EULAR good/moderate/none response in that paper needs a prior DAS28 and is not this tool. magent does not apply 3.2/5.1 as single-visit activity bands. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"tjc28","description":"Caller-assigned tender joint count on the 28-joint set (Wells 2009 DAS28-CRP). Integer 0-28. magent does not count joints.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"sjc28","description":"Caller-assigned swollen joint count on the 28-joint set (Wells 2009 DAS28-CRP). Integer 0-28. magent does not count joints.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"crp_mg_l","description":"Caller-assigned C-reactive protein in mg/L (Wells 2009; not mg/dL SDAI). Number 0-500 is a magent clamp. magent does not assay CRP.","required":true,"schema":{"type":"number"},"example":"1"},{"in":"query","name":"gh","description":"Caller-assigned general health (patient assessment) on a 0-100 mm VAS (Wells 2009; 0=best, 100=worst). Number 0-100. Not 0-10 cm SDAI PGA. magent does not examine the patient.","required":true,"schema":{"type":"number"},"example":"0"}],"summary":"DAS28-CRP","operationId":"get_api_calc_das28_crp","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, das28_crp_band, tjc28, sjc28, crp_mg_l, gh, citation, disclaimer."},"400":{"description":"invalid_das28_crp: DAS28-CRP inputs must match Wells 2009 28-joint counts, CRP mg/L, and 0-100 general health. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/das28-crp"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"DAS28-CRP (bulk)","operationId":"post_api_calc_das28_crp","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_das28_crp: DAS28-CRP inputs must match Wells 2009 28-joint counts, CRP mg/L, and 0-100 general health. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/das28-crp"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"crp_mg_l":"1","gh":"0","sjc28":"0","tjc28":"0"},{"crp_mg_l":"1","gh":"0","sjc28":"0","tjc28":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pedocs":{"get":{"description":"Compute the Weiss 2007 PEDOCS two-variable score from caller-supplied waiting-room patients and total registered patients.\n\nWhen an agent has the published snapshot counts for a pediatric ED and needs the Weiss 2007 two-variable PEDOCS score, not a diversion or ambulance-bypass order.\n\nNot a medical device. Not a diversion or ambulance-bypass order.\n\nmagent does not count patients. Caller supplies waiting-room and total registered counts. Waiting-room count cannot exceed total registered.\n\nWeiss 2007 reduced two-variable model for a pediatric ED. Academic NEDOCS and community CEDOCS are different tools.\n\nThe paper's expert-consensus outcome scale is 0-200 with Likert anchors at 0 (not busy), 40 (busy), 80 (extremely busy but not overcrowded), 120 (overcrowded), 160 (severely overcrowded), and 200 (dangerously overcrowded). magent does not clamp the linear combination, does not apply a NEDOCS ≥100 overcrowding cutoff, and does not invent 20/60/100 named class bands.\n\nDoes not apply a later bed-capacity correction. Not a diagnosis of crowding-related harm. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"waiting_room_patients","description":"Patients in the waiting room (integer 0-200). Cannot exceed total_registered_patients. Weiss 2007 two-variable model. magent does not count waiting-room patients.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"total_registered_patients","description":"Total patients currently registered in the pediatric ED, including those in the waiting room (integer 0-400). Must be at least waiting_room_patients. Weiss 2007 two-variable model. magent does not count patients.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"PEDOCS","operationId":"get_api_calc_pedocs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, waiting_room_patients, total_registered_patients, pedocs_score, citation, disclaimer."},"400":{"description":"invalid_pedocs: PEDOCS needs Weiss 2007 pediatric waiting-room and registered-patient counts in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pedocs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PEDOCS (bulk)","operationId":"post_api_calc_pedocs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pedocs: PEDOCS needs Weiss 2007 pediatric waiting-room and registered-patient counts in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pedocs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"total_registered_patients":"0","waiting_room_patients":"0"},{"total_registered_patients":"0","waiting_room_patients":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/villalta":{"get":{"description":"Sum five caller-assigned Villalta symptoms and six signs (each integer 0-3) and return the Kahn 2009 PTS band. Venous ulcer is a separate boolean and is not added as 15 points.\n\nWhen an agent has already assigned Kahn 2009 0-3 integers for the eleven items and a venous-ulcer flag and needs the published total and PTS band, not a limb exam, CEAP, VCSS, or Ginsberg PTS.\n\nNot a medical device and not a PTS diagnosis, anticoagulation, or compression order. magent does not examine the limb.\n\nEach of the eleven items is a caller-assigned integer 0-3 (0 none, 1 mild, 2 moderate, 3 severe). Venous ulcer is a separate boolean and is not added as 15 points to the numeric score.\n\nKahn 2009 ISTH SSC bands: none 0-4 without ulcer; mild 5-9; moderate 10-14; severe if score ≥15 or ulcer is present even when the sum is <15.\n\nNot CEAP, not VCSS, and not Ginsberg PTS. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"pain","description":"Caller-assigned Kahn 2009 Villalta symptom pain (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"cramps","description":"Caller-assigned Kahn 2009 Villalta symptom cramps (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"heaviness","description":"Caller-assigned Kahn 2009 Villalta symptom heaviness (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"pruritus","description":"Caller-assigned Kahn 2009 Villalta symptom pruritus (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"paresthesia","description":"Caller-assigned Kahn 2009 Villalta symptom paresthesia (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"pretibial_edema","description":"Caller-assigned Kahn 2009 Villalta sign pretibial edema (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"skin_induration","description":"Caller-assigned Kahn 2009 Villalta sign skin induration (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"hyperpigmentation","description":"Caller-assigned Kahn 2009 Villalta sign hyperpigmentation (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"venous_ectasia","description":"Caller-assigned Kahn 2009 Villalta sign venous ectasia (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"redness","description":"Caller-assigned Kahn 2009 Villalta sign redness (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"pain_on_calf_compression","description":"Caller-assigned Kahn 2009 Villalta sign pain on calf compression (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"ulcer","description":"Caller-assigned venous ulcer (true or false). Presence classifies PTS as severe (Kahn 2009) and does not add 15 to the numeric score. magent does not examine the limb.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Villalta","operationId":"get_api_calc_villalta","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, pts, pts_band, ulcer, components, citation, disclaimer."},"400":{"description":"invalid_villalta: each Villalta symptom and sign must be an integer 0-3 (Kahn 2009 ISTH; 0 none, 1 mild, 2 moderate, 3 severe). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/villalta"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Villalta (bulk)","operationId":"post_api_calc_villalta","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_villalta: each Villalta symptom and sign must be an integer 0-3 (Kahn 2009 ISTH; 0 none, 1 mild, 2 moderate, 3 severe). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/villalta"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"cramps":"0","heaviness":"0","hyperpigmentation":"0","pain":"0","pain_on_calf_compression":"0","paresthesia":"0","pretibial_edema":"0","pruritus":"0","redness":"0","skin_induration":"0","ulcer":"false","venous_ectasia":"0"},{"cramps":"0","heaviness":"0","hyperpigmentation":"0","pain":"0","pain_on_calf_compression":"0","paresthesia":"0","pretibial_edema":"0","pruritus":"0","redness":"0","skin_induration":"0","ulcer":"false","venous_ectasia":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-functional-defecation":{"get":{"description":"Apply the Rao 2016 Rome IV F3 functional defecation disorders criteria and return evacuation_tests_met (0-3) and whether the published F3 parent box holds (rome_iv_functional_defecation).\n\nWhen an agent already has the caller-assigned Rao 2016 F3 flags (FC and/or IBS with constipation already satisfied, plus the three evacuation-test results and timing) and needs whether the published F3 parent box holds. magent does not re-run FC or IBS-C and does not perform balloon expulsion, manometry, EMG, or imaging.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose functional defecation disorders.\n\nThe caller assigns the six flags. magent does not perform balloon expulsion, anorectal manometry, anal surface EMG, or imaging, and does not re-run functional constipation or IBS with constipation.\n\nThis tool is the Rao 2016 Rome IV F3 parent box only. F3a inadequate propulsion and F3b dyssynergic defecation apply to patients who already satisfy FDD and are copy-only; they are not separate diagnoses from this tool. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"satisfies_fc_and_or_ibs_with_constipation","description":"The patient already satisfies diagnostic criteria for functional constipation and/or IBS with constipation, as assigned (Rao 2016 F3). true or false as assigned by the caller. magent does not re-run those tools.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"abnormal_balloon_expulsion","description":"Abnormal balloon expulsion test (one of three evacuation tests; at least two required). true or false as assigned by the caller. magent does not perform balloon expulsion.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"abnormal_anorectal_evacuation_pattern_manometry_or_emg","description":"Abnormal anorectal evacuation pattern with manometry or anal surface EMG (one of three evacuation tests; at least two required). true or false as assigned by the caller. magent does not perform manometry or EMG.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"impaired_rectal_evacuation_by_imaging","description":"Impaired rectal evacuation by imaging (one of three evacuation tests; at least two required). true or false as assigned by the caller. magent does not perform imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"fulfilled_last_3_months","description":"Criteria fulfilled for the last 3 months, as assigned (Rao 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"onset_at_least_6_months","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Rao 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV functional defecation","operationId":"get_api_calc_rome_iv_functional_defecation","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, evacuation_tests_met, rome_iv_functional_defecation, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_functional_defecation: Rome IV functional defecation needs the Rao 2016 F3 constipation and evacuation-test flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-functional-defecation"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV functional defecation (bulk)","operationId":"post_api_calc_rome_iv_functional_defecation","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_functional_defecation: Rome IV functional defecation needs the Rao 2016 F3 constipation and evacuation-test flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-functional-defecation"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"abnormal_anorectal_evacuation_pattern_manometry_or_emg":"true","abnormal_balloon_expulsion":"true","fulfilled_last_3_months":"true","impaired_rectal_evacuation_by_imaging":"false","onset_at_least_6_months":"true","satisfies_fc_and_or_ibs_with_constipation":"true"},{"abnormal_anorectal_evacuation_pattern_manometry_or_emg":"true","abnormal_balloon_expulsion":"true","fulfilled_last_3_months":"true","impaired_rectal_evacuation_by_imaging":"false","onset_at_least_6_months":"true","satisfies_fc_and_or_ibs_with_constipation":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/4peps":{"get":{"description":"Sum the Roy 2021 Table 3 4-level clinical pretest probability (4PEPS) items and return score and cpp (very_low, low, moderate, or high).\n\nWhen an agent already has the published Table 3 findings assigned and needs the 4PEPS total and clinical probability band, not an imaging or D-dimer order.\n\nNot a medical device and not an imaging or D-dimer order. magent does not examine the patient or decide “PE most likely”.\n\nAge 65–80 and >80 were not independently associated in Table 3; ages ≥65 score 0 for the age item. Heart rate 80–100 was not independently associated; this tool does not add tachycardia points.\n\nImmobility is the Table 3 footnote: surgery, lower limb plaster cast, or bedridden more than 3 days for an acute medical condition within the last 4 weeks, as assigned by the caller.\n\nClinical probability cutoffs are Table 3: very_low <0, low 0–5, moderate 6–12, high ≥13. Score may be negative. max_score is 22 when age ≥65 and all positive items fire. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120). Roy 2021 Table 3: <50 scores −2; 50-64 scores −1; ≥65 scores 0 (65-80 and >80 were not independently associated).","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"chronic_respiratory_disease","description":"Chronic respiratory disease (Roy 2021 Table 3). true scores −1. Assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats per minute (integer 30-220). Table 3: <80 scores −1. 80-100 was not independently associated; this tool does not add tachycardia points.","required":true,"schema":{"type":"integer"},"example":"90"},{"in":"query","name":"chest_pain_and_acute_dyspnea","description":"Both chest pain and acute dyspnea present as assigned by the caller (Roy 2021 Table 3). true scores +1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"sex","description":"female or male (Roy 2021 Table 3). Male scores +2. Female scores 0. Assigned by the caller.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"hormonal_estrogenic_treatment","description":"Hormonal estrogenic treatment as assigned by the caller (Roy 2021 Table 3). true scores +2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"personal_history_vte","description":"Personal history of VTE as assigned by the caller (Roy 2021 Table 3). true scores +2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"syncope","description":"Syncope as assigned by the caller (Roy 2021 Table 3). true scores +2. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"immobility_4w","description":"Immobility within 4 weeks (Roy 2021 Table 3 footnote a): surgery, lower limb plaster cast, or bedridden more than 3 days for an acute medical condition. true scores +2. Assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"spo2_percent","description":"Oxygen saturation percent (50-100). Roy 2021 Table 3: <95 scores +3; 95 and above score 0.","required":true,"schema":{"type":"number"},"example":"98"},{"in":"query","name":"calf_pain_or_unilateral_edema","description":"Calf pain and/or unilateral lower-limb edema as assigned by the caller (Roy 2021 Table 3). true scores +3. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pe_most_likely","description":"PE is the most likely diagnosis as assigned by the caller (Roy 2021 Table 3). true scores +5. magent does not examine the patient or decide PE most likely.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"4PEPS","operationId":"get_api_calc_4peps","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, cpp, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/4peps"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"4PEPS (bulk)","operationId":"post_api_calc_4peps","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/4peps"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","calf_pain_or_unilateral_edema":"false","chest_pain_and_acute_dyspnea":"false","chronic_respiratory_disease":"false","heart_rate_bpm":"90","hormonal_estrogenic_treatment":"false","immobility_4w":"false","pe_most_likely":"false","personal_history_vte":"false","sex":"female","spo2_percent":"98","syncope":"false"},{"age":"40","calf_pain_or_unilateral_edema":"false","chest_pain_and_acute_dyspnea":"false","chronic_respiratory_disease":"false","heart_rate_bpm":"90","hormonal_estrogenic_treatment":"false","immobility_4w":"false","pe_most_likely":"false","personal_history_vte":"false","sex":"female","spo2_percent":"98","syncope":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/renal-nephrometry":{"get":{"description":"Sum the Kutikov 2009 R.E.N.A.L. nephrometry score for a renal mass from four caller-assigned published item points (radius, exophytic/endophytic, nearness, location) and return the integer total (4–12) plus anterior and hilar descriptors. Does not return complexity bands.\n\nWhen an agent has already assigned Kutikov 2009 radius, exophytic/endophytic properties, nearness to collecting system or sinus, anterior/posterior descriptor, polar-line location, and hilar abutment for a renal mass and needs the published integer sum, not a nephrectomy order, CT read, PADUA, or STONE nephrolithometry.\n\nNot a medical device. magent does not measure diameter, exophytic fraction, nearness, polar lines, or hilar abutment. Radius, exophytic, nearness, anterior, location, and hilar are caller-assigned.\n\nNot a nephrectomy order. The score is not a command to operate, choose partial versus radical nephrectomy, or select a surgical approach.\n\nNot PADUA and not Okhunov 2013 STONE nephrolithometry. This tool is Kutikov 2009 R.E.N.A.L. nephrometry for renal masses.\n\nKutikov 2009 Table 1 scores R, E, N, and L (1–3 each). Anterior (a/p/x) and hilar suffix h are descriptors, not points. magent returns score and max_score only; it does not return low/moderate/high complexity bands. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"radius","description":"Caller-assigned maximal diameter in cm (Kutikov 2009 R, radius). le_4 (≤4 cm) scores 1; gt_4_lt_7 (>4 but <7 cm) scores 2; ge_7 (≥7 cm) scores 3. magent does not measure diameter or read CT.","required":true,"schema":{"type":"string","enum":["le_4","gt_4_lt_7","ge_7"]},"example":"le_4"},{"in":"query","name":"exophytic","description":"Caller-assigned exophytic/endophytic properties (Kutikov 2009 E). ge_50 (≥50% exophytic) scores 1; lt_50 (<50% exophytic) scores 2; entirely_endophytic (completely endophytic) scores 3. magent does not read CT.","required":true,"schema":{"type":"string","enum":["ge_50","lt_50","entirely_endophytic"]},"example":"ge_50"},{"in":"query","name":"nearness","description":"Caller-assigned nearness of the deepest portion of the mass to the collecting system or sinus in mm (Kutikov 2009 N). ge_7 (≥7 mm) scores 1; gt_4_lt_7 (>4 but <7 mm) scores 2; le_4 (≤4 mm) scores 3. magent does not measure nearness or read CT.","required":true,"schema":{"type":"string","enum":["ge_7","gt_4_lt_7","le_4"]},"example":"ge_7"},{"in":"query","name":"anterior","description":"Caller-assigned anterior/posterior descriptor (Kutikov 2009 A). a (anterior), p (posterior), or x (indeterminate). 0 points; echoed as anterior. magent does not read CT.","required":true,"schema":{"type":"string","enum":["a","p","x"]},"example":"a"},{"in":"query","name":"location","description":"Caller-assigned location relative to polar lines (Kutikov 2009 L). entirely_polar (entirely above the upper polar line or entirely below the lower polar line) scores 1; crosses_polar (mass crosses a polar line) scores 2; gt_50_midline_or_between (>50% of the mass is across a polar line, or the mass crosses the axial renal midline, or the mass is entirely between the polar lines) scores 3. magent does not read CT.","required":true,"schema":{"type":"string","enum":["entirely_polar","crosses_polar","gt_50_midline_or_between"]},"example":"entirely_polar"},{"in":"query","name":"hilar","description":"Caller-assigned hilar suffix (Kutikov 2009). true means the mass abuts the main renal artery or vein (suffix h). Boolean, not points. magent does not read CT.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"R.E.N.A.L. nephrometry","operationId":"get_api_calc_renal_nephrometry","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, r, e, n, l, radius, exophytic, nearness, anterior, location, hilar, renal_string, components, citation, disclaimer."},"400":{"description":"invalid_renal_nephrometry: radius must be le_4, gt_4_lt_7, or ge_7; exophytic must be ge_50, lt_50, or entirely_endophytic; nearness must be ge_7, gt_4_lt_7, or le_4; anterior must be a, p, or x; location must be entirely_polar, crosses_polar, or gt_50_midline_or_between (Kutikov 2009 R.E.N.A.L.). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/renal-nephrometry"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"R.E.N.A.L. nephrometry (bulk)","operationId":"post_api_calc_renal_nephrometry","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_renal_nephrometry: radius must be le_4, gt_4_lt_7, or ge_7; exophytic must be ge_50, lt_50, or entirely_endophytic; nearness must be ge_7, gt_4_lt_7, or le_4; anterior must be a, p, or x; location must be entirely_polar, crosses_polar, or gt_50_midline_or_between (Kutikov 2009 R.E.N.A.L.). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/renal-nephrometry"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"anterior":"a","exophytic":"ge_50","hilar":"false","location":"entirely_polar","nearness":"ge_7","radius":"le_4"},{"anterior":"a","exophytic":"ge_50","hilar":"false","location":"entirely_polar","nearness":"ge_7","radius":"le_4"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pts":{"get":{"description":"Compute the Tepas 1987 Pediatric Trauma Score from caller-assigned weight, airway, systolic BP, CNS, skeletal, and wound grades.\n\nWhen an agent needs the published Tepas 1987 six-item Pediatric Trauma Score and must not substitute ISS or RTS or treat the total as a triage order.\n\nNot a medical device and not a triage, trauma-activation, or transport order. magent does not examine the child.\n\nTepas 1987 Pediatric Trauma Score only. Not ISS, not RTS, and not a triage order of care.\n\nWeight is the size item (>20 kg +2, 10–20 kg +1, <10 kg −1). Adult age is not required.\n\nAirway, CNS, skeletal, and wound grades are caller-assigned tokens. magent does not inspect the airway or skeleton.\n\nscore_le_8 follows the paper's association of scores ≤8 with significant mortality and the need for trauma-center care. It is not a disposition. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"weight_kg","description":"Weight in kilograms (1-500), the Tepas 1987 size item. Provide weight_kg or weight_lb. >20 → +2; 10-20 inclusive → +1; <10 → −1.","required":false,"schema":{"type":"number"},"example":"25"},{"in":"query","name":"weight_lb","description":"Weight in pounds (2-1100). Converted as kg = lb * 0.45359237.","required":false,"schema":{"type":"number"},"example":"55.1156"},{"in":"query","name":"airway","description":"Caller-assigned airway (normal, maintainable, or unmaintainable). Tepas 1987: normal → +2, maintainable → +1, unmaintainable → −1. magent does not examine the airway.","required":true,"schema":{"type":"string","enum":["normal","maintainable","unmaintainable"]},"example":"normal"},{"in":"query","name":"systolic_mm_hg","description":"Systolic blood pressure in mm Hg (integer 0-300). Tepas 1987: >90 → +2; 50-90 inclusive → +1; <50 → −1. 0 is a published −1 band.","required":true,"schema":{"type":"integer"},"example":"100"},{"in":"query","name":"cns","description":"Caller-assigned CNS (awake, obtunded, or coma). Tepas 1987: awake → +2, obtunded → +1, coma → −1. magent does not examine the child.","required":true,"schema":{"type":"string","enum":["awake","obtunded","coma"]},"example":"awake"},{"in":"query","name":"skeletal","description":"Caller-assigned skeletal injury (none, closed, or open_or_multiple). Tepas 1987: none → +2, closed → +1, open_or_multiple → −1. magent does not assign fractures.","required":true,"schema":{"type":"string","enum":["none","closed","open_or_multiple"]},"example":"none"},{"in":"query","name":"wound","description":"Caller-assigned cutaneous wound (none, minor, or major). Tepas 1987: none → +2, minor → +1, major → −1. magent does not inspect wounds.","required":true,"schema":{"type":"string","enum":["none","minor","major"]},"example":"none"}],"summary":"PTS","operationId":"get_api_calc_pts","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, min_score, score_le_8, weight_kg, airway, systolic_mm_hg, cns, skeletal, wound, components, citation, disclaimer."},"400":{"description":"invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_pts_airway: airway must be normal, maintainable, or unmaintainable (Tepas 1987 Pediatric Trauma Score). Returned before settlement; you are not charged.; invalid_rts_systolic: systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.; invalid_pts_cns: cns must be awake, obtunded, or coma (Tepas 1987 Pediatric Trauma Score). Returned before settlement; you are not charged.; invalid_pts_skeletal: skeletal must be none, closed, or open_or_multiple (Tepas 1987 Pediatric Trauma Score). Returned before settlement; you are not charged.; invalid_pts_wound: wound must be none, minor, or major (Tepas 1987 Pediatric Trauma Score). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pts"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PTS (bulk)","operationId":"post_api_calc_pts","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_pts_airway: airway must be normal, maintainable, or unmaintainable (Tepas 1987 Pediatric Trauma Score). Returned before settlement; you are not charged.; invalid_rts_systolic: systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.; invalid_pts_cns: cns must be awake, obtunded, or coma (Tepas 1987 Pediatric Trauma Score). Returned before settlement; you are not charged.; invalid_pts_skeletal: skeletal must be none, closed, or open_or_multiple (Tepas 1987 Pediatric Trauma Score). Returned before settlement; you are not charged.; invalid_pts_wound: wound must be none, minor, or major (Tepas 1987 Pediatric Trauma Score). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pts"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"airway":"normal","cns":"awake","skeletal":"none","systolic_mm_hg":"100","weight_kg":"25","wound":"none"},{"airway":"normal","cns":"awake","skeletal":"none","systolic_mm_hg":"100","weight_kg":"25","wound":"none"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/stanford-sleepiness":{"get":{"description":"Return the Hoddes 1973 Stanford Sleepiness Scale degree 1-7 from a caller-assigned integer, with the published degree wording.\n\nWhen an agent already has a Stanford Sleepiness Scale degree 1-7 as in Hoddes 1973 and must not invent a pathologic-sleepiness cutoff or an Epworth Sleepiness Scale score. magent does not observe the patient.\n\nNot a medical device and not a diagnosis of a sleep disorder. magent does not observe the patient.\n\nThe caller assigns stanford_sleepiness 1-7. magent does not interview the patient or apply an Epworth Sleepiness Scale.\n\nHoddes 1973 is a single current-state degree 1-7. It does not publish a pathologic-sleepiness cutoff. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"stanford_sleepiness","description":"Hoddes 1973 Stanford Sleepiness Scale degree 1-7 as assigned by the caller (1 feeling active and vital, alert, wide awake; 2 functioning at a high level, but not at peak, able to concentrate; 3 relaxed, awake, not at full alertness, responsive; 4 a little foggy, not at peak, let down; 5 fogginess, beginning to lose interest in remaining awake, slowed down; 6 sleepiness, prefer to be lying down, fighting sleep, woozy; 7 almost in reverie, sleep onset soon, lost struggle to remain awake). Not Epworth. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"1"}],"summary":"Stanford Sleepiness","operationId":"get_api_calc_stanford_sleepiness","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, stanford_sleepiness, score, max_score, description, components, citation, disclaimer."},"400":{"description":"invalid_stanford_sleepiness: stanford_sleepiness must be an integer from 1 to 7 (Hoddes 1973). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/stanford-sleepiness"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Stanford Sleepiness (bulk)","operationId":"post_api_calc_stanford_sleepiness","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_stanford_sleepiness: stanford_sleepiness must be an integer from 1 to 7 (Hoddes 1973). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/stanford-sleepiness"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"stanford_sleepiness":"1"},{"stanford_sleepiness":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/qtc":{"get":{"description":"Compute heart-rate-corrected QT using Bazett or Fridericia. The formula argument is required.\n\nWhen an agent must not apply Bazett silently. Callers must choose formula=bazett or formula=fridericia.\n\nNot a diagnosis and not a drug-safety recommendation.\n\nformula is required. magent does not pick Bazett or Fridericia.\n\nFridericia has no verified DOI in this record; citation is the 1920 Acta Med Scand paper. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"qt_ms","description":"Measured QT interval in milliseconds (200-800).","required":true,"schema":{"type":"number"},"example":"400"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats per minute (30-220). RR_s = 60 / HR.","required":true,"schema":{"type":"integer"},"example":"80"},{"in":"query","name":"formula","description":"Correction formula. Required; magent does not pick one silently.","required":true,"schema":{"type":"string","enum":["bazett","fridericia"]},"example":"bazett"}],"summary":"QTc","operationId":"get_api_calc_qtc","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, qt_ms, heart_rate_bpm, rr_s, qtc_ms, citation, disclaimer."},"400":{"description":"invalid_qt: qt_ms must be a number from 200 to 800 Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_formula: formula must be bazett or fridericia Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/qtc"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"QTc (bulk)","operationId":"post_api_calc_qtc","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_qt: qt_ms must be a number from 200 to 800 Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_formula: formula must be bazett or fridericia Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/qtc"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"formula":"bazett","heart_rate_bpm":"80","qt_ms":"400"},{"formula":"bazett","heart_rate_bpm":"80","qt_ms":"400"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/osta":{"get":{"description":"Compute the Koh 2001 Osteoporosis Self-Assessment Tool for Asians (OSTA) as trunc(0.2 × (weight_kg − age)) toward zero, then the published low, intermediate, or high band.\n\nWhen an agent has age and weight and needs the published Koh 2001 OSTA index and band, not FRAX, not a DXA order, and not a diagnosis of osteoporosis.\n\nNot a medical device. Not a diagnosis of osteoporosis. magent does not weigh the patient.\n\nNot FRAX and not a DXA order. magent returns the Koh 2001 OSTA index and published band only.\n\nKoh 2001 derivation was postmenopausal Asian women. magent does not restrict sex or ethnicity at input. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Koh 2001 OSTA uses age as a whole number of years.","required":true,"schema":{"type":"integer"},"example":"66"},{"in":"query","name":"weight_kg","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"schema":{"type":"number"},"example":"50"},{"in":"query","name":"weight_lb","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"schema":{"type":"number"},"example":"110"}],"summary":"OSTA","operationId":"get_api_calc_osta","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age, weight_kg, osta_index, risk, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/osta"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"OSTA (bulk)","operationId":"post_api_calc_osta","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/osta"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"66","weight_kg":"50"},{"age":"66","weight_kg":"50"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ffm":{"get":{"description":"Compute Boer 1984 sex-specific estimated lean body mass from height, weight, and sex.\n\nWhen an agent already has sex, height, and weight and must not invent kilograms, apply James or Hume formulas, or treat the result as a dosing weight or measured body composition.\n\nNot a medical device. Not a dosing weight. Boer 1984 estimated lean body mass to normalize body fluid volumes; magent does not measure body composition.\n\nBoer 1984 sex-specific estimated lean body mass only. Does not apply James or Hume formulas.\n\nHeight 100-220 cm and weight 20-300 kg are magent clamps, not published Boer input bands.\n\nDoes not report fat mass. magent does not measure the patient. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sex","description":"Sex used by Boer 1984 (separate male and female estimated lean-body-mass equations).","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"weight_kg","description":"Weight in kilograms (20-300, magent clamp; Boer 1984 does not publish an input band).","required":true,"schema":{"type":"number"},"example":"60"},{"in":"query","name":"height_cm","description":"Height in centimeters (100-220, magent clamp; Boer 1984 does not publish an input band).","required":true,"schema":{"type":"number"},"example":"163"}],"summary":"Boer LBM","operationId":"get_api_calc_ffm","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, sex, weight_kg, height_cm, lbm_kg, ffm_kg, citation, disclaimer."},"400":{"description":"invalid_ffm: Fat-free mass needs sex, weight_kg, and height_cm as used in Boer 1984. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ffm"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Boer LBM (bulk)","operationId":"post_api_calc_ffm","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ffm: Fat-free mass needs sex, weight_kg, and height_cm as used in Boer 1984. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ffm"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"height_cm":"163","sex":"female","weight_kg":"60"},{"height_cm":"163","sex":"female","weight_kg":"60"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/irae-hepatitis":{"get":{"description":"Apply Brahmer 2018 ASCO Table 2.2 immune-related hepatitis lab folds (AST or ALT × ULN and total bilirubin × ULN) and return grade 0–4 plus ICI action, with caller-assigned decompensation (grade 4) and symptomatic compensated liver dysfunction (grade 3) upgrades.\n\nWhen an agent has caller AST, ALT, total bilirubin, and laboratory ULNs during immune checkpoint inhibitor therapy and needs the published ASCO 2018 hepatitis grade and continue/hold/permanently discontinue band, not a DILI diagnosis, RUCAM score, or R factor.\n\nNot a medical device. Not a diagnosis. magent does not assay enzymes.\n\nTotal bilirubin is mg/dL only; µmol/L is not accepted.\n\nNot DILI causality and not RUCAM. Not the CIOMS R factor (r-factor).\n\nNot a steroid dose or immunosuppression schedule. icpi_action is the published continue / hold / permanently discontinue band only.\n\nDecompensated liver and symptomatic liver dysfunction are caller-assigned (ascites, encephalopathy, coagulopathy, or coma; symptomatic compensated hepatitis). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ast_u_l","description":"Aspartate aminotransferase in U/L (1-10000). Used with ast_uln_u_l for the AST fold. magent does not assay enzymes.","required":true,"schema":{"type":"number"},"example":"80"},{"in":"query","name":"ast_uln_u_l","description":"Laboratory AST upper limit of normal in U/L (5-200). Required; magent does not assume 40.","required":true,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"alt_u_l","description":"Alanine aminotransferase in U/L (1-10000). Used with alt_uln_u_l for the ALT fold. magent does not assay enzymes.","required":true,"schema":{"type":"number"},"example":"50"},{"in":"query","name":"alt_uln_u_l","description":"Laboratory ALT upper limit of normal in U/L (5-200). Required; magent does not assume 40.","required":true,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"bilirubin_mg_dl","description":"Total bilirubin in mg/dL (0.1-40). µmol/L is not accepted. magent does not assay bilirubin.","required":true,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"bilirubin_uln_mg_dl","description":"Laboratory total-bilirubin upper limit of normal in mg/dL (0.1-5). Required; magent does not assume 1.0.","required":true,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"decompensated_liver","description":"Decompensated liver (ascites, encephalopathy, coagulopathy, or coma) as assigned by the caller (Brahmer 2018). true or false. When true, grade is max(lab_grade, 4). magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"symptomatic_liver_dysfunction","description":"Symptomatic compensated hepatitis / liver dysfunction as assigned by the caller (Brahmer 2018). true or false. When true and decompensated_liver is false, grade is max(lab_grade, 3). magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"irAE hepatitis","operationId":"get_api_calc_irae_hepatitis","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, grade, icpi_action, transaminase_ratio, bilirubin_ratio, ast_u_l, ast_uln_u_l, alt_u_l, alt_uln_u_l, bilirubin_mg_dl, bilirubin_uln_mg_dl, decompensated_liver, symptomatic_liver_dysfunction, criteria, citation, disclaimer."},"400":{"description":"invalid_ast: ast_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.; invalid_ast_uln: ast_uln_u_l must be a number from 5 to 200. Returned before settlement; you are not charged.; invalid_alt: alt_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.; invalid_alt_uln: alt_uln_u_l must be a number from 5 to 200. Returned before settlement; you are not charged.; invalid_bilirubin: bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.; invalid_bilirubin_uln: bilirubin_uln_mg_dl must be a number from 0.1 to 5 (laboratory total-bilirubin ULN mg/dL). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/irae-hepatitis"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"irAE hepatitis (bulk)","operationId":"post_api_calc_irae_hepatitis","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ast: ast_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.; invalid_ast_uln: ast_uln_u_l must be a number from 5 to 200. Returned before settlement; you are not charged.; invalid_alt: alt_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.; invalid_alt_uln: alt_uln_u_l must be a number from 5 to 200. Returned before settlement; you are not charged.; invalid_bilirubin: bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.; invalid_bilirubin_uln: bilirubin_uln_mg_dl must be a number from 0.1 to 5 (laboratory total-bilirubin ULN mg/dL). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/irae-hepatitis"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"alt_u_l":"50","alt_uln_u_l":"40","ast_u_l":"80","ast_uln_u_l":"40","bilirubin_mg_dl":"1.0","bilirubin_uln_mg_dl":"1.0","decompensated_liver":"false","symptomatic_liver_dysfunction":"false"},{"alt_u_l":"50","alt_uln_u_l":"40","ast_u_l":"80","ast_uln_u_l":"40","bilirubin_mg_dl":"1.0","bilirubin_uln_mg_dl":"1.0","decompensated_liver":"false","symptomatic_liver_dysfunction":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/iv-drip":{"get":{"description":"Compute a gravity infusion rate in drops per minute from volume, duration, and the administration-set drop factor (10, 15, or 20 gtt/mL macrodrip or 60 gtt/mL microdrip), and the equivalent mL/hour.\n\nWhen an agent needs the INS gravity gtt/min identity from a caller-assigned volume, time, and printed drop factor and must not invent a pump mL/hour order or a drug dose.\n\nNot a medical device. Not a pump program, drug order, or infusion prescription. magent does not set an infusion pump.\n\nGravity drip only. Drop factor is the caller-assigned administration-set calibration printed on the tubing (10, 15, or 20 gtt/mL macrodrip; 60 gtt/mL microdrip). magent does not choose tubing.\n\ngtt/min is rounded half away from zero to an integer because the cited standard does not specify a rounding mode. ml_per_hour is volume_ml / (time_min/60).\n\nNot Webb 2016 pneumonia DRIP (that is a different magent tool). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"volume_ml","description":"Infused volume in mL (1-10000, magent clamp). Caller-assigned bag or syringe volume; magent does not choose a fluid.","required":true,"schema":{"type":"number"},"example":1000},{"in":"query","name":"time_min","description":"Infusion duration in minutes (1-1440, magent clamp). Convert hours to minutes before calling (8 hours = 480).","required":true,"schema":{"type":"integer"},"example":480},{"in":"query","name":"drop_factor_gtt_ml","description":"Administration-set drop factor in gtt/mL printed on the tubing package: 10, 15, or 20 (macrodrip) or 60 (microdrip). Integers 10, 15, 20, or 60 only. magent does not choose tubing.","required":true,"schema":{"type":"integer","enum":[10,15,20,60]},"example":15}],"summary":"IV gravity drip rate (INS)","operationId":"get_api_calc_iv_drip","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, volume_ml, time_min, drop_factor_gtt_ml, gtt_per_min, ml_per_hour, citation, disclaimer."},"400":{"description":"invalid_iv_drip: IV drip-rate inputs must match volume, time, and drop factor as published for gtt/min. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/iv-drip"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"IV gravity drip rate (INS) (bulk)","operationId":"post_api_calc_iv_drip","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_iv_drip: IV drip-rate inputs must match volume, time, and drop factor as published for gtt/min. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/iv-drip"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"drop_factor_gtt_ml":"15","time_min":"480","volume_ml":"1000"},{"drop_factor_gtt_ml":"15","time_min":"480","volume_ml":"1000"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/subtle-stemi":{"get":{"description":"Compute the Driver 2017 4-variable formula that differentiates normal-variant ST elevation in V2-V4 (early repolarization) from subtle left anterior descending coronary occlusion, using computerized Bazett QTc, total QRS amplitude in V2, R-wave amplitude in V4, and ST elevation at 60 ms after the J-point in V3.\n\nWhen an agent has caller-measured millimetre amplitudes and a computerized Bazett QTc, the tracing has ≥1 mm ST elevation in V2-V4, and the differential is subtle LAD occlusion versus early repolarization. Do not use when obvious occlusion features are present.\n\nNot a medical device. Not a STEMI diagnosis and not a catheterization-lab order.\n\nIntended only when there is ≥1 mm ST elevation in V2-V4 and the differential is subtle LAD occlusion versus early repolarization (normal-variant STE). Do not apply if obvious occlusion features are present: STE >5 mm, Q waves in V2-V4, terminal QRS distortion, anterior ST depression, inferior reciprocal change, or LVH.\n\nInputs are caller-supplied millimetre amplitudes and a computerized Bazett QTc. magent does not read the ECG.\n\nDriver 2017 4-variable formula only (QTc, QRS V2, R V4, STE at 60 ms in V3). Not the 3-variable formula.\n\nlad_occlusion_suggested is true iff the rounded formula_value is ≥18.2, the derivation cutpoint with highest accuracy. magent does not assign other clinical bands. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"qtc_ms","description":"Computerized Bazett QTc in milliseconds (200-800). Driver 2017.","required":true,"schema":{"type":"number"},"example":"400"},{"in":"query","name":"qrs_v2_mm","description":"Total QRS amplitude in V2 (R+S) in millimetres at standard calibration (0.1-50). Driver 2017.","required":true,"schema":{"type":"number"},"example":"20"},{"in":"query","name":"r_v4_mm","description":"R-wave amplitude in V4 in millimetres at standard calibration (0.1-50). Driver 2017.","required":true,"schema":{"type":"number"},"example":"15"},{"in":"query","name":"ste60_v3_mm","description":"ST elevation at 60 ms after the J-point in V3, in millimetres (0-10). Driver 2017.","required":true,"schema":{"type":"number"},"example":"1"}],"summary":"4-variable anterior STE","operationId":"get_api_calc_subtle_stemi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, qtc_ms, qrs_v2_mm, r_v4_mm, ste60_v3_mm, formula_value, lad_occlusion_suggested, citation, disclaimer."},"400":{"description":"invalid_qtc_ms: qtc_ms must be a number from 200 to 800 (Thiruganasambandamoorthy 2016 CSRS). Returned before settlement; you are not charged.; invalid_precordial_mm: qrs_v2_mm and r_v4_mm must each be a number from 0.1 to 50 (Driver 2017 millimetres at standard calibration). Returned before settlement; you are not charged.; invalid_st_deviation_mm: st_deviation_mm must be a number from 0 to 10 (Mark 1991 maximal ST deviation in millimetres). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/subtle-stemi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"4-variable anterior STE (bulk)","operationId":"post_api_calc_subtle_stemi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_qtc_ms: qtc_ms must be a number from 200 to 800 (Thiruganasambandamoorthy 2016 CSRS). Returned before settlement; you are not charged.; invalid_precordial_mm: qrs_v2_mm and r_v4_mm must each be a number from 0.1 to 50 (Driver 2017 millimetres at standard calibration). Returned before settlement; you are not charged.; invalid_st_deviation_mm: st_deviation_mm must be a number from 0 to 10 (Mark 1991 maximal ST deviation in millimetres). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/subtle-stemi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"qrs_v2_mm":"20","qtc_ms":"400","r_v4_mm":"15","ste60_v3_mm":"1"},{"qrs_v2_mm":"20","qtc_ms":"400","r_v4_mm":"15","ste60_v3_mm":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/cas":{"get":{"description":"Sum five caller-assigned Lee 2020 Coronavirus Anxiety Scale integers (0-4) and return the published total (max 20) and ≥9 screen.\n\nWhen an agent has already assigned Lee 2020 CAS 0-4 integers for each of the five items over the past two weeks and needs the published total and ≥9 screen, not a GAD-7 score, PHQ-9, or an anxiety diagnosis. magent does not interview the patient.\n\nNot a medical device and not a diagnosis or treatment order.\n\ndizzy, sleep, paralyzed, appetite, and nausea are caller-assigned integers 0-4 for the past two weeks (0 not at all, 1 rare less than a day or two, 2 several days, 3 more than 7 days, 4 nearly every day). magent does not interview the patient or interpret the items.\n\nLee 2020 published an optimized cut of ≥9 for probable dysfunctional coronavirus-related anxiety (90% sensitivity, 85% specificity in this paper). magent does not invent extra mild/moderate severity bands. screen_ge_9 is that published screen, not a diagnosis.\n\nThis is Lee 2020 CAS only (five items; max 20). The scale is public domain per the author; still cite Lee 2020. magent does not score GAD-7 or PHQ-9 here. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"dizzy","description":"Caller-assigned Lee 2020 CAS item 1 (integer 0-4, past two weeks): I felt dizzy, lightheaded, or faint when I read or listened to news about the coronavirus (0 not at all, 1 rare less than a day or two, 2 several days, 3 more than 7 days, 4 nearly every day). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"sleep","description":"Caller-assigned Lee 2020 CAS item 2 (integer 0-4, past two weeks): I had trouble falling or staying asleep because I was thinking about the coronavirus (0 not at all, 1 rare less than a day or two, 2 several days, 3 more than 7 days, 4 nearly every day). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"paralyzed","description":"Caller-assigned Lee 2020 CAS item 3 (integer 0-4, past two weeks): I felt paralyzed or frozen when I thought about or was exposed to information about the coronavirus (0 not at all, 1 rare less than a day or two, 2 several days, 3 more than 7 days, 4 nearly every day). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"appetite","description":"Caller-assigned Lee 2020 CAS item 4 (integer 0-4, past two weeks): I lost interest in eating when I thought about or was exposed to information about the coronavirus (0 not at all, 1 rare less than a day or two, 2 several days, 3 more than 7 days, 4 nearly every day). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"nausea","description":"Caller-assigned Lee 2020 CAS item 5 (integer 0-4, past two weeks): I felt nauseous or had stomach problems when I thought about or was exposed to information about the coronavirus (0 not at all, 1 rare less than a day or two, 2 several days, 3 more than 7 days, 4 nearly every day). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"CAS","operationId":"get_api_calc_cas","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, screen_ge_9, components, citation, disclaimer."},"400":{"description":"invalid_cas: CAS needs the five Lee 2020 items as integers 0-4 (not at all through nearly every day). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cas"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CAS (bulk)","operationId":"post_api_calc_cas","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_cas: CAS needs the five Lee 2020 items as integers 0-4 (not at all through nearly every day). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cas"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"appetite":"0","dizzy":"0","nausea":"0","paralyzed":"0","sleep":"0"},{"appetite":"0","dizzy":"0","nausea":"0","paralyzed":"0","sleep":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/four-score":{"get":{"description":"Compute the FOUR score as the sum of caller-assigned eye, motor, brainstem, and respiration integers 0-4.\n\nWhen an agent has already assigned the Wijdicks 2005 FOUR component integers (0-4) and needs the published total, not a GCS conversion or a narrative-to-score mapping.\n\nNot a diagnosis and not a trauma triage, intubation, or disposition order.\n\nEye, motor, brainstem, and respiration are caller-supplied integers 0-4. magent does not observe the four signs and does not pick a component from a narrative.\n\nTotal is 0-16. magent does not add outcome bands beyond that published range. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"eye","description":"Caller-assigned Wijdicks 2005 eye points (integer 0-4). magent does not pick the component from a narrative. 4 tracking or blink to command; 3 open not tracking; 2 open to voice; 1 open to pain; 0 closed to pain.","required":true,"schema":{"type":"integer"},"example":"4"},{"in":"query","name":"motor","description":"Caller-assigned Wijdicks 2005 motor points (integer 0-4). magent does not pick the component from a narrative. 4 thumbs-up, fist, or peace to command; 3 localizing; 2 flexion; 1 extension; 0 none or myoclonus status.","required":true,"schema":{"type":"integer"},"example":"4"},{"in":"query","name":"brainstem","description":"Caller-assigned Wijdicks 2005 brainstem points (integer 0-4). magent does not pick the component from a narrative. 4 pupil and corneal present; 3 one pupil wide and fixed; 2 pupil or corneal absent; 1 pupil and corneal absent; 0 pupil, corneal, and cough absent.","required":true,"schema":{"type":"integer"},"example":"4"},{"in":"query","name":"respiration","description":"Caller-assigned Wijdicks 2005 respiration points (integer 0-4). magent does not pick the component from a narrative. 4 not intubated regular; 3 Cheyne-Stokes; 2 irregular; 1 breathes above ventilator; 0 ventilator rate or apnea.","required":true,"schema":{"type":"integer"},"example":"4"}],"summary":"FOUR score","operationId":"get_api_calc_four_score","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_four_component: eye, motor, brainstem, and respiration must each be an integer from 0 to 4 (Wijdicks 2005). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/four-score"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"FOUR score (bulk)","operationId":"post_api_calc_four_score","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_four_component: eye, motor, brainstem, and respiration must each be an integer from 0 to 4 (Wijdicks 2005). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/four-score"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"brainstem":"4","eye":"4","motor":"4","respiration":"4"},{"brainstem":"4","eye":"4","motor":"4","respiration":"4"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/lips":{"get":{"description":"Sum Gajic 2011 Table 3 lung injury prediction score items from caller-assigned flags and return the published ROC cutoff band (low <4, high ≥4).\n\nWhen an agent needs the published LIPS point total and must not invent an ARDS diagnosis or additional cut-points.\n\nNot a medical device. Not an ARDS diagnosis. magent does not examine the patient or read imaging; every flag is caller-assigned.\n\nGajic 2011 Table 3 worksheet only. At most one high-risk surgery type (orthopedic_spine, acute_abdomen, cardiac, aortic_vascular) may be true.\n\nEmergency surgery adds 1.5 in addition to the surgery type (footnote *). Diabetes mellitus subtracts 1 only when sepsis is true (footnote †); diabetes without sepsis scores 0.\n\nBands are low (score <4) and high (score ≥4) from the paper ROC cutoff. No other cut-points are returned.\n\nmax_score 15.5 is the published observed range in Gajic 2011, not a theoretical sum of every Table 3 row. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"shock","description":"Shock as assigned by the caller (Gajic 2011 Table 3). true scores 2. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"aspiration","description":"Aspiration as assigned by the caller (Gajic 2011 Table 3). true scores 2. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"sepsis","description":"Sepsis as assigned by the caller (Gajic 2011 Table 3). true scores 1. magent does not diagnose sepsis.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"pneumonia","description":"Pneumonia as assigned by the caller (Gajic 2011 Table 3). true scores 1.5. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"orthopedic_spine","description":"High-risk orthopedic spine surgery as assigned by the caller (Gajic 2011 Table 3). true scores 1. At most one of orthopedic_spine, acute_abdomen, cardiac, and aortic_vascular may be true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"acute_abdomen","description":"High-risk acute abdomen surgery as assigned by the caller (Gajic 2011 Table 3). true scores 2. At most one of orthopedic_spine, acute_abdomen, cardiac, and aortic_vascular may be true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cardiac","description":"High-risk cardiac surgery as assigned by the caller (Gajic 2011 Table 3). true scores 2.5. At most one of orthopedic_spine, acute_abdomen, cardiac, and aortic_vascular may be true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"aortic_vascular","description":"High-risk aortic vascular surgery as assigned by the caller (Gajic 2011 Table 3). true scores 3.5. At most one of orthopedic_spine, acute_abdomen, cardiac, and aortic_vascular may be true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"emergency_surgery","description":"Emergency surgery as assigned by the caller (Gajic 2011 Table 3 footnote *: add 1.5 points if emergency surgery). true scores 1.5 in addition to any one surgery type.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"traumatic_brain_injury","description":"Traumatic brain injury as assigned by the caller (Gajic 2011 Table 3). true scores 2. Trauma items may stack. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"smoke_inhalation","description":"Smoke inhalation as assigned by the caller (Gajic 2011 Table 3). true scores 2. Trauma items may stack.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"near_drowning","description":"Near drowning as assigned by the caller (Gajic 2011 Table 3). true scores 2. Trauma items may stack.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"lung_contusion","description":"Lung contusion as assigned by the caller (Gajic 2011 Table 3). true scores 1.5. Trauma items may stack. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"multiple_fractures","description":"Multiple fractures as assigned by the caller (Gajic 2011 Table 3). true scores 1.5. Trauma items may stack.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"alcohol_abuse","description":"Alcohol abuse as assigned by the caller (Gajic 2011 Table 3). true scores 1.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"obesity_bmi_gt_30","description":"Obesity (BMI >30) as assigned by the caller (Gajic 2011 Table 3). true scores 1. magent does not take height or weight.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypoalbuminemia","description":"Hypoalbuminemia as assigned by the caller (Gajic 2011 Table 3). true scores 1. magent does not assay albumin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"chemotherapy","description":"Chemotherapy as assigned by the caller (Gajic 2011 Table 3). true scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"fio2_gt_035","description":"FiO2 >0.35 or >4 L/min as assigned by the caller (Gajic 2011 Table 3). true scores 2. magent does not read the ventilator or flowmeter.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"tachypnea_rr_gt_30","description":"Tachypnea (respiratory rate >30) as assigned by the caller (Gajic 2011 Table 3). true scores 1.5. magent does not count respirations.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"spo2_lt_95","description":"SpO2 <95% as assigned by the caller (Gajic 2011 Table 3). true scores 1. magent does not measure SpO2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"acidosis_ph_lt_735","description":"Acidosis (pH <7.35) as assigned by the caller (Gajic 2011 Table 3). true scores 1.5. magent does not assay blood gas.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"diabetes_mellitus","description":"Diabetes mellitus as assigned by the caller (Gajic 2011 Table 3 footnote dagger). Subtracts 1 only when sepsis is true. If diabetes is true and sepsis is false, 0 points (do not subtract). magent does not diagnose diabetes.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"LIPS","operationId":"get_api_calc_lips","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, lips_band, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_lips_surgery: at most one high-risk surgery type may be true: orthopedic_spine, acute_abdomen, cardiac, or aortic_vascular (Gajic 2011 Table 3). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/lips"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"LIPS (bulk)","operationId":"post_api_calc_lips","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_lips_surgery: at most one high-risk surgery type may be true: orthopedic_spine, acute_abdomen, cardiac, or aortic_vascular (Gajic 2011 Table 3). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/lips"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"acidosis_ph_lt_735":"false","acute_abdomen":"false","alcohol_abuse":"true","aortic_vascular":"false","aspiration":"false","cardiac":"false","chemotherapy":"false","diabetes_mellitus":"false","emergency_surgery":"false","fio2_gt_035":"true","hypoalbuminemia":"false","lung_contusion":"false","multiple_fractures":"false","near_drowning":"false","obesity_bmi_gt_30":"false","orthopedic_spine":"false","pneumonia":"true","sepsis":"true","shock":"true","smoke_inhalation":"false","spo2_lt_95":"false","tachypnea_rr_gt_30":"false","traumatic_brain_injury":"false"},{"acidosis_ph_lt_735":"false","acute_abdomen":"false","alcohol_abuse":"true","aortic_vascular":"false","aspiration":"false","cardiac":"false","chemotherapy":"false","diabetes_mellitus":"false","emergency_surgery":"false","fio2_gt_035":"true","hypoalbuminemia":"false","lung_contusion":"false","multiple_fractures":"false","near_drowning":"false","obesity_bmi_gt_30":"false","orthopedic_spine":"false","pneumonia":"true","sepsis":"true","shock":"true","smoke_inhalation":"false","spo2_lt_95":"false","tachypnea_rr_gt_30":"false","traumatic_brain_injury":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/g8":{"get":{"description":"Sum the eight Bellera 2012 G8 items (seven MNA items A, B, C, E, F, H, P plus age) and return whether the published ≤14 impaired-screen cutoff is met.\n\nWhen an agent already has caller-assigned G8 bands for an older cancer patient and needs the published 0–17 total, not a comprehensive geriatric assessment, chemotherapy order, ONCODAGE/Soubeyran 2014 result, or VES-13. magent does not interview or weigh the patient.\n\nNot a medical device.\n\nNot a chemotherapy order. This tool does not start, stop, or choose cancer treatment.\n\nNot a comprehensive geriatric assessment (CGA). Score ≤14 is an impaired screen from Bellera 2012; magent does not perform CGA.\n\nBellera 2012 G8 only (seven MNA items A, B, C, E, F, H, P plus age). Not Soubeyran 2014 ONCODAGE validation and not VES-13.\n\nCaller assigns food intake, weight loss, mobility, neuropsychological, BMI, medication, health-vs-peers, and age bands. magent does not interview or weigh the patient and does not compute BMI from height and weight.\n\nHigher scores are better. Total 0–17. Cutoff ≤14 is the Bellera 2012 threshold that maximized AUC. Health unknown scores 0.5 (not integer-rounded). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"food_intake","description":"Bellera 2012 G8 food-intake decline over 3 months (MNA item A) as assigned by the caller. severe_decrease 0, moderate_decrease 1, no_decrease 2. magent does not interview the patient.","required":true,"schema":{"type":"string"},"example":"no_decrease"},{"in":"query","name":"weight_loss","description":"Bellera 2012 G8 weight loss during the last 3 months (MNA item B) as assigned by the caller. gt_3kg 0, unknown 1, 1_to_3kg 2, none 3. magent does not weigh the patient.","required":true,"schema":{"type":"string"},"example":"none"},{"in":"query","name":"mobility","description":"Bellera 2012 G8 mobility (MNA item C) as assigned by the caller. bed_or_chair 0, bed_chair_no_out 1, goes_out 2. magent does not examine the patient.","required":true,"schema":{"type":"string"},"example":"goes_out"},{"in":"query","name":"neuropsychological","description":"Bellera 2012 G8 neuropsychological problems (MNA item E) as assigned by the caller. severe 0, mild 1, none 2. magent does not interview the patient.","required":true,"schema":{"type":"string"},"example":"none"},{"in":"query","name":"bmi","description":"Bellera 2012 G8 BMI band (MNA item F) as assigned by the caller. lt_19 0, 19_to_lt_21 1, 21_to_lt_23 2, ge_23 3. magent does not weigh the patient or compute BMI.","required":true,"schema":{"type":"string"},"example":"ge_23"},{"in":"query","name":"more_than_3_medications","description":"Bellera 2012 G8 takes more than 3 medications per day (MNA item H) as assigned by the caller. true scores 0; false scores 1. magent does not review the medication list.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"health_vs_peers","description":"Bellera 2012 G8 self-rated health versus people of the same age (MNA item P) as assigned by the caller. not_as_good 0, unknown 0.5, as_good 1, better 2. Half-point on unknown is not integer-rounded. magent does not interview the patient.","required":true,"schema":{"type":"string"},"example":"better"},{"in":"query","name":"age_band","description":"Bellera 2012 G8 age band as assigned by the caller. gt_85 0, 80_to_85 1, lt_80 2. magent does not assign the age band from a numeric age.","required":true,"schema":{"type":"string"},"example":"lt_80"}],"summary":"G8","operationId":"get_api_calc_g8","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, at_or_below_cutoff, food_intake, weight_loss, mobility, neuropsychological, bmi, more_than_3_medications, health_vs_peers, age_band, components, citation, disclaimer."},"400":{"description":"invalid_g8: G8 geriatric screening inputs must match Bellera 2012 food intake, weight loss, mobility, neuropsychological, BMI, medications, health, and age bands from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/g8"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"G8 (bulk)","operationId":"post_api_calc_g8","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_g8: G8 geriatric screening inputs must match Bellera 2012 food intake, weight loss, mobility, neuropsychological, BMI, medications, health, and age bands from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/g8"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_band":"lt_80","bmi":"ge_23","food_intake":"no_decrease","health_vs_peers":"better","mobility":"goes_out","more_than_3_medications":"false","neuropsychological":"none","weight_loss":"none"},{"age_band":"lt_80","bmi":"ge_23","food_intake":"no_decrease","health_vs_peers":"better","mobility":"goes_out","more_than_3_medications":"false","neuropsychological":"none","weight_loss":"none"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/atlas":{"get":{"description":"Sum the Miller 2013 five-component ATLAS bedside score (age, systemic antibiotics during CDI therapy, leukocyte count, albumin, serum creatinine) and return the published predicted-cure percent.\n\nWhen an agent has age, concurrent systemic antibiotics, WBC, albumin, and creatinine and needs the published Miller 2013 ATLAS total and predicted-cure percent, not a Clostridioides difficile diagnosis and not a metronidazole, vancomycin, or fidaxomicin order.\n\nNot a medical device. Not a Clostridioides difficile (C. difficile) diagnosis and not a metronidazole, vancomycin, or fidaxomicin order. magent does not culture stool.\n\nMiller 2013 five-component ATLAS only (Age, Treatment with systemic antibiotics, Leukocyte count, Albumin, Serum creatinine). Temperature was a Table 1 candidate and is not scored; the final ATLAS dropped it. magent does not assay labs.\n\nPredicted cure percent is 100 − 5.08 × score from the paper regression, rounded to one decimal (score 0 is 100.0). The paper reports eleven score categories 0–10; this tool does not invent mild/moderate/severe bands. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Miller 2013 Table 1: <60 scores 0; 60–79 inclusive scores 1; ≥80 scores 2.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"systemic_antibiotics","description":"Systemic antibiotics on one or more days of CDI therapy (Miller 2013). true scores 2; false scores 0. There is no 1-point cell. magent does not review the medication list.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"wbc_k_ul","description":"Total leukocyte count in 10^3/µL (same as ×10^9/L). Provide wbc_k_ul or wbc_ul, not both. Range 0.01-500. Miller 2013: <16 scores 0; 16–25 inclusive scores 1; >25 scores 2.","required":false,"schema":{"type":"number"},"example":"8"},{"in":"query","name":"wbc_ul","description":"Total leukocyte count in cells/µL. Provide wbc_k_ul or wbc_ul, not both. Range 10-500000. Miller 2013: <16000 scores 0; 16000–25000 inclusive scores 1; >25000 scores 2.","required":false,"schema":{"type":"number"},"example":"8000"},{"in":"query","name":"albumin_g_l","description":"Serum albumin in g/L (10-60). Provide this or albumin_g_dl, not both. Miller 2013: >35 scores 0; 26–35 inclusive scores 1; ≤25 scores 2. magent does not assay albumin.","required":false,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"albumin_g_dl","description":"Serum albumin in g/dL (1-6). Converted as g/L = g/dL × 10. Provide this or albumin_g_l, not both.","required":false,"schema":{"type":"number"},"example":"4.0"},{"in":"query","name":"creatinine_umol_l","description":"Serum creatinine in µmol/L (9-1768). Provide this or creatinine_mg_dl, not both. Miller 2013: ≤120 scores 0; 121–179 inclusive scores 1; ≥180 scores 2. magent does not assay creatinine.","required":false,"schema":{"type":"number"},"example":"80"},{"in":"query","name":"creatinine_mg_dl","description":"Serum creatinine in mg/dL (0.1-20). Converted as µmol/L = mg/dL × 88.42. Provide this or creatinine_umol_l, not both.","required":false,"schema":{"type":"number"},"example":"0.9"}],"summary":"ATLAS","operationId":"get_api_calc_atlas","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, atlas_score, max_score, predicted_cure_percent, age_years, systemic_antibiotics, wbc_per_ul, albumin_g_l, creatinine_umol_l, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/atlas"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ATLAS (bulk)","operationId":"post_api_calc_atlas","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/atlas"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","albumin_g_l":"40","creatinine_umol_l":"80","systemic_antibiotics":"false","wbc_k_ul":"8"},{"age":"40","albumin_g_l":"40","creatinine_umol_l":"80","systemic_antibiotics":"false","wbc_k_ul":"8"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/readmits":{"get":{"description":"Sum the Nguyen 2018 first-day AMI READMITS predictors and return the integer score, Table 4 quintile, and mean predicted 30-day readmission percent.\n\nWhen an agent needs the published first-day AMI READMITS point total within 24 hours of AMI admission and must not invent a PCI, reperfusion, or discharge order, or the full-stay model.\n\nNot a medical device and not a PCI, reperfusion, or discharge order. magent does not assay creatinine or natriuretic peptides, take blood pressure, or examine the patient.\n\nFirst-day AMI READMITS only (Nguyen 2018 Table 2). Does not include the full-stay model's intravenous diuretics, discharge anemia, or post-acute care.\n\nSex is the published nonmale/female item (female scores 2). Not race.\n\nQuintile percents are Table 4 mean predicted 30-day readmission risk (3/7/11/16/35%), not an individual measured rate.\n\nCreatinine >2 mg/dL, elevated BNP or NT-proBNP, PCI within 24 hours, and SBP <100 mm Hg are caller-assigned booleans. magent does not convert units or read timestamps. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_years","description":"Age in years (18-100). Nguyen 2018: 1 point per decade over 18, floor((age_years-18)/10).","required":true,"schema":{"type":"integer"},"example":"58"},{"in":"query","name":"sex","description":"female or male (Nguyen 2018 nonmale sex). Female scores 2. Male scores 0. A published sex item, not race.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"creatinine_gt_2","description":"Whether serum creatinine was >2 mg/dL within the first 24 hours (Nguyen 2018: 6 points). Caller-assigned. magent does not assay creatinine.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"elevated_bnp","description":"Whether BNP was >=50 pg/mL or NT-proBNP was >=125 pg/mL within the first 24 hours (Nguyen 2018: 8 points). Caller-assigned. magent does not assay natriuretic peptides.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"diabetes","description":"Diabetes mellitus history (Nguyen 2018: 4 points). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pci_within_24h","description":"Whether PCI occurred within the first 24 hours (Nguyen 2018: false scores 1; true scores 0). Caller-assigned. magent does not read timestamps or the angiogram.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"sbp_lt_100","description":"Whether systolic blood pressure was <100 mm Hg within the first 24 hours (Nguyen 2018: 3 points). Caller-assigned boolean; magent does not take an SBP number.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"READMITS","operationId":"get_api_calc_readmits","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, quintile, predicted_readmission_percent, age_years, age_decades, sex, creatinine_gt_2, elevated_bnp, diabetes, pci_within_24h, sbp_lt_100, components, citation, disclaimer."},"400":{"description":"invalid_readmits: READMITS needs Nguyen 2018 first-day creatinine, natriuretic peptide, age, diabetes, sex, PCI, and systolic BP in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/readmits"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"READMITS (bulk)","operationId":"post_api_calc_readmits","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_readmits: READMITS needs Nguyen 2018 first-day creatinine, natriuretic peptide, age, diabetes, sex, PCI, and systolic BP in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/readmits"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_years":"58","creatinine_gt_2":"false","diabetes":"false","elevated_bnp":"false","pci_within_24h":"true","sbp_lt_100":"false","sex":"male"},{"age_years":"58","creatinine_gt_2":"false","diabetes":"false","elevated_bnp":"false","pci_within_24h":"true","sbp_lt_100":"false","sex":"male"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rse":{"get":{"description":"Sum Bateman 2015 Table II normalized RSE points from caller-assigned BMI >=30, ACQ-5, FEV1 percent predicted, daily rescue occasions, and GINA treatment step 3 or 4, and return the 0-100 total.\n\nWhen an agent has caller-assigned Bateman 2015 RSE inputs and needs the published 0-100 point total. magent does not administer ACQ-5 or spirometry and does not change GINA step or order an inhaler.\n\nNot a medical device and not a diagnosis of asthma or of an impending exacerbation.\n\nNot a GINA step change or inhaler order. GINA step 3 or 4 is the derivation-population treatment step as assigned by the caller.\n\nmagent does not administer ACQ-5 or spirometry. BMI >=30, ACQ-5, FEV1 percent predicted, and daily rescue occasions are caller-assigned.\n\nTable II normalized points only (0-100). The paper plots approximate 6-month exacerbation risk from score 0 to 100; this tool does not emit named low/mid/high strata or a fitted probability. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"bmi_ge_30","description":"Caller-assigned BMI >= 30 kg/m2 (Bateman 2015 Table II). true scores 14; false scores 0. magent does not compute BMI.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"acq5","description":"Caller-assigned 5-item Asthma Control Questionnaire mean (0-6). Table II: <1.5 scores 0; 1.5 <= ACQ-5 < 2.5 scores 7; >=2.5 scores 13. magent does not administer ACQ-5.","required":true,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"fev1_percent_predicted","description":"Caller-assigned FEV1 as percent of predicted (10-150). Table II: >=90 scores 0; 80 <= FEV1 < 90 scores 13; <80 scores 20. magent does not perform spirometry.","required":true,"schema":{"type":"number"},"example":"95"},{"in":"query","name":"rescue_occasions_per_day","description":"Caller-assigned daily reliever occasions (0-30). Table II: <2 scores 0; 2 <= occasions < 4 scores 11; >=4 scores 26. magent does not count inhaler actuations.","required":true,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"gina_step","description":"Caller-assigned GINA treatment step in the Bateman 2015 derivation population. Must be 3 (0 points) or 4 (27 points). Other steps are invalid_gina_step. Not a step-change or inhaler order.","required":true,"schema":{"type":"integer"},"example":"3"}],"summary":"RSE","operationId":"get_api_calc_rse","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, bmi_ge_30, acq5, fev1_percent_predicted, rescue_occasions_per_day, gina_step, components, citation, disclaimer."},"400":{"description":"invalid_acq5: acq5 must be a number from 0 to 6 (Bateman 2015 RSE 5-item Asthma Control Questionnaire). Returned before settlement; you are not charged.; invalid_rescue_occasions: rescue_occasions_per_day must be a number from 0 to 30 (Bateman 2015 RSE daily reliever occasions). Returned before settlement; you are not charged.; invalid_gina_step: gina_step must be 3 or 4 (Bateman 2015 RSE derivation population GINA treatment step). Returned before settlement; you are not charged.; invalid_fev1_percent: fev1_percent_predicted must be a number from 10 to 150. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rse"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"RSE (bulk)","operationId":"post_api_calc_rse","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_acq5: acq5 must be a number from 0 to 6 (Bateman 2015 RSE 5-item Asthma Control Questionnaire). Returned before settlement; you are not charged.; invalid_rescue_occasions: rescue_occasions_per_day must be a number from 0 to 30 (Bateman 2015 RSE daily reliever occasions). Returned before settlement; you are not charged.; invalid_gina_step: gina_step must be 3 or 4 (Bateman 2015 RSE derivation population GINA treatment step). Returned before settlement; you are not charged.; invalid_fev1_percent: fev1_percent_predicted must be a number from 10 to 150. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rse"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"acq5":"1.0","bmi_ge_30":"false","fev1_percent_predicted":"95","gina_step":"3","rescue_occasions_per_day":"0"},{"acq5":"1.0","bmi_ge_30":"false","fev1_percent_predicted":"95","gina_step":"3","rescue_occasions_per_day":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/codes/search":{"get":{"description":"Rank a natural-language drug, diagnosis, or lab phrase to current RxNorm, ICD-10-CM, or LOINC codes from the local catalog.\n\nWhen an agent must not hallucinate or invent a billing or pharmacy code. Pay-per-request; empty matches is a valid paid 200.\n\nICD-10 in this product means ICD-10-CM (US claims), not WHO ICD-10.\n\nProduction coverage is Current Prescribable RxNorm + ICD-10-CM + LOINC (gold-gated full). Not complete monthly RxNorm or UMLS.\n\nNot a billing submission and not a medical device. Do not send names or MRNs. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"query","description":"Natural-language drug, diagnosis, or lab description. Max 512 characters. Do not send patient names.","required":true,"schema":{"type":"string"},"example":"Tylenol 500mg"},{"in":"query","name":"system","description":"Restrict to rxnorm, icd10 (ICD-10-CM), or loinc. Omit to search all.","required":false,"schema":{"type":"string","enum":["rxnorm","icd10","loinc"]},"example":"rxnorm"},{"in":"query","name":"tty","description":"Restrict term type. Pharmacy orders typically want SCD. ICD-10-CM is CM; LOINC is LN.","required":false,"schema":{"type":"string","enum":["SCD","SBD","IN","PIN","MIN","BN","GPCK","BPCK","DF","SCDC","SBDC","SCDF","SBDF","CM","LN"]},"example":"SCD"},{"in":"query","name":"limit","description":"Number of ranked matches to return (1-25). Default 5.","required":false,"schema":{"default":5,"type":"integer"},"example":"5"},{"in":"query","name":"min_score","description":"Minimum rank score 0-100. Default 35.","required":false,"schema":{"default":35,"type":"integer"},"example":"35"},{"in":"query","name":"include_obsolete","description":"Include deprecated/obsolete codes. Default false.","required":false,"schema":{"default":false,"type":"boolean"},"example":"false"},{"in":"query","name":"billable_only","description":"ICD-10-CM: return only HIPAA billable codes, not headers. Default true.","required":false,"schema":{"default":true,"type":"boolean"},"example":"true"}],"summary":"Code search","operationId":"get_api_codes_search","responses":{"200":{"description":"200 JSON fields: query, system, match_count, match_quality, matches, catalog, disclaimer."},"400":{"description":"invalid_query: query is required and must be 1-512 characters Returned before settlement; you are not charged.; invalid_system: system must be rxnorm, icd10, or loinc Returned before settlement; you are not charged.; invalid_tty: tty must be a known RxNorm, ICD-10-CM, or LOINC term type Returned before settlement; you are not charged.; invalid_limit: limit must be an integer from 1 to 25 Returned before settlement; you are not charged.; invalid_min_score: min_score must be an integer from 0 to 100 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/code-search"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Code search (bulk)","operationId":"post_api_codes_search","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_query: query is required and must be 1-512 characters Returned before settlement; you are not charged.; invalid_system: system must be rxnorm, icd10, or loinc Returned before settlement; you are not charged.; invalid_tty: tty must be a known RxNorm, ICD-10-CM, or LOINC term type Returned before settlement; you are not charged.; invalid_limit: limit must be an integer from 1 to 25 Returned before settlement; you are not charged.; invalid_min_score: min_score must be an integer from 0 to 100 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/code-search"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"query":"Tylenol 500mg","system":"rxnorm"},{"query":"Tylenol 500mg","system":"rxnorm"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rads":{"get":{"description":"Sum four caller-assigned Oh 2012 radiologist's-score quadrant findings on one 1-cm axial CT slice (normal 0, interstitial 1, ground_glass 2, consolidation 3; range 0-12) and return high when the score is greater than 8.\n\nWhen an agent already has caller-assigned worst findings for four CT quadrants on one 1-cm axial slice and needs the published Oh 2012 RADS total and the score > 8 high flag. magent does not interpret CT, perform bronchoscopy, or assign AIS inhalation grade.\n\nNot a medical device.\n\nNot a diagnosis of inhalation injury.\n\nNot a bronchoscopy substitute. magent does not take fiberoptic bronchoscopy grade.\n\nThe caller assigns each quadrant finding. magent does not interpret CT or read images.\n\nFour quadrants on one 1-cm axial slice (Oh 2012 as reprinted in Dries/Walker 2015 Table 2). Not an eight-quadrant form.\n\nNot Endorf AIS inhalation grade. Not Yamamura bronchial wall thickness.\n\nOh 2012 associated high RADS plus +FOB with a 12.7-fold composite pneumonia/ALI-ARDS/death outcome. This tool only sums the four CT findings; it does not take FOB or report that odds ratio. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"q1","description":"Caller-assigned worst finding in that quadrant on one 1-cm axial chest CT slice (Oh 2012 radiologist's score; four quadrants, not eight): normal (0), interstitial / increased interstitial markings (1), ground_glass (2), or consolidation (3). magent does not interpret CT.","required":true,"schema":{"type":"string","enum":["normal","interstitial","ground_glass","consolidation"]},"example":"normal"},{"in":"query","name":"q2","description":"Caller-assigned worst finding in that quadrant on one 1-cm axial chest CT slice (Oh 2012 radiologist's score; four quadrants, not eight): normal (0), interstitial / increased interstitial markings (1), ground_glass (2), or consolidation (3). magent does not interpret CT.","required":true,"schema":{"type":"string","enum":["normal","interstitial","ground_glass","consolidation"]},"example":"normal"},{"in":"query","name":"q3","description":"Caller-assigned worst finding in that quadrant on one 1-cm axial chest CT slice (Oh 2012 radiologist's score; four quadrants, not eight): normal (0), interstitial / increased interstitial markings (1), ground_glass (2), or consolidation (3). magent does not interpret CT.","required":true,"schema":{"type":"string","enum":["normal","interstitial","ground_glass","consolidation"]},"example":"normal"},{"in":"query","name":"q4","description":"Caller-assigned worst finding in that quadrant on one 1-cm axial chest CT slice (Oh 2012 radiologist's score; four quadrants, not eight): normal (0), interstitial / increased interstitial markings (1), ground_glass (2), or consolidation (3). magent does not interpret CT.","required":true,"schema":{"type":"string","enum":["normal","interstitial","ground_glass","consolidation"]},"example":"normal"}],"summary":"RADS","operationId":"get_api_calc_rads","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, high, q1, q2, q3, q4, components, citation, disclaimer."},"400":{"description":"invalid_rads_finding: each quadrant finding must be normal, interstitial, ground_glass, or consolidation (Oh 2012 RADS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rads"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"RADS (bulk)","operationId":"post_api_calc_rads","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rads_finding: each quadrant finding must be normal, interstitial, ground_glass, or consolidation (Oh 2012 RADS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rads"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"q1":"normal","q2":"normal","q3":"normal","q4":"normal"},{"q1":"normal","q2":"normal","q3":"normal","q4":"normal"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rhmp-30":{"get":{"description":"Compute the de Jong 2025 Rotterdam Hip Fracture Mortality Prediction-30 Days (RHMP-30) logistic 30-day mortality probability after hip fracture surgery from caller-assigned age, sex, albumin in g/L, dementia, Katz-ADL total, ASA 4, and nursing-home residence.\n\nWhen an agent has de Jong 2025 RHMP-30 predictors and needs the published 30-day mortality probability from the unrounded logit, not an operative vs nonoperative order and not an unpublished website band.\n\nNot a medical device. Not a diagnosis. Not an operative vs nonoperative order. magent does not assign ASA class or Katz-ADL and does not examine the patient.\n\nde Jong 2025 Figure 3 / Appendix 4 adaptive LASSO logit only. No published probability cutoff. magent does not invent low/moderate/high bands.\n\nSex is the published female coefficient (female = 1, male = 0), not race.\n\nAlbumin is g/L as in de Jong 2025 Table I (typical 30-45), not g/dL. Caller-supplied; magent does not assay albumin.\n\ndementia, asa_4, nursing_home, and Katz-ADL total are caller-assigned. magent does not diagnose dementia or score Katz items.\n\nestimated_mortality_percent is a population probability from the unrounded logit, not an individual outcome. de Jong 2025 excluded nonoperative patients. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years, integer 40-110. de Jong 2025 coefficient +0.0306 per year. magent does not read an identity document.","required":true,"schema":{"type":"integer"},"example":"80"},{"in":"query","name":"sex","description":"Sex used as the published de Jong 2025 female coefficient (female = 1, male = 0). Not race. magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"albumin_g_l","description":"Admission serum albumin in g/L (10-60). de Jong 2025 Table I uses g/L (typical 30-45). Not g/dL. Caller-supplied; magent does not assay albumin.","required":true,"schema":{"type":"number"},"example":"38"},{"in":"query","name":"dementia","description":"true if the caller assigns a history of dementia (de Jong 2025). true scores 1 in the logit; false scores 0. magent does not diagnose dementia.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"katz_adl","description":"Katz Index of Independence in Activities of Daily Living total, integer 0-6 (de Jong 2025). 0 = completely dependent; 6 = completely independent. Caller-assigned total; magent does not score bathing, dressing, toileting, transferring, continence, or feeding.","required":true,"schema":{"type":"integer"},"example":"6"},{"in":"query","name":"asa_4","description":"true if the caller assigns ASA physical status 4 (de Jong 2025). true scores 1 in the logit; false scores 0. magent does not assign ASA class.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"nursing_home","description":"true if the caller assigns residence in a nursing home (de Jong 2025). true scores 1 in the logit; false scores 0. magent does not determine residence.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"RHMP-30","operationId":"get_api_calc_rhmp_30","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, sex, albumin_g_l, dementia, katz_adl, asa_4, nursing_home, logit, estimated_mortality_percent, citation, disclaimer."},"400":{"description":"invalid_rhmp_30: RHMP-30 needs de Jong 2025 age, sex, ASA 4, dementia, albumin, Katz-ADL, and nursing-home residence in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rhmp-30"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"RHMP-30 (bulk)","operationId":"post_api_calc_rhmp_30","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rhmp_30: RHMP-30 needs de Jong 2025 age, sex, ASA 4, dementia, albumin, Katz-ADL, and nursing-home residence in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rhmp-30"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"80","albumin_g_l":"38","asa_4":"false","dementia":"false","katz_adl":"6","nursing_home":"false","sex":"female"},{"age":"80","albumin_g_l":"38","asa_4":"false","dementia":"false","katz_adl":"6","nursing_home":"false","sex":"female"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/dipss":{"get":{"description":"Sum the Passamonti 2010 DIPSS (dynamic international prognostic scoring system) for primary myelofibrosis and return low (0), intermediate_1 (1–2), intermediate_2 (3–4), or high (5–6).\n\nWhen an agent needs the published DIPSS point total and risk group and must not invent a myelofibrosis diagnosis or treatment choice, and must not substitute DIPSS Plus, aaDIPSS, or Cervantes 2009 IPSS.\n\nNot a medical device and not a myelofibrosis diagnosis or treatment choice. magent does not examine the patient.\n\nThis is Passamonti 2010 DIPSS (all-ages Table 3) only, not DIPSS Plus, not aaDIPSS (Table 4), and not Cervantes 2009 IPSS-at-diagnosis.\n\nmagent does not read a smear or assay hemoglobin or WBC. hemoglobin_g_dl, wbc_10e9_l, and blasts_percent are caller-supplied labs.\n\nConstitutional symptoms (weight loss >10% in 6 months, night sweats, or unexplained fever >37.5°C) are a single caller-assigned boolean. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Age >65 scores 1 (Passamonti 2010 Table 3). Age 65 is the ≤65 arm and scores 0.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"hemoglobin_g_dl","description":"Hemoglobin in g/dL (3-20). <10 scores 2 (Passamonti 2010 Table 3; anemia HR 4.18). 10.0 is the ≥10 arm and scores 0. magent does not assay hemoglobin.","required":true,"schema":{"type":"number"},"example":"12"},{"in":"query","name":"wbc_10e9_l","description":"White-cell count in 10^9/L (0.1-500). >25 scores 1 (Passamonti 2010 Table 3). 25.0 is the ≤25 arm and scores 0. magent does not assay WBC.","required":true,"schema":{"type":"number"},"example":"10"},{"in":"query","name":"blasts_percent","description":"Peripheral-blood blasts as a percent (0-30). ≥1 scores 1 (Passamonti 2010 Table 3). 0.9 is the <1 arm and scores 0. magent does not read a smear.","required":true,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"constitutional_symptoms","description":"Weight loss >10% in 6 months, night sweats, or unexplained fever >37.5°C as assigned by the caller (Passamonti 2010 methods). true scores 1. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"DIPSS","operationId":"get_api_calc_dipss","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk_group, age_years, hemoglobin_g_dl, wbc_10e9_l, blasts_percent, constitutional_symptoms, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_dipss: hemoglobin_g_dl 3-20, wbc_10e9_l 0.1-500, and blasts_percent 0-30 (Passamonti 2010 DIPSS labs; magent clamps, not paper ranges). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dipss"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"DIPSS (bulk)","operationId":"post_api_calc_dipss","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_dipss: hemoglobin_g_dl 3-20, wbc_10e9_l 0.1-500, and blasts_percent 0-30 (Passamonti 2010 DIPSS labs; magent clamps, not paper ranges). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dipss"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","blasts_percent":"0","constitutional_symptoms":"false","hemoglobin_g_dl":"12","wbc_10e9_l":"10"},{"age":"50","blasts_percent":"0","constitutional_symptoms":"false","hemoglobin_g_dl":"12","wbc_10e9_l":"10"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/regiscar":{"get":{"description":"Sum the ten Kardaun 2007 RegiSCAR DRESS scoring-letter items from caller-assigned flags, eosinophilia grade, and organ count, and return the −4 to 9 total and the published none/possible/probable/definite band.\n\nWhen an agent has already assigned the Kardaun 2007 scoring-letter items and needs the published total and validation band. magent does not count eosinophils, read a biopsy, measure BSA, or diagnose DRESS.\n\nNot a medical device and not a DRESS diagnosis.\n\nmagent does not count eosinophils or read a biopsy. Each item is caller-assigned. Biopsy unknown is not offered: biopsy_compatible must be true (0) or false (−1).\n\nNot SCORTEN and not J-SCAR.\n\nScoring is the Kardaun 2007 Br J Dermatol scoring letter, not the 2013 prospective series. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"fever_ge_38_5","description":"Caller-assigned fever ≥38.5 °C (Kardaun 2007). true scores 0; false scores −1. magent does not measure temperature.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"lymphadenopathy_ge_2_sites","description":"Caller-assigned lymphadenopathy involving ≥2 sites (Kardaun 2007). true scores 1; false scores 0. magent does not examine lymph nodes.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"eosinophilia","description":"Caller-assigned eosinophilia (Kardaun 2007): none (0), mild (1; 700–1499/µL or 10–19%), or severe (2; ≥1500/µL or ≥20%). magent does not count eosinophils.","required":true,"schema":{"type":"string","enum":["none","mild","severe"]},"example":"none"},{"in":"query","name":"atypical_lymphocytes","description":"Caller-assigned atypical lymphocytes (Kardaun 2007). true scores 1; false scores 0. magent does not read a blood film.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"rash_gt_50_bsa","description":"Caller-assigned rash extent >50% body surface area (Kardaun 2007). true scores 1; false scores 0. magent does not measure BSA.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"rash_suggestive","description":"Caller-assigned rash morphology suggestive of DRESS (Kardaun 2007). true scores 1; false scores −1. magent does not examine the skin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"biopsy_compatible","description":"Caller-assigned skin-biopsy compatibility with DRESS (Kardaun 2007). true scores 0; false scores −1. Unknown is not offered. magent does not read a biopsy.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"organs","description":"Caller-assigned organ involvement count (Kardaun 2007): integer 0, 1, or 2 (≥2 organs scores 2). Values outside 0–2 are rejected. magent does not diagnose organ injury.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"resolution_ge_15_days","description":"Caller-assigned resolution ≥15 days (Kardaun 2007). true scores 0; false scores −1. magent does not time the illness.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"alternative_causes_excluded","description":"Caller-assigned exclusion of alternative causes (Kardaun 2007). true scores 1; false scores 0. magent does not exclude infection or other diagnoses.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"RegiSCAR","operationId":"get_api_calc_regiscar","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, regiscar_band, components, citation, disclaimer."},"400":{"description":"invalid_regiscar: RegiSCAR items must use the published Kardaun 2007 values (fever/lymphadenopathy/atypical_lymphocytes/rash flags; eosinophilia none, mild, or severe; organs 0-2; resolution_ge_15_days; alternative_causes_excluded). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/regiscar"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"RegiSCAR (bulk)","operationId":"post_api_calc_regiscar","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_regiscar: RegiSCAR items must use the published Kardaun 2007 values (fever/lymphadenopathy/atypical_lymphocytes/rash flags; eosinophilia none, mild, or severe; organs 0-2; resolution_ge_15_days; alternative_causes_excluded). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/regiscar"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"alternative_causes_excluded":"false","atypical_lymphocytes":"false","biopsy_compatible":"true","eosinophilia":"none","fever_ge_38_5":"true","lymphadenopathy_ge_2_sites":"false","organs":"0","rash_gt_50_bsa":"false","rash_suggestive":"false","resolution_ge_15_days":"true"},{"alternative_causes_excluded":"false","atypical_lymphocytes":"false","biopsy_compatible":"true","eosinophilia":"none","fever_ge_38_5":"true","lymphadenopathy_ge_2_sites":"false","organs":"0","rash_gt_50_bsa":"false","rash_suggestive":"false","resolution_ge_15_days":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-child-fecal-incontinence":{"get":{"description":"Apply the Hyams 2016 Rome IV H3b Nonretentive Fecal Incontinence (child/adolescent) criteria and return whether the published child nonretentive fecal incontinence box holds (rome_iv_child_fecal_incontinence).\n\nWhen an agent already has the five caller-assigned Hyams 2016 Rome IV H3b flags (developmental age older than 4 years, 1-month duration, defecation into places inappropriate to the sociocultural context, no evidence of fecal retention, and not explained by another condition) and needs whether the published child/adolescent nonretentive fecal incontinence box holds. magent does not examine the child.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose child nonretentive fecal incontinence.\n\nThe caller assigns the five flags, including developmental_age_older_than_4_years and no_evidence_of_fecal_retention. magent does not examine the child.\n\nThis tool is Hyams 2016 Rome IV H3b Nonretentive Fecal Incontinence (child/adolescent, developmental age older than 4 years) only. Not H3a functional constipation. Not adult Rao 2016 F1 fecal incontinence.\n\nItem 2 is the exclusion-of-retention flag (no_evidence_of_fecal_retention), not a symptom count. Duration is 1 month (Rome IV shortened from 2 months). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"developmental_age_older_than_4_years","description":"Developmental age older than 4 years, as assigned (Hyams 2016 Rome IV H3b). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"duration_at_least_1_month","description":"At least a 1-month history (Rome IV shortened from 2 months), as assigned (Hyams 2016 Rome IV H3b). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"defecation_into_places_inappropriate_to_sociocultural_context","description":"Defecation into places inappropriate to the sociocultural context, as assigned (Hyams 2016 Rome IV H3b item 1). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"no_evidence_of_fecal_retention","description":"No evidence of fecal retention, as assigned (Hyams 2016 Rome IV H3b item 2; exclusion of retention, not a symptom count). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"not_explained_by_another_condition","description":"After appropriate medical evaluation, the fecal incontinence cannot be explained by another medical condition, as assigned (Hyams 2016 Rome IV H3b item 3). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV Child Fecal Incontinence","operationId":"get_api_calc_rome_iv_child_fecal_incontinence","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, rome_iv_child_fecal_incontinence, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_child_fecal_incontinence: Rome IV child nonretentive fecal incontinence needs the Hyams 2016 child/adolescent H3b flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-child-fecal-incontinence"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV Child Fecal Incontinence (bulk)","operationId":"post_api_calc_rome_iv_child_fecal_incontinence","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_child_fecal_incontinence: Rome IV child nonretentive fecal incontinence needs the Hyams 2016 child/adolescent H3b flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-child-fecal-incontinence"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"defecation_into_places_inappropriate_to_sociocultural_context":"true","developmental_age_older_than_4_years":"true","duration_at_least_1_month":"true","no_evidence_of_fecal_retention":"true","not_explained_by_another_condition":"true"},{"defecation_into_places_inappropriate_to_sociocultural_context":"true","developmental_age_older_than_4_years":"true","duration_at_least_1_month":"true","no_evidence_of_fecal_retention":"true","not_explained_by_another_condition":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/seattle-hf":{"get":{"description":"Compute Levy 2006 Seattle Heart Failure Model 1-, 2-, and 3-year survival percents from Table 2 multivariate hazard ratios for a patient already on the listed medications and devices.\n\nWhen an agent already has those Levy 2006 predictors and needs that paper's 1-, 2-, and 3-year survival percents. Caller assigns NYHA class, etiology, and therapy flags. Not a diagnosis, prescription, or device order.\n\nNot a medical device. Not a diagnosis of heart failure. Not a treatment order, medication recommendation, or device order.\n\nEstimates 1-, 2-, and 3-year survival from Levy 2006 Table 2 for a patient already on the listed medications and devices. Does not estimate whether a drug or device can be added safely and is not a reason to withhold therapy.\n\nCaller assigns NYHA class, ischemic etiology, and medication/device flags. magent does not examine the patient, does not measure blood pressure or weight, and does not assay labs.\n\nDiuretic dose is furosemide-equivalent mg/kg/day (paper: furosemide 80 = torsemide 40 = bumetanide 3). Lymphocytes >47%, uric acid <3.4 mg/dL, and SBP >160 mm Hg are truncated as in the paper. Gender male 1.089 was forced into Table 2.\n\nDerived and validated mainly in systolic heart-failure outpatients. Not for hospitalized patients or major non-cardiac comorbidities. Does not include peak VO2 or natriuretic peptides. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 14-100). Levy 2006 Table 2: per decade, multivariate HR 1.090. magent does not take a date of birth.","required":true,"schema":{"type":"integer"},"example":60},{"in":"query","name":"sex","description":"Sex used by the forced Table 2 male HR 1.089 (female or male). magent does not assign sex.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"nyha","description":"NYHA class 1-4 as assigned by the caller (integer). Levy 2006 Table 2 multivariate HR 1.600 per class. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[1,2,3,4]},"example":2},{"in":"query","name":"ef_percent","description":"Left-ventricular ejection fraction in percent (1-80). Enters as 100/EF with Table 2 HR 1.030. magent does not interpret an echocardiogram.","required":true,"schema":{"type":"number"},"example":30},{"in":"query","name":"ischemic","description":"Ischemic etiology as assigned by the caller (true or false). Table 2 multivariate HR 1.354. magent does not assign etiology.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"sbp_mm_hg","description":"Systolic blood pressure in mm Hg (50-250). Table 2: per 10 mm Hg, HR 0.877, truncated at 160 (SBP 180 is scored as 160). magent does not measure blood pressure.","required":true,"schema":{"type":"number"},"example":120},{"in":"query","name":"weight_kg","description":"Body weight in kg (20-250) used only to convert the furosemide-equivalent diuretic dose to mg/kg/day. magent does not weigh the patient.","required":true,"schema":{"type":"number"},"example":80},{"in":"query","name":"loop_diuretic_furosemide_eq_mg_day","description":"Daily loop-diuretic dose as furosemide milligram equivalent (0-1000). Paper conversion: furosemide 80 = torsemide 40 = bumetanide 3. Divided by weight_kg; Table 2 HR 1.178 per mg/kg/day. magent does not prescribe a diuretic.","required":true,"schema":{"type":"number"},"example":0},{"in":"query","name":"allopurinol","description":"Current allopurinol as assigned by the caller (true or false). Table 2 multivariate HR 1.571. magent does not prescribe allopurinol.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"sodium_meq_l","description":"Serum sodium in mEq/L (110-160). Table 2: if Na<138, (138-Na) with HR 1.050 per mEq; values ≥138 add 0. magent does not assay sodium.","required":true,"schema":{"type":"number"},"example":140},{"in":"query","name":"total_cholesterol_mg_dl","description":"Total cholesterol in mg/dL (50-800). Enters as 100/cholesterol with Table 2 HR 2.206. magent does not assay lipids.","required":true,"schema":{"type":"number"},"example":180},{"in":"query","name":"hemoglobin_g_dl","description":"Hemoglobin in g/dL (4-22). Table 2: if Hb<16, (16-Hb) with HR 1.124 per g/dL; if Hb>16, (Hb-16) with HR 1.336 per g/dL. magent does not assay hemoglobin.","required":true,"schema":{"type":"number"},"example":14},{"in":"query","name":"lymphocyte_percent","description":"Percent lymphocytes (0-100). Table 2: per 5% when <47%, HR 0.897; values >47% are truncated to 47. magent does not assay a CBC.","required":true,"schema":{"type":"number"},"example":25},{"in":"query","name":"uric_acid_mg_dl","description":"Serum uric acid in mg/dL (0.5-25). Table 2: per mg/dL when >3.4, HR 1.064; values <3.4 are truncated to 3.4. magent does not assay uric acid.","required":true,"schema":{"type":"number"},"example":6},{"in":"query","name":"ace_inhibitor","description":"Patient already on an ACE inhibitor as assigned by the caller (true or false). Table 2 already-on HR 0.77. Not a prescription.","required":true,"schema":{"type":"boolean"},"example":true},{"in":"query","name":"beta_blocker","description":"Patient already on a beta-blocker as assigned by the caller (true or false). Table 2 already-on HR 0.66. Not a prescription.","required":true,"schema":{"type":"boolean"},"example":true},{"in":"query","name":"arb","description":"Patient already on an angiotensin-receptor blocker as assigned by the caller (true or false). Table 2 already-on HR 0.85. Not a prescription.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"k_sparing_diuretic","description":"Patient already on a potassium-sparing diuretic as assigned by the caller (true or false). Table 2 already-on HR 0.74. Not a prescription.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"statin","description":"Patient already on a statin as assigned by the caller (true or false). Table 2 already-on / multivariate HR 0.63. Not a prescription.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"biv_pacemaker","description":"Patient already has a biventricular pacemaker (without ICD) as assigned by the caller (true or false). Table 2 already-on HR 1.00. Mutually exclusive with icd and biv_icd. Not a device order.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"icd","description":"Patient already has an ICD (without biventricular pacing) as assigned by the caller (true or false). Table 2 already-on HR 0.73. Mutually exclusive with biv_pacemaker and biv_icd. Not a device order.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"biv_icd","description":"Patient already has a biventricular ICD as assigned by the caller (true or false). Table 2 already-on HR 0.79. Mutually exclusive with biv_pacemaker and icd. Not a device order.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"Seattle Heart Failure Model","operationId":"get_api_calc_seattle_hf","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age, sex, nyha, ef_percent, ischemic, sbp_mm_hg, weight_kg, loop_diuretic_furosemide_eq_mg_day, diuretic_furosemide_eq_mg_kg_day, allopurinol, sodium_meq_l, total_cholesterol_mg_dl, hemoglobin_g_dl, lymphocyte_percent, uric_acid_mg_dl, ace_inhibitor, beta_blocker, arb, k_sparing_diuretic, statin, biv_pacemaker, icd, biv_icd, score, survival_1y_percent, survival_2y_percent, survival_3y_percent, citation, disclaimer."},"400":{"description":"invalid_shfm: Seattle Heart Failure Model inputs must match Levy 2006 Table 2 clinical, laboratory, medication, and device predictors. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/seattle-hf"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Seattle Heart Failure Model (bulk)","operationId":"post_api_calc_seattle_hf","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_shfm: Seattle Heart Failure Model inputs must match Levy 2006 Table 2 clinical, laboratory, medication, and device predictors. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/seattle-hf"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ace_inhibitor":"true","age":"60","allopurinol":"false","arb":"false","beta_blocker":"true","biv_icd":"false","biv_pacemaker":"false","ef_percent":"30","hemoglobin_g_dl":"14","icd":"false","ischemic":"false","k_sparing_diuretic":"false","loop_diuretic_furosemide_eq_mg_day":"0","lymphocyte_percent":"25","nyha":"2","sbp_mm_hg":"120","sex":"male","sodium_meq_l":"140","statin":"false","total_cholesterol_mg_dl":"180","uric_acid_mg_dl":"6","weight_kg":"80"},{"ace_inhibitor":"true","age":"60","allopurinol":"false","arb":"false","beta_blocker":"true","biv_icd":"false","biv_pacemaker":"false","ef_percent":"30","hemoglobin_g_dl":"14","icd":"false","ischemic":"false","k_sparing_diuretic":"false","loop_diuretic_furosemide_eq_mg_day":"0","lymphocyte_percent":"25","nyha":"2","sbp_mm_hg":"120","sex":"male","sodium_meq_l":"140","statin":"false","total_cholesterol_mg_dl":"180","uric_acid_mg_dl":"6","weight_kg":"80"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/macocha":{"get":{"description":"Sum the seven De Jong 2013 Table 1 MACOCHA factors from caller-assigned flags and return the 0-12 total plus high_risk at that paper's score >= 3 cutoff.\n\nWhen an agent already has the seven De Jong 2013 MACOCHA flags (Mallampati III or IV, obstructive sleep apnea, reduced cervical mobility, limited mouth opening, coma, severe hypoxemia, non-anesthesiologist operator) and needs the published 0-12 total. magent does not examine the airway, compute GCS, or measure SpO2.\n\nNot a medical device.\n\nNot an intubation order.\n\nmagent does not examine the airway, compute GCS, or measure SpO2. The caller assigns each Table 1 flag.\n\nMallampati is a yes/no III-or-IV flag, not a 1-4 scale. Coma is the paper's pathology item (typically GCS <8 in that derivation); magent does not take raw GCS.\n\nhigh_risk is score >= 3 from De Jong 2013 (NPV ~98% at that cut in the validation cohort). 0 = easy, 12 = very difficult. Not a later review cut. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"mallampati_iii_iv","description":"Mallampati class III or IV as assigned by the caller (De Jong 2013 Table 1). true or false. Not a 1-4 Mallampati integer. magent does not examine the airway.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"obstructive_sleep_apnea","description":"Obstructive sleep apnea syndrome as assigned by the caller (De Jong 2013 Table 1). true or false. magent does not diagnose sleep apnea.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"reduced_cervical_mobility","description":"Reduced mobility of the cervical spine as assigned by the caller (De Jong 2013 Table 1). true or false. magent does not examine the neck.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"limited_mouth_opening","description":"Limited mouth opening <3 cm as assigned by the caller (De Jong 2013 Table 1). true or false. magent does not measure mouth opening.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"coma","description":"Coma as assigned by the caller (De Jong 2013 Table 1 pathology item; typically GCS <8 in that derivation). true or false. magent does not take raw GCS or compute GCS.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"severe_hypoxemia","description":"Severe hypoxemia (SpO2 <80%) as assigned by the caller (De Jong 2013 Table 1). true or false. magent does not measure SpO2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"non_anesthesiologist","description":"Non-anesthesiologist operator as assigned by the caller (De Jong 2013 Table 1). true or false. magent does not identify the operator.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"MACOCHA","operationId":"get_api_calc_macocha","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, high_risk, components, citation, disclaimer."},"400":{"description":"invalid_macocha: MACOCHA inputs must match De Jong 2013 Mallampati, sleep apnea, cervical mobility, mouth opening, coma, hypoxia, and operator factors from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/macocha"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"MACOCHA (bulk)","operationId":"post_api_calc_macocha","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_macocha: MACOCHA inputs must match De Jong 2013 Mallampati, sleep apnea, cervical mobility, mouth opening, coma, hypoxia, and operator factors from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/macocha"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"coma":"false","limited_mouth_opening":"false","mallampati_iii_iv":"false","non_anesthesiologist":"false","obstructive_sleep_apnea":"false","reduced_cervical_mobility":"false","severe_hypoxemia":"false"},{"coma":"false","limited_mouth_opening":"false","mallampati_iii_iv":"false","non_anesthesiologist":"false","obstructive_sleep_apnea":"false","reduced_cervical_mobility":"false","severe_hypoxemia":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/vte-bleed":{"get":{"description":"Sum the Klok 2016 VTE-BLEED items for major bleeding on stable anticoagulation after VTE and return low (<2) or high (≥2).\n\nWhen an agent needs the published Klok 2016 VTE-BLEED point total and band and must not invent a treatment-duration or HAS-BLED decision.\n\nNot a medical device. magent does not diagnose VTE or bleeding and does not assay hemoglobin or eGFR.\n\nNot HAS-BLED. VTE-BLEED is the Klok 2016 six-item score after VTE on stable anticoagulation, not an atrial-fibrillation bleed score.\n\nNot a treatment-duration order, anticoagulation start/stop protocol, or bleed-treatment recommendation. Bands are low (<2) and high (≥2) only.\n\nAnemia, renal dysfunction, and uncontrolled hypertension (SBP ≥140) are caller-assigned booleans. magent does not take a hemoglobin, eGFR, creatinine, or blood-pressure number. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Age ≥60 scores 1.5 (Klok 2016). magent does not assign age.","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"sex","description":"female or male. Uncontrolled hypertension scores 1 only when sex is male (Klok 2016 / XALIA SBP ≥140 item). Female never scores that item.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"active_cancer","description":"Active cancer as assigned by the caller (Klok 2016). true scores 2. magent does not diagnose cancer.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"uncontrolled_hypertension","description":"Uncontrolled hypertension (SBP ≥140 mmHg) as assigned by the caller (Klok 2016 / XALIA). true scores 1 only in males; females score 0 even when true. magent does not measure blood pressure.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"anemia","description":"Anemia as assigned by the caller (Klok 2016: hemoglobin <130 g/L in men or <120 g/L in women). true scores 1.5. magent does not take a hemoglobin number.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"history_of_bleeding","description":"History of bleeding as assigned by the caller (Klok 2016). true scores 1.5. magent does not grade bleeding.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"renal_dysfunction","description":"Renal dysfunction (eGFR or CrCl <60) as assigned by the caller (Klok 2016). true scores 1.5. magent does not compute eGFR or creatinine clearance.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"VTE-BLEED","operationId":"get_api_calc_vte_bleed","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, vte_bleed_band, sex, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/vte-bleed"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"VTE-BLEED (bulk)","operationId":"post_api_calc_vte_bleed","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/vte-bleed"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"active_cancer":"false","age":"70","anemia":"false","history_of_bleeding":"false","renal_dysfunction":"false","sex":"male","uncontrolled_hypertension":"false"},{"active_cancer":"false","age":"70","anemia":"false","history_of_bleeding":"false","renal_dysfunction":"false","sex":"male","uncontrolled_hypertension":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/dragon":{"get":{"description":"Compute the Strbian 2012 DRAGON score (Dense artery / early infarct signs, prestroke mRS, Age, Glucose, Onset-to-treatment, NIHSS) for 3-month outcome after IV thrombolysis-treated ischemic stroke.\n\nWhen an agent has caller-assigned admission CT flags, prestroke mRS >1, age, glucose, onset-to-treatment minutes, and NIHSS and needs the published DRAGON total and tabulated 3-month mRS percents, without inventing NIHSS, CT findings, or percents for scores 4-7.\n\nNot a medical device and not a tPA, thrombolysis, or reperfusion treatment decision.\n\nDerived in IV thrombolysis-treated anterior-circulation ischemic stroke (Strbian 2012). It was not studied in basilar artery occlusion.\n\nThe caller assigns NIHSS (0-42), prestroke modified Rankin Scale >1 as a flag (not a raw mRS integer), (hyper)dense cerebral artery sign, early infarct signs, glucose, and onset-to-treatment time. magent does not examine the patient, read CT, or compute NIHSS.\n\nPublished 3-month mRS 0-2 and mRS 5-6 percents are returned only for tabulated scores (0-1, 2, 3, 8, and 9-10). Scores 4-7 have no invented percents. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Strbian 2012: <65 scores 0; 65-79 scores 1; ≥80 scores 2.","required":true,"schema":{"type":"integer"},"example":"60"},{"in":"query","name":"nihss","description":"Caller-assigned NIH Stroke Scale total (integer 0-42). 0-4 scores 0; 5-9 scores 1; 10-15 scores 2; >15 (16-42) scores 3. magent does not compute NIHSS or examine the patient.","required":true,"schema":{"type":"integer"},"example":"3"},{"in":"query","name":"glucose_mmol_l","description":"Baseline glucose in mmol/L (2.8-55.5). Provide this or glucose_mg_dl, not both. 1 point if >8.0; 8.0 does not score.","required":false,"schema":{"type":"number"},"example":"6.0"},{"in":"query","name":"glucose_mg_dl","description":"Baseline glucose in mg/dL (50-1000). Converted as mmol/L = mg/dL / 18. Provide this or glucose_mmol_l, not both. >144 mg/dL scores; 144 does not.","required":false,"schema":{"type":"number"},"example":"108"},{"in":"query","name":"onset_to_treatment_min","description":"Onset-to-treatment time in minutes (integer 0-360). >90 scores 1; 90 does not. magent does not clock the delay.","required":true,"schema":{"type":"integer"},"example":"60"},{"in":"query","name":"hyperdense_artery","description":"(Hyper)dense cerebral artery sign on admission CT as assigned by the caller (Strbian 2012). true scores 1. Combined with early_infarct_signs: none 0, either 1, both 2. magent does not read CT.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"early_infarct_signs","description":"Early infarct signs on admission CT as assigned by the caller (Strbian 2012). true scores 1. Combined with hyperdense_artery: none 0, either 1, both 2. magent does not read CT.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"prestroke_mrs_gt_1","description":"Prestroke modified Rankin Scale >1 as assigned by the caller (Strbian 2012). true scores 1; false scores 0. Do not send a raw mRS integer. magent does not assign mRS.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"DRAGON","operationId":"get_api_calc_dragon","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, good_outcome_percent, miserable_outcome_percent, age_years, nihss, glucose_mmol_l, onset_to_treatment_min, hyperdense_artery, early_infarct_signs, prestroke_mrs_gt_1, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_nihss: nihss must be an integer from 0 to 42. Returned before settlement; you are not charged.; invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_onset_to_treatment_min: onset_to_treatment_min must be an integer from 0 to 360. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dragon"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"DRAGON (bulk)","operationId":"post_api_calc_dragon","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_nihss: nihss must be an integer from 0 to 42. Returned before settlement; you are not charged.; invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_onset_to_treatment_min: onset_to_treatment_min must be an integer from 0 to 360. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dragon"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"60","early_infarct_signs":"false","glucose_mmol_l":"6.0","hyperdense_artery":"false","nihss":"3","onset_to_treatment_min":"60","prestroke_mrs_gt_1":"false"},{"age":"60","early_infarct_signs":"false","glucose_mmol_l":"6.0","hyperdense_artery":"false","nihss":"3","onset_to_treatment_min":"60","prestroke_mrs_gt_1":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pen-fast":{"get":{"description":"Sum the three Trubiano 2020 PEN-FAST flags for a reported penicillin allergy and return the 0–5 score, published risk group, and low_risk_for_testing (score < 3).\n\nWhen an agent has already assigned the three Trubiano 2020 PEN-FAST flags for a patient who reports penicillin allergy and needs the published point total and risk group. magent does not take an allergy history and does not diagnose allergy or issue a delabeling order.\n\nNot a medical device.\n\nNot an allergy diagnosis and not a delabeling order.\n\nmagent does not take an allergy history.\n\nDerived in adults ≥16 years reporting penicillin allergy (not other beta-lactams).\n\nSCAR phenotypes were uncommon in derivation.\n\nA score <3 was the paper's low-risk cutoff (NPV 96.3% in derivation) and does not replace specialist testing when indicated. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"five_or_fewer_years_ago","description":"Allergy event 5 or fewer years ago as assigned by the caller (Trubiano 2020). true scores 2. magent does not take an allergy history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"anaphylaxis_angioedema_or_scar","description":"Anaphylaxis/angioedema or potential SCAR as one 2-point criterion (Trubiano 2020). true scores 2; do not add both phenotypes separately. magent does not take an allergy history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"treatment_required","description":"Treatment required for the allergy episode as assigned by the caller (Trubiano 2020). true scores 1. magent does not take an allergy history.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"PEN-FAST","operationId":"get_api_calc_pen_fast","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk, low_risk_for_testing, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pen-fast"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PEN-FAST (bulk)","operationId":"post_api_calc_pen_fast","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pen-fast"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"anaphylaxis_angioedema_or_scar":"false","five_or_fewer_years_ago":"false","treatment_required":"false"},{"anaphylaxis_angioedema_or_scar":"false","five_or_fewer_years_ago":"false","treatment_required":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/nps":{"get":{"description":"Sum ten caller-assigned Galer 1997 NPS integers (0-10) printed as Intense, Sharp, Hot, Dull, Cold, Sensitive, Itchy, Unpleasant, Deep, and Surface, and return that total (max 100).\n\nWhen an agent already has Galer 1997 0-10 integers for those ten printed qualities and needs their sum, not a neuropathy diagnosis, interview, or later composite cutoff.\n\nNot a medical device and not a diagnosis of neuropathy or a treatment order.\n\nEach of the ten items is a caller-assigned integer 0-10 from Galer 1997 Table 1 (Intense, Sharp, Hot, Dull, Cold, Sensitive, Itchy, Unpleasant, Deep, Surface). magent does not interview the patient.\n\nGaler 1997 printed item-level 0-10 scores and did not print a diagnostic cutoff for a summed total. magent returns the sum of those ten items (max 100) without a neuropathy-yes/no threshold and does not apply later NPS4, NPS6, NPS8, or NPS10 composites.\n\nThe categorical time-quality item on that instrument is not a 0-10 score and is not an input. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"intensity","description":"Caller-assigned Galer 1997 NPS intensity (integer 0-10; Table 1 Intense). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":0},{"in":"query","name":"sharpness","description":"Caller-assigned Galer 1997 NPS sharpness (integer 0-10; Table 1 Sharp). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":0},{"in":"query","name":"heat","description":"Caller-assigned Galer 1997 NPS heat (integer 0-10; Table 1 Hot). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":0},{"in":"query","name":"dullness","description":"Caller-assigned Galer 1997 NPS dullness (integer 0-10; Table 1 Dull). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":0},{"in":"query","name":"cold","description":"Caller-assigned Galer 1997 NPS cold (integer 0-10; Table 1 Cold). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":0},{"in":"query","name":"sensitive","description":"Caller-assigned Galer 1997 NPS sensitive (integer 0-10; Table 1 Sensitive). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":0},{"in":"query","name":"itchy","description":"Caller-assigned Galer 1997 NPS itchy (integer 0-10; Table 1 Itchy). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":0},{"in":"query","name":"unpleasantness","description":"Caller-assigned Galer 1997 NPS overall unpleasantness (integer 0-10; Table 1 Unpleasant). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":0},{"in":"query","name":"deep_pain","description":"Caller-assigned Galer 1997 NPS intensity of deep pain (integer 0-10; Table 1 Deep). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":0},{"in":"query","name":"surface_pain","description":"Caller-assigned Galer 1997 NPS intensity of surface pain (integer 0-10; Table 1 Surface). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":0}],"summary":"Neuropathic Pain Scale (Galer)","operationId":"get_api_calc_nps","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_nps: Neuropathic Pain Scale inputs must match the published 0-10 item scores. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nps"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Neuropathic Pain Scale (Galer) (bulk)","operationId":"post_api_calc_nps","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_nps: Neuropathic Pain Scale inputs must match the published 0-10 item scores. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nps"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"cold":"0","deep_pain":"0","dullness":"0","heat":"0","intensity":"0","itchy":"0","sensitive":"0","sharpness":"0","surface_pain":"0","unpleasantness":"0"},{"cold":"0","deep_pain":"0","dullness":"0","heat":"0","intensity":"0","itchy":"0","sensitive":"0","sharpness":"0","surface_pain":"0","unpleasantness":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/maintenance-fluids":{"get":{"description":"Compute Holliday–Segar 1957 daily maintenance water from weight, plus the corresponding hourly milliliters.\n\nWhen an agent needs the 1957 100/50/20 mL/kg daily maintenance-water arithmetic and must not invent a volume or apply the later 4-2-1 rule.\n\nNot a treatment order or IV prescription. Does not choose fluid type, electrolyte additives, or infusion-rate safety limits.\n\nUses the paper's daily 100/50/20 mL/kg volumes. The later bedside 4-2-1 mL/kg/h rule is an hourly approximation and is not applied here.\n\nEstimates typical pediatric parenteral maintenance water only. Does not add fever, ongoing losses, or renal impairment. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"weight_kg","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"schema":{"type":"number"},"example":"30"},{"in":"query","name":"weight_lb","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"schema":{"type":"number"},"example":"66.1387"}],"summary":"Maintenance fluids","operationId":"get_api_calc_maintenance_fluids","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, weight_kg, daily_ml, hourly_ml, citation, disclaimer."},"400":{"description":"invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/maintenance-fluids"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Maintenance fluids (bulk)","operationId":"post_api_calc_maintenance_fluids","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/maintenance-fluids"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"weight_kg":"30"},{"weight_kg":"30"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/montreal-ibd":{"get":{"description":"Apply the Satsangi 2006 Montreal revision of the Vienna IBD classification and return the compact phenotype string for Crohn (age, location, behaviour, optional +L4 and p) or ulcerative colitis (extent and severity).\n\nWhen an agent already has caller-assigned Montreal tokens (Crohn A1-A3, L1-L4, B1-B3, upper GI and perianal modifiers, or UC E1-E3 and S0-S3) and needs the published phenotype notation. magent does not perform endoscopy, take vitals, or assign the S token from labs. Not a disease-activity index.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose Crohn disease or ulcerative colitis.\n\nNot a disease-activity index. This tool is phenotype notation only, not CDAI, Harvey-Bradshaw, or Mayo DAI.\n\nNot the Paris pediatric classification.\n\nIBDU and indeterminate colitis are not encoded; disease must be crohn or uc.\n\nThe caller assigns all tokens, including UC severity S0-S3. magent does not perform endoscopy or take vitals. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"disease","description":"Satsangi 2006 Montreal disease as assigned: crohn or uc. IBDU and indeterminate colitis are not encoded. magent does not diagnose IBD.","required":true,"schema":{"type":"string","enum":["crohn","uc"]},"example":"crohn"},{"in":"query","name":"age_at_diagnosis","description":"Montreal Crohn age at diagnosis as assigned (Satsangi 2006): A1 ≤16 years, A2 17-40 years, A3 >40 years. Required when disease=crohn. Omit when disease=uc. magent does not assign the A token from a chart.","required":false,"schema":{"type":"string","enum":["A1","A2","A3"]},"example":"A2"},{"in":"query","name":"location","description":"Montreal Crohn location as assigned (Satsangi 2006): L1 ileal, L2 colonic, L3 ileocolonic, L4 isolated upper GI. Required when disease=crohn. Omit when disease=uc. magent does not perform endoscopy.","required":false,"schema":{"type":"string","enum":["L1","L2","L3","L4"]},"example":"L3"},{"in":"query","name":"upper_gi","description":"Concomitant upper GI disease as assigned (Satsangi 2006 L4 modifier). true adds +L4 after L1, L2, or L3. Must be false when location is isolated L4. Required when disease=crohn. Omit when disease=uc. magent does not perform endoscopy.","required":false,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"behaviour","description":"Montreal Crohn behaviour as assigned (Satsangi 2006): B1 non-stricturing non-penetrating, B2 stricturing, B3 penetrating. Required when disease=crohn. Omit when disease=uc. magent does not perform endoscopy.","required":false,"schema":{"type":"string","enum":["B1","B2","B3"]},"example":"B1"},{"in":"query","name":"perianal","description":"Concomitant perianal disease as assigned (Satsangi 2006 p modifier). true appends p after B1, B2, or B3. Required when disease=crohn. Omit when disease=uc. magent does not examine the patient.","required":false,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"extent","description":"Montreal UC extent as assigned (Satsangi 2006): E1 ulcerative proctitis (distal to the rectosigmoid junction), E2 left-sided (distal to the splenic flexure), E3 extensive (proximal to the splenic flexure). Required when disease=uc. Omit when disease=crohn. magent does not perform endoscopy.","required":false,"schema":{"type":"string","enum":["E1","E2","E3"]},"example":"E1"},{"in":"query","name":"severity","description":"Montreal UC severity as assigned (Satsangi 2006): S0 clinical remission; S1 mild (≤4 stools/day with or without blood, no systemic illness, normal ESR); S2 moderate (>4 stools/day, minimal systemic toxicity); S3 severe (≥6 bloody stools/day AND pulse ≥90 AND temperature ≥37.5°C AND haemoglobin <10.5 g/100 ml AND ESR ≥30 mm/h). The caller assigns the S token. Required when disease=uc. Omit when disease=crohn. magent does not take vitals.","required":false,"schema":{"type":"string","enum":["S0","S1","S2","S3"]},"example":"S0"}],"summary":"Montreal IBD","operationId":"get_api_calc_montreal_ibd","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, disease, phenotype, criteria, citation, disclaimer."},"400":{"description":"invalid_montreal_ibd: Montreal IBD needs disease crohn or uc with the Satsangi 2006 phenotype tokens. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/montreal-ibd"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Montreal IBD (bulk)","operationId":"post_api_calc_montreal_ibd","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_montreal_ibd: Montreal IBD needs disease crohn or uc with the Satsangi 2006 phenotype tokens. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/montreal-ibd"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_at_diagnosis":"A2","behaviour":"B1","disease":"crohn","location":"L3","perianal":"false","upper_gi":"false"},{"age_at_diagnosis":"A2","behaviour":"B1","disease":"crohn","location":"L3","perianal":"false","upper_gi":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/steinhart":{"get":{"description":"Compute the Steinhart 2009 Equation 1 probability of acute heart failure from caller-assigned age, clinician pretest probability, and NT-proBNP in pg/mL.\n\nWhen an agent has Steinhart 2009 age, clinician pretest probability, and NT-proBNP in pg/mL and needs Equation 1 Pr(AHF) from the unrounded probability plus the published ≤0.20 and ≥0.80 flags, not a diuretic or admission order.\n\nNot a medical device. Not a diagnosis. Not a diuretic order or an admission order. magent does not assay NT-proBNP or assign pretest probability.\n\nSteinhart 2009 Equation 1 only. NT-proBNP is pg/mL, not pmol/L. magent does not convert units.\n\npretest_probability is caller-assigned as a fraction 0-1; values above 1 through 100 are treated as percent. magent does not examine the patient.\n\nahf_le_0_20 and ahf_ge_0_80 are the published model treatment thresholds (Pr(AHF) ≤0.20 and ≥0.80). magent does not invent intermediate bands.\n\nestimated_probability_percent is a population probability from the unrounded Equation 1 value, not an individual outcome. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years, integer 18-100. Steinhart 2009 Equation 1 coefficient -0.011 per year. magent does not read an identity document.","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"pretest_probability","description":"Caller-assigned clinician pretest probability of acute heart failure before NT-proBNP. Fraction 0-1, or 0-100 percent (values above 1 are divided by 100). 1 means certainty, not 1 percent. Steinhart 2009 coefficient -5.914 on the fraction. magent does not assign pretest probability or examine the patient.","required":true,"schema":{"type":"number"},"example":"0.50"},{"in":"query","name":"nt_probnp_pg_ml","description":"NT-proBNP in pg/mL (5-35000). Enters as log10. Not pmol/L; magent does not convert units or assay NT-proBNP.","required":true,"schema":{"type":"number"},"example":"1000"}],"summary":"Steinhart AHF","operationId":"get_api_calc_steinhart","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, pretest_probability, nt_probnp_pg_ml, logit, estimated_probability_percent, ahf_le_0_20, ahf_ge_0_80, citation, disclaimer."},"400":{"description":"invalid_steinhart: Steinhart AHF needs 2009 age, clinician pretest probability, and NT-proBNP in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/steinhart"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Steinhart AHF (bulk)","operationId":"post_api_calc_steinhart","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_steinhart: Steinhart AHF needs 2009 age, clinician pretest probability, and NT-proBNP in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/steinhart"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"70","nt_probnp_pg_ml":"1000","pretest_probability":"0.50"},{"age":"70","nt_probnp_pg_ml":"1000","pretest_probability":"0.50"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ranson":{"get":{"description":"Sum the eleven Ranson 1974 prognostic signs (five at admission, six during the first 48 hours) and return the published mortality band.\n\nWhen an agent already has the published cutoffs as flags and must not invent a Ranson total or an ICU triage decision.\n\nNot a diagnosis, operative plan, or ICU order. Mortality bands group scores 0-2, 3-4, 5-6, and 7-11 as commonly reported from the 1974 series; magent does not reprint a percent as a prognosis for a named patient.\n\nComplete score needs 48-hour signs. This tool does not parse raw labs; each cutoff is a boolean. Does not apply the later gallstone-modified cutoffs. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_gt_55","description":"Admission: age >55 years (Ranson 1974). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"wbc_gt_16k","description":"Admission: WBC >16 000/mm^3. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"glucose_gt_200","description":"Admission: blood glucose >200 mg/dL. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ldh_gt_350","description":"Admission: LDH >350 IU/L. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ast_gt_250","description":"Admission: AST >250 U/L. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hct_drop_gt_10","description":"First 48 h: hematocrit fall >10 percentage points. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bun_rise_gt_5","description":"First 48 h: BUN rise >5 mg/dL. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"calcium_lt_8","description":"First 48 h: serum calcium <8 mg/dL. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pao2_lt_60","description":"First 48 h: arterial PaO2 <60 mm Hg. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"base_deficit_gt_4","description":"First 48 h: base deficit >4 mEq/L. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"fluid_seq_gt_6l","description":"First 48 h: estimated fluid sequestration >6 L. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Ranson","operationId":"get_api_calc_ranson","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, mortality_band, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ranson"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Ranson (bulk)","operationId":"post_api_calc_ranson","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ranson"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_gt_55":"false","ast_gt_250":"false","base_deficit_gt_4":"false","bun_rise_gt_5":"false","calcium_lt_8":"false","fluid_seq_gt_6l":"false","glucose_gt_200":"false","hct_drop_gt_10":"false","ldh_gt_350":"false","pao2_lt_60":"false","wbc_gt_16k":"false"},{"age_gt_55":"false","ast_gt_250":"false","base_deficit_gt_4":"false","bun_rise_gt_5":"false","calcium_lt_8":"false","fluid_seq_gt_6l":"false","glucose_gt_200":"false","hct_drop_gt_10":"false","ldh_gt_350":"false","pao2_lt_60":"false","wbc_gt_16k":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/damico":{"get":{"description":"Apply the D'Amico 1998 JAMA clinically localized three-group rule to caller-assigned clinical T (t1c, t2a, t2b, t2c), Gleason sum 2-10, and PSA ng/mL, and return risk low, intermediate, or high. Does not assay PSA, assign Gleason, or compute CAPRA or NCCN groups.\n\nWhen an agent already has a clinically localized prostate-cancer T stage in {t1c, t2a, t2b, t2c}, a Gleason sum, and a PSA, and needs the published D'Amico 1998 three-group box. magent does not assay PSA, assign Gleason, or assign TNM. Not CAPRA and not NCCN.\n\nNot a medical device and not a diagnosis of prostate cancer. magent does not assay PSA, assign Gleason, or assign TNM.\n\nD'Amico 1998 JAMA clinically localized groups only (abstract three-group rule). t_stage is limited to t1c, t2a, t2b, and t2c. T1a, T1b, and T3+ are out of scope.\n\nNot CAPRA. This tool does not implement Cooperberg 2005 CAPRA.\n\nNot NCCN risk groups. This tool does not implement NCCN very-low / favorable-intermediate / unfavorable-intermediate / very-high boxes.\n\nt_stage, gleason_score, and psa_ng_ml are caller-assigned. magent does not read slides, compute Grade Group / ISUP 2014, or assay PSA. High beats intermediate beats low (a T2c with PSA 5 Gleason 6 is high). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"t_stage","description":"Clinical T as assigned by the caller (D'Amico 1998 clinically localized groups). t1c, t2a, t2b, or t2c. T1a, T1b, and T3+ are out of scope. magent does not assign TNM or read staging studies.","required":true,"schema":{"type":"string","enum":["t1c","t2a","t2b","t2c"]},"example":"t1c"},{"in":"query","name":"gleason_score","description":"Gleason sum 2-10 as assigned by the caller (D'Amico 1998). Integer 2-10 only; reject 1, 11, and 6.5. Not Grade Group / ISUP 2014. magent does not assign Gleason or read slides.","required":true,"schema":{"type":"integer"},"example":"6"},{"in":"query","name":"psa_ng_ml","description":"Serum PSA in ng/mL as assayed by the caller (0.1-200). D'Amico 1998 uses ≤10, >10 and ≤20, and >20. magent does not assay PSA.","required":true,"schema":{"type":"number"},"example":"5"}],"summary":"D'Amico","operationId":"get_api_calc_damico","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, t_stage, gleason_score, psa_ng_ml, risk, components, citation, disclaimer."},"400":{"description":"invalid_damico: t_stage must be t1c, t2a, t2b, or t2c; gleason_score an integer 2–10; psa_ng_ml a number from 0.1 to 200 (D'Amico 1998 clinically localized groups). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/damico"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"D'Amico (bulk)","operationId":"post_api_calc_damico","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_damico: t_stage must be t1c, t2a, t2b, or t2c; gleason_score an integer 2–10; psa_ng_ml a number from 0.1 to 200 (D'Amico 1998 clinically localized groups). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/damico"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"gleason_score":"6","psa_ng_ml":"5","t_stage":"t1c"},{"gleason_score":"6","psa_ng_ml":"5","t_stage":"t1c"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/sulf-fast":{"get":{"description":"Sum the three Waldron 2023 SULF-FAST flags for a reported trimethoprim-sulfamethoxazole allergy and return the 0–5 score, published risk group (low if score < 3, elevated if ≥ 3), and low_risk_for_testing (score < 3).\n\nWhen an agent has already assigned the three Waldron 2023 SULF-FAST flags for a patient who reports trimethoprim-sulfamethoxazole (sulfa antibiotic) allergy and needs the published point total and risk group. magent does not take an allergy history and does not diagnose allergy or issue a delabeling order. This is not PEN-FAST.\n\nNot a medical device.\n\nNot an allergy diagnosis and not a delabeling order.\n\nmagent does not take an allergy history.\n\nNot PEN-FAST. Waldron 2023 adapted the PEN-FAST flags for reported trimethoprim-sulfamethoxazole (sulfa antibiotic) allergy.\n\nWaldron 2023 uses two risk groups (low if score < 3, elevated if score ≥ 3), not the Trubiano 2020 four-tier PEN-FAST groups.\n\nA score < 3 is the paper's low-risk cutoff and does not replace specialist testing when indicated. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"five_or_fewer_years_ago","description":"Allergy event 5 or fewer years ago as assigned by the caller (Waldron 2023). true scores 2. magent does not take an allergy history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"anaphylaxis_angioedema_or_scar","description":"Anaphylaxis/angioedema or potential SCAR as one 2-point criterion (Waldron 2023). true scores 2; do not add both phenotypes separately. magent does not take an allergy history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"treatment_required","description":"Treatment required for the allergy episode as assigned by the caller (Waldron 2023). true scores 1. magent does not take an allergy history.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"SULF-FAST","operationId":"get_api_calc_sulf_fast","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk, low_risk_for_testing, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sulf-fast"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SULF-FAST (bulk)","operationId":"post_api_calc_sulf_fast","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sulf-fast"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"anaphylaxis_angioedema_or_scar":"false","five_or_fewer_years_ago":"false","treatment_required":"false"},{"anaphylaxis_angioedema_or_scar":"false","five_or_fewer_years_ago":"false","treatment_required":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mapi":{"get":{"description":"Apply Guilbert 2004 PEAK Table I and return a binary modified Asthma Predictive Index flag from caller-assigned history of 4 or more wheezing episodes and six major/minor criteria.\n\nWhen an agent has a caller-assigned history of 4 or more wheezing episodes in one year (at least one physician-diagnosed) and the published major and minor criteria for a child at high risk of childhood asthma and needs the Guilbert 2004 modified Asthma Predictive Index, not the Castro-Rodriguez 2000 original API, not Chang 2013 m²API, and not an asthma diagnosis.\n\nNot a medical device. Not a diagnosis of asthma. magent does not examine the child.\n\nThis tool is the Guilbert 2004 modified Asthma Predictive Index (mAPI, PEAK Table I) only. It is not the Castro-Rodriguez 2000 original Asthma Predictive Index (stringent and loose). It is not Chang 2013 m²API (≥2 wheeze episodes).\n\nThe caller assigns 4 or more wheeze episodes, parental asthma, MD atopic dermatitis, aeroallergen sensitization, food sensitization to milk, egg, or peanut, wheezing unrelated to colds, and blood eosinophils ≥4%. magent does not take an eosinophil percent and does not interpret a CBC.\n\nDerivation was in the PEAK trial among children with recurrent wheezing at high risk for childhood asthma. magent does not take numeric age.\n\npositive is a published risk-index flag, not an asthma diagnosis or a treatment or inhaler order. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"four_or_more_wheeze_episodes","description":"Caller-assigned history of 4 or more wheezing episodes in one year with at least one physician-diagnosed episode (Guilbert 2004 PEAK Table I primary criterion). true or false. magent does not take a numeric episode count.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"parental_asthma","description":"Parental asthma as assigned by the caller. true or false. Major criterion (Guilbert 2004 PEAK Table I). magent does not take a family history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"md_atopic_dermatitis","description":"Physician-diagnosed atopic dermatitis as assigned by the caller. true or false. Major criterion (Guilbert 2004 PEAK Table I). magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"aeroallergen_sensitization","description":"Allergic sensitization to at least one aeroallergen as assigned by the caller. true or false. Major criterion (Guilbert 2004 PEAK Table I). magent does not interpret allergy testing.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"food_sensitization_milk_egg_peanut","description":"Allergic sensitization to milk, egg, or peanuts as assigned by the caller. true or false. Minor criterion (Guilbert 2004 PEAK Table I). magent does not interpret allergy testing.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"wheezing_unrelated_to_colds","description":"Wheezing unrelated to colds as assigned by the caller. true or false. Minor criterion (Guilbert 2004 PEAK Table I). magent does not auscultate.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"eosinophilia_ge_4pct","description":"Blood eosinophils ≥4% of WBC as assigned by the caller (Guilbert 2004 PEAK Table I; 4% or greater). true or false. Minor criterion. magent does not take an eosinophil percent and does not interpret a CBC. Not Castro-Rodriguez circulating eosinophils >4%.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Modified Asthma Predictive Index","operationId":"get_api_calc_mapi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, positive, major_count, minor_count, four_or_more_wheeze_episodes, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mapi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Modified Asthma Predictive Index (bulk)","operationId":"post_api_calc_mapi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mapi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"aeroallergen_sensitization":"false","eosinophilia_ge_4pct":"false","food_sensitization_milk_egg_peanut":"false","four_or_more_wheeze_episodes":"false","md_atopic_dermatitis":"false","parental_asthma":"false","wheezing_unrelated_to_colds":"false"},{"aeroallergen_sensitization":"false","eosinophilia_ge_4pct":"false","food_sensitization_milk_egg_peanut":"false","four_or_more_wheeze_episodes":"false","md_atopic_dermatitis":"false","parental_asthma":"false","wheezing_unrelated_to_colds":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/asds":{"get":{"description":"Apply the Edmiaston 2010 five-item Acute Stroke Dysphagia Screen and return whether all five criteria hold (asds_pass).\n\nWhen an agent already has a caller-assigned total GCS 3-15 and the four bedside flags (facial, tongue, palatal, 3-ounce water-swallow aspiration signs) and needs the published fail-any screen result, not a swallow diagnosis or diet order.\n\nNot a medical device.\n\nNot a diagnosis of dysphagia and not a diet order.\n\nThe caller assigns GCS and the four bedside flags. magent does not examine cranial nerves, assign GCS, or administer a 3-ounce water swallow.\n\nA fail is not a swallow-study order. A pass is not clearance for oral intake. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"gcs","description":"Caller-assigned total GCS as an integer 3-15. Criterion met when GCS ≥ 13; 12 does not meet. magent does not assign GCS (use /api/calc/gcs for eye, verbal, and motor).","required":true,"schema":{"type":"integer"},"example":"15"},{"in":"query","name":"facial_asymmetry_or_weakness","description":"Facial asymmetry or weakness. true or false as assigned by the caller. Criterion met when false. magent does not examine cranial nerves.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"tongue_asymmetry_or_weakness","description":"Tongue asymmetry or weakness. true or false as assigned by the caller. Criterion met when false. magent does not examine cranial nerves.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"palatal_asymmetry_or_weakness","description":"Palatal asymmetry or weakness. true or false as assigned by the caller. Criterion met when false. magent does not examine cranial nerves.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"water_swallow_aspiration_signs","description":"Signs of aspiration on a 3-ounce water swallow as assigned by the caller. true or false. Criterion met when false. magent does not administer a swallow test.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Acute Stroke Dysphagia Screen","operationId":"get_api_calc_asds","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, asds_pass, criteria, citation, disclaimer."},"400":{"description":"invalid_asds: Acute Stroke Dysphagia Screen needs gcs and the four bedside flags (Edmiaston 2010). Returned before settlement; you are not charged.; invalid_gcs_total: gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/asds"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Acute Stroke Dysphagia Screen (bulk)","operationId":"post_api_calc_asds","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_asds: Acute Stroke Dysphagia Screen needs gcs and the four bedside flags (Edmiaston 2010). Returned before settlement; you are not charged.; invalid_gcs_total: gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/asds"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"facial_asymmetry_or_weakness":"false","gcs":"15","palatal_asymmetry_or_weakness":"false","tongue_asymmetry_or_weakness":"false","water_swallow_aspiration_signs":"false"},{"facial_asymmetry_or_weakness":"false","gcs":"15","palatal_asymmetry_or_weakness":"false","tongue_asymmetry_or_weakness":"false","water_swallow_aspiration_signs":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pram":{"get":{"description":"Sum five caller-assigned Chalut 2000 PRAM item points and return the published 0-12 total.\n\nWhen an agent has already assigned published Chalut 2000 points for oxygen saturation, suprasternal retractions, scalene contraction, air entry, and wheezing and needs the 0-12 total. magent does not auscultate, measure saturation, or diagnose asthma.\n\nNot a medical device and not an asthma diagnosis or a treatment or admission order.\n\nEach of the five items is a caller-assigned published point value from Chalut 2000. magent does not auscultate, measure oxygen saturation, or examine the patient.\n\nChalut 2000 5-item index, max 12. Score only; magent does not emit mild/moderate/severe 0-3/4-7/8-12 bands. Ducharme 2008 validated the same 5-item 12-point score in ages 2-17 and is not used here as extra cutoffs.\n\nNot the Westley 1978 croup score. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"oxygen_sat_points","description":"Caller-assigned Chalut 2000 PRAM oxygen saturation points (integer 0, 1, or 2): 0 if ≥95%; 1 if 92-94%; 2 if <92%. magent does not measure oxygen saturation.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"suprasternal","description":"Caller-assigned Chalut 2000 PRAM suprasternal retractions (integer 0 or 2): 0 absent; 2 present. Not 1. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"scalene","description":"Caller-assigned Chalut 2000 PRAM scalene muscle contraction (integer 0 or 2): 0 absent; 2 present. Not 1. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"air_entry","description":"Caller-assigned Chalut 2000 PRAM air entry (integer 0, 1, 2, or 3): 0 normal; 1 decreased at the base; 2 decreased at the apex and base; 3 minimal or absent. magent does not auscultate.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"wheezing","description":"Caller-assigned Chalut 2000 PRAM wheezing (integer 0, 1, 2, or 3): 0 absent; 1 expiratory only; 2 inspiratory with or without expiratory; 3 audible without a stethoscope or silent chest. magent does not auscultate.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"PRAM","operationId":"get_api_calc_pram","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_pram_item: oxygen_sat_points 0-2, suprasternal 0 or 2, scalene 0 or 2, air_entry 0-3, and wheezing 0-3 (Chalut 2000). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pram"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PRAM (bulk)","operationId":"post_api_calc_pram","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pram_item: oxygen_sat_points 0-2, suprasternal 0 or 2, scalene 0 or 2, air_entry 0-3, and wheezing 0-3 (Chalut 2000). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pram"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"air_entry":"0","oxygen_sat_points":"0","scalene":"0","suprasternal":"0","wheezing":"0"},{"air_entry":"0","oxygen_sat_points":"0","scalene":"0","suprasternal":"0","wheezing":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/plasmic":{"get":{"description":"Sum the seven Bendapudi 2017 PLASMIC items and return the published 0-4 / 5 / 6-7 pretest band for severe ADAMTS13 deficiency.\n\nWhen an agent needs the published PLASMIC point total and pretest band and must not invent a plasma-exchange order or an ADAMTS13 activity result.\n\nNot a medical device.\n\nNot a plasma-exchange order and not a diagnosis of TTP.\n\nmagent does not assay hemolysis. hemolysis is a caller-assigned flag (reticulocyte count >2.5% or undetectable haptoglobin or indirect bilirubin >2.0 mg/dL per Bendapudi 2017).\n\nDoes not return percents or ADAMTS13 activity. Bands 0-4 / 5 / 6-7 are pretest groups for severe ADAMTS13 deficiency.\n\nPlatelets 30×10^9/L, MCV 90 fL, INR 1.5, and creatinine 2.0 mg/dL do not score (strict <).\n\nA point is given for no active cancer and for no solid-organ or stem-cell transplant (those flags true score 0). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"platelets_10e9_l","description":"Platelet count ×10^9/L (1-2000). Scores 1 when <30; 30 does not score (Bendapudi 2017).","required":true,"schema":{"type":"number"},"example":"15"},{"in":"query","name":"hemolysis","description":"Caller-assigned hemolysis (Bendapudi 2017: reticulocyte count >2.5% or undetectable haptoglobin or indirect bilirubin >2.0 mg/dL). true or false. magent does not assay. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"active_cancer","description":"Active cancer as assigned by the caller. true or false. 1 point when false (no active cancer).","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"solid_organ_or_stem_cell_transplant","description":"History of solid-organ or stem-cell transplant as assigned by the caller. true or false. 1 point when false (no transplant history).","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"mcv_fl","description":"Mean corpuscular volume in fL (50-120). Scores 1 when <90; 90.0 does not score.","required":true,"schema":{"type":"number"},"example":"85"},{"in":"query","name":"inr","description":"INR (0.8-10). Scores 1 when <1.5; 1.5 does not score.","required":true,"schema":{"type":"number"},"example":"1.1"},{"in":"query","name":"creatinine_mg_dl","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l. Scores 1 when <2.0; 2.0 does not score.","required":false,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"creatinine_umol_l","description":"Serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42. Provide this or creatinine_mg_dl.","required":false,"schema":{"type":"number"},"example":"88.4"}],"summary":"PLASMIC score","operationId":"get_api_calc_plasmic","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, plasmic_band, platelets_10e9_l, hemolysis, active_cancer, solid_organ_or_stem_cell_transplant, mcv_fl, inr, creatinine_mg_dl, components, citation, disclaimer."},"400":{"description":"invalid_platelets: platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_mcv: mcv_fl must be a number from 50 to 120. Returned before settlement; you are not charged.; invalid_inr: inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/plasmic"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PLASMIC score (bulk)","operationId":"post_api_calc_plasmic","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_platelets: platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_mcv: mcv_fl must be a number from 50 to 120. Returned before settlement; you are not charged.; invalid_inr: inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/plasmic"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"active_cancer":"false","creatinine_mg_dl":"1.0","hemolysis":"true","inr":"1.1","mcv_fl":"85","platelets_10e9_l":"15","solid_organ_or_stem_cell_transplant":"false"},{"active_cancer":"false","creatinine_mg_dl":"1.0","hemolysis":"true","inr":"1.1","mcv_fl":"85","platelets_10e9_l":"15","solid_organ_or_stem_cell_transplant":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/fomepizole":{"get":{"description":"Compute adult IV fomepizole loading and maintenance milligrams from body weight using the AACT 1999 ethylene glycol guideline schedule, with a 12-hour or 4-hour interval from the hemodialysis flag.\n\nWhen an agent needs published AACT 1999 fomepizole milligram-per-kilogram arithmetic and must not invent an ethanol-as-antidote dose, an indication, or a prescription.\n\nNot a medical device, not a prescription, and not Antizol. magent does not name a brand or choose a vial.\n\nNot an indication decision. magent does not decide whether to treat ethylene glycol or methanol poisoning.\n\nmagent does not assay ethylene glycol or methanol.\n\nAdult IV milligram arithmetic only. Does not encode a Rumack nomogram or ethanol-as-antidote doses. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"weight_kg","description":"Weight in kilograms (1-200).","required":true,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"hemodialysis","description":"true during hemodialysis (same milligrams, interval 4 hours). false otherwise (interval 12 hours). Required.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Fomepizole","operationId":"get_api_calc_fomepizole","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, weight_kg, hemodialysis, load_mg, maintenance_10_mg, maintenance_15_mg, interval_hours, citation, disclaimer."},"400":{"description":"invalid_fomepizole: Fomepizole inputs must match Barceloux 1999 AACT weight and hemodialysis flag from that guideline. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/fomepizole"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Fomepizole (bulk)","operationId":"post_api_calc_fomepizole","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_fomepizole: Fomepizole inputs must match Barceloux 1999 AACT weight and hemodialysis flag from that guideline. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/fomepizole"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"hemodialysis":"false","weight_kg":"70"},{"hemodialysis":"false","weight_kg":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/acetylcysteine-iv":{"get":{"description":"Compute intravenous acetylcysteine milligrams from body weight using the Prescott 1979 paracetamol (acetaminophen) poisoning schedule: 150 mg/kg over 15 minutes, then 50 mg/kg over 4 hours, then 100 mg/kg over 16 hours (300 mg/kg over 20.25 hours).\n\nWhen an agent needs published Prescott 1979 intravenous acetylcysteine milligram-per-kilogram arithmetic and must not invent an oral protocol, a nomogram reading, or a prescription.\n\nNot a medical device. A licensed clinician remains responsible for interpretation.\n\nNot a prescription. magent does not choose a vial, concentration, or infusion pump setting.\n\nNot a Rumack–Matthew nomogram. magent does not plot a nomogram image.\n\nmagent does not interpret a plasma acetaminophen (paracetamol) concentration and does not decide whether to treat.\n\nThis is the Prescott 1979 intravenous 15-minute load, then 4 hours, then 16 hours. It is not an oral protocol. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"weight_kg","description":"Weight in kilograms (1-200).","required":true,"schema":{"type":"number"},"example":"70"}],"summary":"Intravenous acetylcysteine","operationId":"get_api_calc_acetylcysteine_iv","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, weight_kg, load_mg, infusion_4h_mg, infusion_16h_mg, total_mg, load_minutes, infusion_4h_hours, infusion_16h_hours, total_hours, citation, disclaimer."},"400":{"description":"invalid_acetylcysteine: Acetylcysteine inputs must match Prescott 1979 weight from that intravenous protocol. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/acetylcysteine-iv"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Intravenous acetylcysteine (bulk)","operationId":"post_api_calc_acetylcysteine_iv","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_acetylcysteine: Acetylcysteine inputs must match Prescott 1979 weight from that intravenous protocol. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/acetylcysteine-iv"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"weight_kg":"70"},{"weight_kg":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/menza":{"get":{"description":"Sum the four Menza 2009 caller-assigned flags and return the 0–19 point total.\n\nWhen an agent has already assigned the four Menza 2009 flags and needs the published point total. magent does not take a sexual history and does not diagnose HIV, order PrEP, or run a test-and-treat protocol.\n\nNot a medical device.\n\nNot a diagnosis of HIV infection.\n\nNot a PrEP order and not a test-and-treat protocol.\n\nmagent does not take a sexual history. Each flag is caller-assigned.\n\nThis is Menza 2009 only. Not HIRI-MSM and not SexPro.\n\nMenza 2009 did not publish named low/high strata or PrEP cutoffs; magent returns the integer score only. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"meth_or_poppers_6mo","description":"Methamphetamine or inhaled nitrites (poppers) in the prior 6 months as assigned by the caller (Menza 2009). true scores 11. magent does not take a sexual history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bacterial_sti","description":"Current diagnosis or history of bacterial STI (Menza 2009: gonorrhea, chlamydia, or syphilis) as assigned by the caller. true scores 4. magent does not take a sexual history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"partners_ge_10_year","description":"Ten or more male sex partners in the prior year as assigned by the caller (Menza 2009). true scores 3. magent does not take a sexual history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"uai_positive_or_unknown_year","description":"Unprotected anal intercourse with a partner of positive or unknown HIV status in the prior year as assigned by the caller (Menza 2009). true scores 1. magent does not take a sexual history.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Menza","operationId":"get_api_calc_menza","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/menza"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Menza (bulk)","operationId":"post_api_calc_menza","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/menza"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bacterial_sti":"false","meth_or_poppers_6mo":"false","partners_ge_10_year":"false","uai_positive_or_unknown_year":"false"},{"bacterial_sti":"false","meth_or_poppers_6mo":"false","partners_ge_10_year":"false","uai_positive_or_unknown_year":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mipi":{"get":{"description":"Sum the Hoster 2008 simplified MIPI (mantle cell lymphoma international prognostic index) from age, ECOG, LDH/ULN, and WBC and return low (0–3), intermediate (4–5), or high (6–11).\n\nWhen an agent needs the published simplified MIPI point total and risk group and must not invent a lymphoma diagnosis, and must not substitute continuous MIPI or MIPI-c.\n\nNot a medical device and not a lymphoma diagnosis or treatment choice. magent does not examine the patient.\n\nThis is the simplified MIPI (Hoster 2008), not the continuous MIPI (log10 WBC formula) and not MIPI-c (Ki-67).\n\nmagent does not assign ECOG, assay LDH, or measure WBC. ldh_uln_ratio is the caller-assigned LDH/ULN ratio; WBC is caller-assigned. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). <50 scores 0; 50–59 scores 1; 60–69 scores 2; ≥70 scores 3 (Hoster 2008 simplified MIPI). 50 and 59 score 1; 60 and 69 score 2; 70 scores 3.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"ecog","description":"ECOG performance status 0-4 as assigned by the caller (Hoster 2008 simplified MIPI). 0–1 scores 0; 2–4 scores 2. magent does not assign ECOG.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"ldh_uln_ratio","description":"Serum LDH divided by the laboratory ULN (0.1-20). <0.67 scores 0; 0.67–<1.0 scores 1; 1.0–<1.5 scores 2; ≥1.5 scores 3 (0.67 scores 1; 0.99 scores 1; 1.0 scores 2; 1.49 scores 2; 1.5 scores 3). magent does not assay LDH.","required":true,"schema":{"type":"number"},"example":"0.5"},{"in":"query","name":"wbc_k_ul","description":"WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul, not both. Range 0.01-500. Converted to ×10^9/L: <6.7 scores 0; 6.7–<10 scores 1; 10–<15 scores 2; ≥15 scores 3 (6.7 scores 1; 9.999 scores 1; 10 scores 2; 14.999 scores 2; 15 scores 3).","required":false,"schema":{"type":"number"},"example":"5"},{"in":"query","name":"wbc_ul","description":"WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul, not both. Range 10-500000. Converted to ×10^9/L (= wbc_ul/1000): <6.7 scores 0; 6.7–<10 scores 1; 10–<15 scores 2; ≥15 scores 3 (6.7 scores 1; 9.999 scores 1; 10 scores 2; 14.999 scores 2; 15 scores 3).","required":false,"schema":{"type":"number"},"example":"5000"}],"summary":"MIPI","operationId":"get_api_calc_mipi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk_group, age_years, ecog, ldh_uln_ratio, wbc_ul, wbc_10e9_l, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_ecog: ecog must be an integer from 0 to 4 (Shipp 1993 IPI). Returned before settlement; you are not charged.; invalid_ldh_ratio: ldh_uln_ratio must be a number from 0.1 to 20 (Hoster 2008 simplified MIPI). Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mipi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"MIPI (bulk)","operationId":"post_api_calc_mipi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_ecog: ecog must be an integer from 0 to 4 (Shipp 1993 IPI). Returned before settlement; you are not charged.; invalid_ldh_ratio: ldh_uln_ratio must be a number from 0.1 to 20 (Hoster 2008 simplified MIPI). Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mipi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","ecog":"0","ldh_uln_ratio":"0.5","wbc_k_ul":"5"},{"age":"40","ecog":"0","ldh_uln_ratio":"0.5","wbc_k_ul":"5"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/harvey-bradshaw":{"get":{"description":"Sum Harvey 1980 simple-index items (previous-day well-being, abdominal pain, liquid stools, abdominal mass, and one point per listed complication) and return the total. Does not return later remission or activity bands.\n\nWhen an agent has already assigned the 1980 letter item integers and complication flags for the previous day and needs the simple index total, not a Crohn's diagnosis, Best 1976 CDAI, or later HBI remission cutoffs.\n\nNot a medical device and not a Crohn's diagnosis or a treatment order.\n\nmagent does not examine the patient. Each item and complication flag is caller-assigned.\n\nItems 1–3 (well-being, abdominal pain, liquid stools) are the previous day as in the 1980 letter. This is a one-day simple index, not the Best 1976 CDAI.\n\nThe 1980 letter does not define remission or activity bands. magent returns score and max_score only and does not apply later HBI remission cutoffs. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"well_being","description":"Caller-assigned Harvey 1980 general well-being for the previous day (integer 0-4): 0 very well; 1 slightly below par; 2 poor; 3 very poor; 4 terrible. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"abdominal_pain","description":"Caller-assigned Harvey 1980 abdominal pain for the previous day (integer 0-3): 0 none; 1 mild; 2 moderate; 3 severe. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"liquid_stools","description":"Count of liquid stools that day (Harvey 1980; 1 point per stool). Integer 0-30 is a magent clamp, not a published maximum. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"abdominal_mass","description":"Caller-assigned Harvey 1980 abdominal mass (integer 0-3): 0 none; 1 dubious; 2 definite; 3 definite and tender. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"arthralgia","description":"Arthralgia present (Harvey 1980 complications as used for the simple index). true or false. 1 point if true. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"uveitis","description":"Uveitis present (Harvey 1980 complications as used for the simple index). true or false. 1 point if true. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"erythema_nodosum","description":"Erythema nodosum present (Harvey 1980 complications as used for the simple index). true or false. 1 point if true. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"aphthous_ulcers","description":"Aphthous ulcers present (Harvey 1980 complications as used for the simple index). true or false. 1 point if true. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pyoderma_gangrenosum","description":"Pyoderma gangrenosum present (Harvey 1980 complications as used for the simple index). true or false. 1 point if true. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"anal_fissure","description":"Anal fissure present (Harvey 1980 complications as used for the simple index). true or false. 1 point if true. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"new_fistula","description":"New fistula present (Harvey 1980 complications as used for the simple index). true or false. 1 point if true. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"abscess","description":"Abscess present (Harvey 1980 complications as used for the simple index). true or false. 1 point if true. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"HBI","operationId":"get_api_calc_harvey_bradshaw","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, well_being, abdominal_pain, liquid_stools, abdominal_mass, arthralgia, uveitis, erythema_nodosum, aphthous_ulcers, pyoderma_gangrenosum, anal_fissure, new_fistula, abscess, components, citation, disclaimer."},"400":{"description":"invalid_hbi: well_being 0-4, abdominal_pain 0-3, and abdominal_mass 0-3 (Harvey 1980). Returned before settlement; you are not charged.; invalid_liquid_stools: liquid_stools must be an integer from 0 to 30 (Harvey 1980 count; magent clamp). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/harvey-bradshaw"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HBI (bulk)","operationId":"post_api_calc_harvey_bradshaw","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_hbi: well_being 0-4, abdominal_pain 0-3, and abdominal_mass 0-3 (Harvey 1980). Returned before settlement; you are not charged.; invalid_liquid_stools: liquid_stools must be an integer from 0 to 30 (Harvey 1980 count; magent clamp). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/harvey-bradshaw"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"abdominal_mass":"0","abdominal_pain":"0","abscess":"false","anal_fissure":"false","aphthous_ulcers":"false","arthralgia":"false","erythema_nodosum":"false","liquid_stools":"0","new_fistula":"false","pyoderma_gangrenosum":"false","uveitis":"false","well_being":"0"},{"abdominal_mass":"0","abdominal_pain":"0","abscess":"false","anal_fissure":"false","aphthous_ulcers":"false","arthralgia":"false","erythema_nodosum":"false","liquid_stools":"0","new_fistula":"false","pyoderma_gangrenosum":"false","uveitis":"false","well_being":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/kdigo-aki":{"get":{"description":"Apply KDIGO 2012 Table 2 AKI staging and return stage 0-3 as the worse of the creatinine and urine-output limbs, with initiated renal replacement therapy or a caller pediatric eGFR <35 flag mapping to stage 3.\n\nWhen an agent already has baseline and current serum creatinine in mg/dL and a caller-assigned KDIGO urine-output category (or an RRT or pediatric eGFR <35 flag) and needs the published KDIGO stage. magent does not assay creatinine, measure urine, or compute eGFR. Not AKIN 2007 and not RIFLE.\n\nNot a medical device and not a diagnosis of acute kidney injury.\n\nmagent does not assay creatinine or measure urine. baseline_creatinine_mg_dl and current_creatinine_mg_dl are caller-supplied in mg/dL only.\n\nurine_output is the caller-assigned published duration category. magent does not collect weight or urine volume.\n\npediatric_egfr_lt_35 is a caller-assigned Table 2 flag. magent does not compute eGFR and does not use MDRD.\n\nThe observation window in KDIGO 2012 is caller-applied; magent does not collect observation time.\n\nThis tool is KDIGO 2012 Table 2 staging only. Not AKIN 2007 and not RIFLE. It does not report mortality bands. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"baseline_creatinine_mg_dl","description":"Baseline serum creatinine in mg/dL (0.1-20). Staging uses the unrounded value. µmol/L is not accepted on this tool. magent does not assay creatinine.","required":true,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"current_creatinine_mg_dl","description":"Current serum creatinine in mg/dL (0.1-20). Staging uses the unrounded value. µmol/L is not accepted on this tool. magent does not assay creatinine.","required":true,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"urine_output","description":"Caller-assigned KDIGO urine-output category (KDIGO 2012 Table 2): none (no oliguria or anuria criterion); oliguria_6_to_12h (<0.5 mL/kg/h for 6–12 hours); oliguria_ge_12h (<0.5 mL/kg/h for ≥12 hours); oliguria_24h_or_anuria_12h (<0.3 mL/kg/h for ≥24 hours or anuria for ≥12 hours). Case-insensitive. magent does not collect weight or measure urine.","required":true,"schema":{"type":"string","enum":["none","oliguria_6_to_12h","oliguria_ge_12h","oliguria_24h_or_anuria_12h"]},"example":"none"},{"in":"query","name":"rrt","description":"Renal replacement therapy initiated as assigned by the caller. true maps to KDIGO stage 3 irrespective of creatinine or urine stage (KDIGO 2012 Table 2). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pediatric_egfr_lt_35","description":"Caller-assigned KDIGO Table 2 pediatric limb: patients <18 years with a decrease in eGFR to <35 mL/min/1.73 m². true maps to stage 3 irrespective of creatinine or urine stage. magent does not compute eGFR and does not use MDRD. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"KDIGO AKI","operationId":"get_api_calc_kdigo_aki","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, baseline_creatinine_mg_dl, current_creatinine_mg_dl, urine_output, rrt, pediatric_egfr_lt_35, creat_stage, uo_stage, stage, components, citation, disclaimer."},"400":{"description":"invalid_kdigo_aki: KDIGO AKI inputs must match the 2012 Table 2 creatinine, urine-output category, RRT flag, and optional pediatric eGFR flag from that guideline. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/kdigo-aki"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"KDIGO AKI (bulk)","operationId":"post_api_calc_kdigo_aki","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_kdigo_aki: KDIGO AKI inputs must match the 2012 Table 2 creatinine, urine-output category, RRT flag, and optional pediatric eGFR flag from that guideline. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/kdigo-aki"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"baseline_creatinine_mg_dl":"1.0","current_creatinine_mg_dl":"1.0","pediatric_egfr_lt_35":"false","rrt":"false","urine_output":"none"},{"baseline_creatinine_mg_dl":"1.0","current_creatinine_mg_dl":"1.0","pediatric_egfr_lt_35":"false","rrt":"false","urine_output":"none"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pecarn-head":{"get":{"description":"Apply the Kuppermann 2009 PECARN prediction trees and return high, intermediate, or low risk of clinically important brain injury from caller-assigned findings after pediatric head trauma.\n\nWhen an agent has caller-assigned findings after blunt head trauma in a child 0-17 years and needs the Kuppermann 2009 PECARN head CT trees, not Canadian CT Head, CATCH, CHALICE, or NEXUS.\n\nNot a diagnosis of clinically important brain injury. magent does not examine the patient.\n\nThis tool is the Kuppermann 2009 PECARN head CT rule only. It is not Canadian CT Head, not CATCH, not CHALICE, not NEXUS, and not PECARN IAI, febrile infant, or c-spine rules.\n\nTwo mutually exclusive trees: age <2 (lt_2) and age 2-17 (ge_2). Flags that belong to the other age band are required on the API but do not score.\n\nThe caller assigns GCS <=14, altered mental status (agitation, somnolence, repetitive questioning, or slow response), and all other findings. magent does not take a GCS integer and does not classify mechanism or fall height.\n\nSevere mechanism is caller-assigned. Published list: MVC ejection, rollover, or death of another passenger; unhelmeted pedestrian or bicyclist struck by a motorized vehicle; fall >3 ft if <2 years or >5 ft if >=2 years; head struck by a high-impact object. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (0-17). Age 0 and 1 use the lt_2 tree; age 2 through 17 use the ge_2 tree. Age 18 is rejected.","required":true,"schema":{"type":"integer"},"example":"10"},{"in":"query","name":"gcs_le_14","description":"GCS <=14 as assigned by the caller. true or false. High-risk in both trees. GCS 15 is not <=14. magent does not take a GCS integer.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"altered_mental_status","description":"Altered mental status as assigned by the caller (paper: agitation, somnolence, repetitive questioning, or slow response). true or false. High-risk in both trees.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"palpable_skull_fracture","description":"Palpable skull fracture as assigned by the caller. true or false. High-risk only on the lt_2 tree; parsed but not scored when age >= 2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"signs_basilar_skull_fracture","description":"Signs of basilar skull fracture as assigned by the caller. true or false. High-risk only on the ge_2 tree; parsed but not scored when age < 2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"nonfrontal_scalp_hematoma","description":"Occipital, parietal, or temporal scalp hematoma (not frontal) as assigned by the caller. true or false. Intermediate only on the lt_2 tree; parsed but not scored when age >= 2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"loc_ge_5_seconds","description":"Loss of consciousness >=5 seconds as assigned by the caller. true or false. Intermediate only on the lt_2 tree; parsed but not scored when age >= 2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"not_acting_normally","description":"Not acting normally per parent report as assigned by the caller. true or false. Intermediate only on the lt_2 tree; parsed but not scored when age >= 2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"history_of_loc","description":"History of loss of consciousness as assigned by the caller. true or false. Intermediate only on the ge_2 tree; parsed but not scored when age < 2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"history_of_vomiting","description":"History of vomiting as assigned by the caller. true or false. Intermediate only on the ge_2 tree; parsed but not scored when age < 2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"severe_headache","description":"Severe headache as assigned by the caller. true or false. Intermediate only on the ge_2 tree; parsed but not scored when age < 2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"severe_mechanism","description":"Severe mechanism as assigned by the caller. true or false. Intermediate in both trees. Paper list: MVC ejection/rollover/death of another passenger; unhelmeted pedestrian or bicyclist struck by a motorized vehicle; fall >3 ft if <2 years or >5 ft if >=2 years; head struck by a high-impact object. magent does not classify mechanism or take fall height.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"PECARN pediatric head CT","operationId":"get_api_calc_pecarn_head","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, age_band, risk_tier, ct_recommended, observation_vs_ct, ct_not_recommended, criteria, citation, disclaimer."},"400":{"description":"invalid_pecarn_age: age must be an integer from 0 to 17. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pecarn-head"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PECARN pediatric head CT (bulk)","operationId":"post_api_calc_pecarn_head","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pecarn_age: age must be an integer from 0 to 17. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pecarn-head"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"10","altered_mental_status":"false","gcs_le_14":"false","history_of_loc":"false","history_of_vomiting":"false","loc_ge_5_seconds":"false","nonfrontal_scalp_hematoma":"false","not_acting_normally":"false","palpable_skull_fracture":"false","severe_headache":"false","severe_mechanism":"false","signs_basilar_skull_fracture":"false"},{"age":"10","altered_mental_status":"false","gcs_le_14":"false","history_of_loc":"false","history_of_vomiting":"false","loc_ge_5_seconds":"false","nonfrontal_scalp_hematoma":"false","not_acting_normally":"false","palpable_skull_fracture":"false","severe_headache":"false","severe_mechanism":"false","signs_basilar_skull_fracture":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/dast-10":{"get":{"description":"Count Skinner 1982 DAST-10 problem-direction answers (able_to_stop reverse-scored) and return the published degree-of-problems band (0 none, 1-2 low, 3-5 moderate, 6-8 substantial, 9-10 severe).\n\nWhen an agent has already assigned the ten DAST-10 yes/no items and needs that 1982 scored total and degree-of-problems bands, not DAST-20, DAST-28, a diagnosis, or a toxicology panel.\n\nNot a medical device.\n\nNot a diagnosis of a drug use disorder.\n\nNot a toxicology panel and not a measure of alcohol use.\n\nmagent does not interpret the items. Each flag is caller-assigned yes/no.\n\nScoring uses the Skinner 1982 DAST-10 problem-direction key. able_to_stop scores 1 if false and 0 if true. magent does not award 1 point for every yes.\n\nThis is the 10-item DAST-10 only. Not DAST-28 and not DAST-20.\n\nDegree-of-problems bands follow the 1982 DAST-10 table: 0 no problems, 1-2 low, 3-5 moderate, 6-8 substantial, 9-10 severe. magent does not apply Gavin 1989 DAST DSM-III cut-points (5/6) or later NIDA-only cutoffs. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"used_drugs_nonmedical","description":"Have you used drugs other than those required for medical reasons? (Skinner 1982 DAST-10 item 1; past 12 months). true or false as assigned by the caller. true is the problem-direction answer and scores 1. magent does not interpret the item.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"abuse_more_than_one","description":"Do you abuse more than one drug at a time? (Skinner 1982 DAST-10 item 2; past 12 months). true or false as assigned by the caller. true is the problem-direction answer and scores 1. magent does not interpret the item.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"able_to_stop","description":"Are you always able to stop using drugs when you want to? (Skinner 1982 DAST-10 item 3; past 12 months). true or false as assigned by the caller. false is the problem-direction answer and scores 1 (reverse-scored). magent does not interpret the item.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"blackouts_flashbacks","description":"Have you had blackouts or flashbacks as a result of drug use? (Skinner 1982 DAST-10 item 4; past 12 months). true or false as assigned by the caller. true is the problem-direction answer and scores 1. magent does not interpret the item.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"feel_bad_guilty","description":"Do you ever feel bad or guilty about your drug use? (Skinner 1982 DAST-10 item 5; past 12 months). true or false as assigned by the caller. true is the problem-direction answer and scores 1. magent does not interpret the item.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"others_complain","description":"Does your spouse (or parents) ever complain about your involvement with drugs? (Skinner 1982 DAST-10 item 6; past 12 months). true or false as assigned by the caller. true is the problem-direction answer and scores 1. magent does not interpret the item.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"neglected_family","description":"Have you neglected your family because of your use of drugs? (Skinner 1982 DAST-10 item 7; past 12 months). true or false as assigned by the caller. true is the problem-direction answer and scores 1. magent does not interpret the item.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"illegal_activities","description":"Have you engaged in illegal activities in order to obtain drugs? (Skinner 1982 DAST-10 item 8; past 12 months). true or false as assigned by the caller. true is the problem-direction answer and scores 1. magent does not interpret the item.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"withdrawal","description":"Have you ever experienced withdrawal symptoms (felt sick) when you stopped taking drugs? (Skinner 1982 DAST-10 item 9; past 12 months). true or false as assigned by the caller. true is the problem-direction answer and scores 1. magent does not interpret the item.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"medical_problems","description":"Have you had medical problems as a result of your drug use (e.g., memory loss, hepatitis, convulsions, bleeding)? (Skinner 1982 DAST-10 item 10; past 12 months). true or false as assigned by the caller. true is the problem-direction answer and scores 1. magent does not interpret the item.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"DAST-10","operationId":"get_api_calc_dast_10","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, dast_band, components, citation, disclaimer."},"400":{"description":"invalid_dast_item: each DAST-10 item must be true or false (Skinner 1982; item able_to_stop is reverse-scored). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dast-10"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"DAST-10 (bulk)","operationId":"post_api_calc_dast_10","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_dast_item: each DAST-10 item must be true or false (Skinner 1982; item able_to_stop is reverse-scored). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dast-10"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"able_to_stop":"true","abuse_more_than_one":"false","blackouts_flashbacks":"false","feel_bad_guilty":"false","illegal_activities":"false","medical_problems":"false","neglected_family":"false","others_complain":"false","used_drugs_nonmedical":"false","withdrawal":"false"},{"able_to_stop":"true","abuse_more_than_one":"false","blackouts_flashbacks":"false","feel_bad_guilty":"false","illegal_activities":"false","medical_problems":"false","neglected_family":"false","others_complain":"false","used_drugs_nonmedical":"false","withdrawal":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/4c":{"get":{"description":"Sum the Knight 2020 ISARIC 4C Mortality Score items and return the published Table 5 band (low, intermediate, high, or very high).\n\nWhen an agent already has the Knight 2020 Table 2 inputs (age, sex, comorbidity count, respiratory rate, room-air SpO2, total GCS, urea, CRP) and needs the published total and band, not a COVID-19 diagnosis or treatment order.\n\nNot a medical device. Not a COVID-19 diagnosis, treatment order, or ICU-admission protocol.\n\ncomorbidity_count is a caller-assigned count of Charlson-plus-obesity comorbidities from Knight 2020. magent does not compute Charlson.\n\nGCS is a caller-assigned integer 3–15. This API does not collect eye, verbal, or motor components. magent does not examine the patient.\n\nSpO2 is room-air saturation as assigned by the caller. Urea may be supplied as mmol/L or converted from BUN mg/dL (÷ 2.8); not both.\n\nBands are Knight 2020 Table 5 validation mortality strata (low 0–3, intermediate 4–8, high 9–14, very high ≥15). They are not treatment cutoffs. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Knight 2020 Table 2: <50 scores 0; 50–59 scores 2; 60–69 scores 4; 70–79 scores 6; ≥80 scores 7.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"sex","description":"Sex at birth (Knight 2020). female scores 0; male scores 1.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"comorbidity_count","description":"Caller-assigned count of Charlson-plus-obesity comorbidities from Knight 2020 (integer 0–20). 0 scores 0; 1 scores 1; ≥2 scores 2. magent does not compute Charlson.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"respiratory_rate","description":"Respiratory rate in breaths/min (integer 4–80). Knight 2020: <20 scores 0; 20–29 scores 1; ≥30 scores 2. magent does not measure vitals.","required":true,"schema":{"type":"integer"},"example":"16"},{"in":"query","name":"spo2_percent","description":"Room-air SpO2 percent (50–100). Knight 2020: ≥92 scores 0; <92 scores 2. magent does not measure saturation.","required":true,"schema":{"type":"number"},"example":"98"},{"in":"query","name":"gcs","description":"Caller-assigned total GCS as an integer 3–15. 15 scores 0; <15 scores 2 (Knight 2020). This API does not collect eye, verbal, or motor components.","required":true,"schema":{"type":"integer"},"example":"15"},{"in":"query","name":"urea_mmol_l","description":"Serum urea in mmol/L (1–50). Provide this or bun_mg_dl, not both. Knight 2020: <7 scores 0; 7–14 inclusive scores 1; >14 scores 3.","required":false,"schema":{"type":"number"},"example":"5"},{"in":"query","name":"bun_mg_dl","description":"BUN in mg/dL (3–140). Converted as urea_mmol_l = bun_mg_dl / 2.8.","required":false,"schema":{"type":"number"},"example":"14"},{"in":"query","name":"crp_mg_l","description":"C-reactive protein in mg/L (0–500). Knight 2020: <50 scores 0; 50–99 scores 1; ≥100 scores 2.","required":true,"schema":{"type":"number"},"example":"10"}],"summary":"4C","operationId":"get_api_calc_4c","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, four_c_band, age_years, sex, comorbidity_count, respiratory_rate, spo2_percent, gcs, urea_mmol_l, crp_mg_l, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_comorbidity_count: comorbidities or comorbidity_count must be an integer from 0 to 20 (Heyland 2011 NUTRIC comorbidities; Knight 2020 4C comorbidity_count, caller-assigned Charlson-plus-obesity, not computed). Returned before settlement; you are not charged.; invalid_respiratory_rate: respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_gcs_total: gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.; invalid_urea: urea_mmol_l (1-50) or bun_mg_dl (3-140) is required, not both. Returned before settlement; you are not charged.; invalid_crp: crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/4c"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"4C (bulk)","operationId":"post_api_calc_4c","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_comorbidity_count: comorbidities or comorbidity_count must be an integer from 0 to 20 (Heyland 2011 NUTRIC comorbidities; Knight 2020 4C comorbidity_count, caller-assigned Charlson-plus-obesity, not computed). Returned before settlement; you are not charged.; invalid_respiratory_rate: respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_gcs_total: gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.; invalid_urea: urea_mmol_l (1-50) or bun_mg_dl (3-140) is required, not both. Returned before settlement; you are not charged.; invalid_crp: crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/4c"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","comorbidity_count":"0","crp_mg_l":"10","gcs":"15","respiratory_rate":"16","sex":"female","spo2_percent":"98","urea_mmol_l":"5"},{"age":"40","comorbidity_count":"0","crp_mg_l":"10","gcs":"15","respiratory_rate":"16","sex":"female","spo2_percent":"98","urea_mmol_l":"5"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mentzer":{"get":{"description":"Compute the Mentzer 1973 index as mean corpuscular volume in fL divided by red-cell count in millions per µL, with the letter’s <13 / >13 / =13 bands.\n\nWhen an agent needs the published MCV/RBC quotient and must not invent a later Mentzer cutoff or a diagnosis of thalassemia or iron deficiency.\n\nNot a medical device. Not a diagnosis of thalassemia or iron deficiency.\n\nMentzer 1973 is the MCV/RBC ratio only. A quotient of 13 is indeterminate; magent does not assign a disease.\n\nDoes not apply later Mentzer cutoffs that are not in the 1973 Lancet letter. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"mcv_fl","description":"Mean corpuscular volume in fL (50-120).","required":true,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"rbc_million_ul","description":"Red-cell count in millions per µL (1.0-8.0). Required.","required":true,"schema":{"type":"number"},"example":"5.6"}],"summary":"Mentzer index","operationId":"get_api_calc_mentzer","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, mcv_fl, rbc_million_ul, mentzer_index, mentzer_band, citation, disclaimer."},"400":{"description":"invalid_mcv: mcv_fl must be a number from 50 to 120. Returned before settlement; you are not charged.; invalid_rbc_million_ul: rbc_million_ul must be a number from 1.0 to 8.0. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mentzer"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Mentzer index (bulk)","operationId":"post_api_calc_mentzer","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_mcv: mcv_fl must be a number from 50 to 120. Returned before settlement; you are not charged.; invalid_rbc_million_ul: rbc_million_ul must be a number from 1.0 to 8.0. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mentzer"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"mcv_fl":"70","rbc_million_ul":"5.6"},{"mcv_fl":"70","rbc_million_ul":"5.6"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/cts-6":{"get":{"description":"Sum the six Graham 2006 CTS-6 caller-assigned flags at their published discrete weights and return the total, the >5 and >12 cutoffs, and the matching band.\n\nWhen an agent already has the six Graham 2006 CTS-6 flags assigned and needs the published weighted total, not a carpal-tunnel diagnosis, EMG order, or Boston questionnaire.\n\nNot a medical device and not a CTS diagnosis or EMG order.\n\nmagent does not examine the patient.\n\nEach flag is caller-assigned. magent does not infer median-territory numbness, nocturnal symptoms, thenar atrophy, Phalen, two-point discrimination, or Tinel from text or images.\n\nThis is Graham 2006 CTS-6 only (discrete weights; max 26). It is not a Boston questionnaire.\n\nPublished probability cutoffs are score >5 ≈25% and score >12 ≈80%. Score 5 is not above the 25% cutoff. Score 12 is not above the 80% cutoff. magent does not invent other percent values. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"median_numbness","description":"Numbness predominantly or exclusively in the median nerve territory (Graham 2006, 3.5 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"nocturnal_numbness","description":"Nocturnal numbness (Graham 2006, 4 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"thenar_atrophy_or_weakness","description":"Thenar atrophy or weakness (Graham 2006, 5 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"phalen_positive","description":"Positive Phalen test (Graham 2006, 5 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"two_point_discrimination_loss","description":"Loss of two-point discrimination (Graham 2006, 4.5 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"tinel_positive","description":"Positive Tinel sign (Graham 2006, 4 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"CTS-6","operationId":"get_api_calc_cts_6","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, cts6_band, above_25pct_cutoff, above_80pct_cutoff, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cts-6"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CTS-6 (bulk)","operationId":"post_api_calc_cts_6","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cts-6"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"median_numbness":"false","nocturnal_numbness":"false","phalen_positive":"false","thenar_atrophy_or_weakness":"false","tinel_positive":"false","two_point_discrimination_loss":"false"},{"median_numbness":"false","nocturnal_numbness":"false","phalen_positive":"false","thenar_atrophy_or_weakness":"false","tinel_positive":"false","two_point_discrimination_loss":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/akin":{"get":{"description":"Apply Mehta 2007 Table 2 AKIN staging and return stage 0-3 as the worse of the creatinine and urine-output limbs, with initiated renal replacement therapy mapping to stage 3.\n\nWhen an agent already has baseline and current serum creatinine in mg/dL and a caller-assigned AKIN urine-output category (or an RRT flag) and needs the published AKIN stage. magent does not assay creatinine or measure urine. Not KDIGO 2012 and not RIFLE.\n\nNot a medical device and not a diagnosis of acute kidney injury.\n\nmagent does not assay creatinine or measure urine. baseline_creatinine_mg_dl and current_creatinine_mg_dl are caller-supplied in mg/dL only.\n\nurine_output is the caller-assigned published duration category. magent does not collect weight or urine volume.\n\nThe 48-hour window in Mehta 2007 is caller-applied; magent does not collect observation time.\n\nThis tool is Mehta 2007 Table 2 AKIN staging only. Not KDIGO 2012 and not RIFLE. It does not report mortality bands. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"baseline_creatinine_mg_dl","description":"Baseline serum creatinine in mg/dL (0.1-20). Staging uses the unrounded value. µmol/L is not accepted on this tool. magent does not assay creatinine.","required":true,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"current_creatinine_mg_dl","description":"Current serum creatinine in mg/dL (0.1-20). Staging uses the unrounded value. µmol/L is not accepted on this tool. magent does not assay creatinine.","required":true,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"urine_output","description":"Caller-assigned AKIN urine-output category (Mehta 2007 Table 2): none (no oliguria or anuria criterion); oliguria_gt_6h (<0.5 mL/kg/h for >6 hours); oliguria_gt_12h (<0.5 mL/kg/h for >12 hours); oliguria_24h_or_anuria_12h (<0.3 mL/kg/h for 24 hours or anuria for 12 hours). Case-insensitive. magent does not collect weight or measure urine.","required":true,"schema":{"type":"string","enum":["none","oliguria_gt_6h","oliguria_gt_12h","oliguria_24h_or_anuria_12h"]},"example":"none"},{"in":"query","name":"rrt","description":"Renal replacement therapy initiated as assigned by the caller. true maps to AKIN stage 3 irrespective of creatinine or urine stage (Mehta 2007). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"AKIN","operationId":"get_api_calc_akin","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, baseline_creatinine_mg_dl, current_creatinine_mg_dl, urine_output, rrt, creat_stage, uo_stage, stage, components, citation, disclaimer."},"400":{"description":"invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_akin: each AKIN 2007 staging input must be a published value for that field. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/akin"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"AKIN (bulk)","operationId":"post_api_calc_akin","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_akin: each AKIN 2007 staging input must be a published value for that field. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/akin"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"baseline_creatinine_mg_dl":"1.0","current_creatinine_mg_dl":"1.0","rrt":"false","urine_output":"none"},{"baseline_creatinine_mg_dl":"1.0","current_creatinine_mg_dl":"1.0","rrt":"false","urine_output":"none"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rbc-abo":{"get":{"description":"Apply AABB Standards for Blood Banks and Transfusion Services Standard 5.14 ABO/Rh compatibility of RBC units from caller-assigned recipient and unit ABO and RhD, and return compatible, abo_compatible, and rhd_compatible.\n\nWhen an agent already has caller-assigned recipient and unit ABO group and RhD and needs AABB Standard 5.14 RBC compatibility, and must not invent an emergency RhD-positive-to-negative exception, a plasma or platelet rule, or an antibody-screen formula.\n\nNot a medical device. Not a transfusion order.\n\nmagent does not type blood. recipient_abo, recipient_rhd, unit_abo, and unit_rhd are caller-assigned.\n\nAABB Standard 5.14 RBC ABO/Rh compatibility only. Does not encode emergency RhD-positive-to-negative exceptions, plasma or platelet compatibility, or antibody-screen units-to-crossmatch formulas. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"recipient_abo","description":"Caller-assigned recipient ABO group: o, a, b, or ab (case-insensitive). Required. magent does not type blood.","required":true,"schema":{"type":"string","enum":["o","a","b","ab"]},"example":"o"},{"in":"query","name":"recipient_rhd","description":"Caller-assigned recipient RhD: positive or negative (case-insensitive). Required. magent does not type blood.","required":true,"schema":{"type":"string","enum":["positive","negative"]},"example":"negative"},{"in":"query","name":"unit_abo","description":"Caller-assigned RBC unit ABO group: o, a, b, or ab (case-insensitive). Required. magent does not type blood.","required":true,"schema":{"type":"string","enum":["o","a","b","ab"]},"example":"o"},{"in":"query","name":"unit_rhd","description":"Caller-assigned RBC unit RhD: positive or negative (case-insensitive). Required. magent does not type blood.","required":true,"schema":{"type":"string","enum":["positive","negative"]},"example":"negative"}],"summary":"RBC ABO/Rh compatibility (AABB)","operationId":"get_api_calc_rbc_abo","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, recipient_abo, recipient_rhd, unit_abo, unit_rhd, abo_compatible, rhd_compatible, compatible, criteria, citation, disclaimer."},"400":{"description":"invalid_rbc_abo: RBC ABO/Rh compatibility inputs must match caller-assigned recipient and unit ABO group and RhD. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rbc-abo"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"RBC ABO/Rh compatibility (AABB) (bulk)","operationId":"post_api_calc_rbc_abo","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rbc_abo: RBC ABO/Rh compatibility inputs must match caller-assigned recipient and unit ABO group and RhD. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rbc-abo"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"recipient_abo":"o","recipient_rhd":"negative","unit_abo":"o","unit_rhd":"negative"},{"recipient_abo":"o","recipient_rhd":"negative","unit_abo":"o","unit_rhd":"negative"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/capra":{"get":{"description":"Apply Cooperberg 2005 Table 1 CAPRA points from caller-assigned preoperative PSA, Gleason primary/secondary, clinical T (t1/t2/t3a), percent positive biopsies, and age, and return the 0-10 score, Table 4 Kaplan-Meier band, and Table 4 5-year recurrence-free survival point estimate. Not a diagnosis.\n\nWhen an agent already has caller-assigned preoperative PSA, Gleason patterns, clinical T (t1, t2, or t3a), percent positive biopsies, and age, and needs the published UCSF CAPRA score. magent does not assay PSA or read biopsies. Not the Kattan nomogram, not D'Amico groups, and not CAPRA-S.\n\nNot a medical device and not a diagnosis of prostate cancer. magent does not assay PSA or read biopsies.\n\nCooperberg 2005 Table 1 preoperative CAPRA only (score 0-10). Not the Kattan nomogram. Not D'Amico risk groups. Not CAPRA-S (postoperative).\n\nPSA <2.1 ng/mL is invalid (the derivation excluded PSA <2). Upper bound 500. magent does not assay PSA.\n\nGleason primary and secondary are caller-assigned integers 1-5. magent does not read biopsies or assign Gleason grade.\n\nt_stage is caller-assigned clinical T: t1 or t2 (0 points) or t3a (1 point). Other stages are out of scope. magent does not assign TNM.\n\nBands are Cooperberg 2005 Table 4 Kaplan-Meier groups only (0_1, 2, 3, 4, 5, 6, ge_7). rfs_5y_percent is that table's point estimate, not a computed survival curve. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120, Params.age). Cooperberg 2005 Table 1: <50 scores 0; >=50 scores 1.","required":true,"schema":{"type":"integer"},"example":"62"},{"in":"query","name":"psa_ng_ml","description":"Preoperative PSA in ng/mL as assigned by the caller (2.1-500). Cooperberg 2005 Table 1: >=2.1 and <=6.0 scores 0; >6.0 and <=10.0 scores 1; >10.0 and <=20.0 scores 2; >20.0 and <=30.0 scores 3; >30 scores 4. PSA <2.1 is invalid (paper excluded PSA <2). magent does not assay PSA.","required":true,"schema":{"type":"number"},"example":"5.0"},{"in":"query","name":"gleason_primary","description":"Primary Gleason pattern 1-5 as assigned by the caller (Cooperberg 2005 Table 1). Integer 1-5 only. Combined with gleason_secondary: 1-3/1-3 scores 0; 1-3/4-5 scores 1; primary 4-5 scores 3. magent does not read biopsies.","required":true,"schema":{"type":"integer"},"example":"3"},{"in":"query","name":"gleason_secondary","description":"Secondary Gleason pattern 1-5 as assigned by the caller (Cooperberg 2005 Table 1). Integer 1-5 only. Combined with gleason_primary as above. magent does not read biopsies.","required":true,"schema":{"type":"integer"},"example":"3"},{"in":"query","name":"t_stage","description":"Clinical T as assigned by the caller (Cooperberg 2005 Table 1). t1 or t2 scores 0; t3a scores 1. Other stages are invalid. Not CAPRA-S pathologic T. magent does not assign TNM.","required":true,"schema":{"type":"string","enum":["t1","t2","t3a"]},"example":"t1"},{"in":"query","name":"percent_positive_biopsies","description":"Percent of biopsy cores positive (0-100) as assigned by the caller (Cooperberg 2005 Table 1). <34 scores 0; >=34 scores 1. magent does not read biopsies.","required":true,"schema":{"type":"number"},"example":"20"}],"summary":"CAPRA","operationId":"get_api_calc_capra","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, band, rfs_5y_percent, age_years, psa_ng_ml, gleason_primary, gleason_secondary, t_stage, percent_positive_biopsies, components, citation, disclaimer."},"400":{"description":"invalid_capra: psa_ng_ml must be ≥2.1; gleason_primary and gleason_secondary integers 1–5; t_stage t1, t2, or t3a; percent_positive_biopsies 0–100 (Cooperberg 2005 CAPRA Table 1). Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/capra"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CAPRA (bulk)","operationId":"post_api_calc_capra","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_capra: psa_ng_ml must be ≥2.1; gleason_primary and gleason_secondary integers 1–5; t_stage t1, t2, or t3a; percent_positive_biopsies 0–100 (Cooperberg 2005 CAPRA Table 1). Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/capra"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"62","gleason_primary":"3","gleason_secondary":"3","percent_positive_biopsies":"20","psa_ng_ml":"5.0","t_stage":"t1"},{"age":"62","gleason_primary":"3","gleason_secondary":"3","percent_positive_biopsies":"20","psa_ng_ml":"5.0","t_stage":"t1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/impact":{"get":{"description":"Compute the Steyerberg 2008 IMPACT points and 6-month mortality and unfavorable-outcome probabilities from the printed Figure 1 score chart and logistic LPs. model is required (core, extended, or lab).\n\nWhen an agent already has admission age, GCS motor, and pupils (and CT / hypoxia / hypotension / labs when using those models) and needs the published IMPACT probabilities. Not MRC CRASH, not a GCS conversion, and not a diagnosis.\n\nNot a medical device. Not a diagnosis, triage, ICU, or withdrawal-of-care decision.\n\nNot MRC CRASH (Perel 2008). magent crash is Extermann 2012 chemotherapy CRASH.\n\nAge, motor, pupils, hypoxia, hypotension, Marshall CT, tSAH, EDH, glucose, and hemoglobin are caller-assigned. magent does not examine the patient, read the scan, or assay labs.\n\nMotor 9 is the published untestable/missing token. magent does not infer motor from a narrative. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"model","description":"Steyerberg 2008 IMPACT model. core uses age, motor, and pupils. extended adds hypoxia, hypotension, Marshall CT, tSAH, and EDH. lab adds glucose mmol/L and hemoglobin g/dL. Required; magent does not pick a model.","required":true,"schema":{"type":"string","enum":["core","extended","lab"]},"example":"core"},{"in":"query","name":"age","description":"Age in years (integer 14-90). Steyerberg 2008 Figure 1: ≤30 → 0; 31–39 → 1; 40–49 → 2; 50–59 → 3; 60–69 → 4; ≥70 → 5. Chart label 30–39 is the decade after ≤30 (age 30 scores 0).","required":true,"schema":{"type":"integer"},"example":35},{"in":"query","name":"motor_score","description":"GCS motor integer 1-6 or 9 (untestable/missing) as in Steyerberg 2008. 1 or 2 (none/extension) → 6; 3 (abnormal flexion) → 4; 4 (normal flexion) → 2; 5 or 6 (localizes/obeys) → 0; 9 → 3.","required":true,"schema":{"type":"integer"},"example":3},{"in":"query","name":"pupillary_reactivity","description":"Pupillary reactivity (Steyerberg 2008). both → 0; one → 2; none → 4. Caller-assigned. magent does not examine pupils.","required":true,"schema":{"type":"string","enum":["both","one","none"]},"example":"both"},{"in":"query","name":"hypoxia","description":"Hypoxia yes or suspected (Steyerberg 2008). Required when model is extended or lab. true adds 1; false adds 0. Ignored on model=core.","required":false,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"hypotension","description":"Hypotension yes or suspected (Steyerberg 2008). Required when model is extended or lab. true adds 2; false adds 0. Ignored on model=core.","required":false,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"marshall_ct","description":"Marshall CT class I–VI (Steyerberg 2008). Required when model is extended or lab. I → −2; II → 0; III, IV, V, or VI → 2. Ignored on model=core. magent does not read the scan.","required":false,"schema":{"type":"string","enum":["I","II","III","IV","V","VI"]},"example":"II"},{"in":"query","name":"tsah","description":"Traumatic subarachnoid hemorrhage (Steyerberg 2008). Required when model is extended or lab. true adds 2; false adds 0. Ignored on model=core.","required":false,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"edh","description":"Epidural hematoma (Steyerberg 2008). Required when model is extended or lab. true adds −2; false adds 0. Ignored on model=core.","required":false,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"glucose_mmol_l","description":"Admission glucose in mmol/L (2.8-55.5). Required when model is lab. Steyerberg 2008: <6 → 0; 6–8.9 → 1; 9–11.9 → 2; 12–14.9 → 3; ≥15 → 4. Ignored on core and extended. magent does not assay glucose.","required":false,"schema":{"type":"number"},"example":10},{"in":"query","name":"hemoglobin_g_dl","description":"Admission hemoglobin in g/dL (3-22). Required when model is lab. Steyerberg 2008: <9 → 3; 9–11.9 → 2; 12–14.9 → 1; ≥15 → 0. Ignored on core and extended. magent does not assay hemoglobin.","required":false,"schema":{"type":"number"},"example":11}],"summary":"IMPACT","operationId":"get_api_calc_impact","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, model, age, motor_score, pupillary_reactivity, score, sum_core, subscore_ct, subscore_lab, hypoxia, hypotension, marshall_ct, tsah, edh, glucose_mmol_l, hemoglobin_g_dl, max_score, components, linear_predictor_mortality, linear_predictor_unfavorable, mortality_6_month_percent, unfavorable_6_month_percent, citation, disclaimer."},"400":{"description":"invalid_impact: IMPACT model inputs must match Steyerberg 2008 (age, motor score, pupils; extended and lab add hypoxia, hypotension, CT, glucose, Hb). Returned before settlement; you are not charged.; invalid_impact_model: model must be core, extended, or lab as in Steyerberg 2008. Returned before settlement; you are not charged.; invalid_impact_age: age must be an integer from 14 to 90. Returned before settlement; you are not charged.; invalid_motor_score: motor_score must be 1-6 or 9 (untestable) as in Steyerberg 2008 IMPACT. Returned before settlement; you are not charged.; invalid_pupillary: pupillary_reactivity must be both, one, or none as in Steyerberg 2008. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_marshall_ct: marshall_ct must be I, II, III, IV, V, or VI as in Steyerberg 2008. Returned before settlement; you are not charged.; invalid_impact_glucose: glucose_mmol_l must be a number from 2.8 to 55.5. Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/impact"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"IMPACT (bulk)","operationId":"post_api_calc_impact","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_impact: IMPACT model inputs must match Steyerberg 2008 (age, motor score, pupils; extended and lab add hypoxia, hypotension, CT, glucose, Hb). Returned before settlement; you are not charged.; invalid_impact_model: model must be core, extended, or lab as in Steyerberg 2008. Returned before settlement; you are not charged.; invalid_impact_age: age must be an integer from 14 to 90. Returned before settlement; you are not charged.; invalid_motor_score: motor_score must be 1-6 or 9 (untestable) as in Steyerberg 2008 IMPACT. Returned before settlement; you are not charged.; invalid_pupillary: pupillary_reactivity must be both, one, or none as in Steyerberg 2008. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_marshall_ct: marshall_ct must be I, II, III, IV, V, or VI as in Steyerberg 2008. Returned before settlement; you are not charged.; invalid_impact_glucose: glucose_mmol_l must be a number from 2.8 to 55.5. Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/impact"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"35","model":"core","motor_score":"3","pupillary_reactivity":"both"},{"age":"35","model":"core","motor_score":"3","pupillary_reactivity":"both"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/garfield-af":{"get":{"description":"Compute the Fox 2017 GARFIELD-AF 1-year all-cause mortality, ischaemic stroke/systemic embolism, and major bleed percents from age, sex, weight, pulse, diastolic blood pressure, comorbidities, smoking, caller-assigned ethnicity, oral anticoagulant class, carotid occlusive disease, and antiplatelet therapy.\n\nWhen an agent already has those Fox 2017 / GARFIELD-AF registry inputs and needs the published 1-year equations, not CHA2DS2-VASc or HAS-BLED scores, and not an anticoagulation order.\n\nNot a medical device and not a diagnosis. Not an anticoagulation, antiplatelet, or treatment-allocation order.\n\nEthnicity is caller-assigned using the Fox 2017 / GARFIELD-AF terms (White/Caucasian reference; Hispanic/Latino; Asian; Black/Mixed/Other). magent does not assign race or ethnicity.\n\n1-year GARFIELD-AF registry equations only (same linear predictors as the published 2- and 3-year equations; magent emits the 1-year baseline survival). Not CHA2DS2-VASc and not HAS-BLED.\n\nOral anticoagulant class is caller-assigned none, NOAC, or VKA (mutually exclusive). magent does not choose an anticoagulant.\n\nDerivation used the GARFIELD-AF registry. magent does not apply later recalibrations and does not examine the patient. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120). Fox 2017 / GARFIELD-AF: mortality uses 0.031050027*(age-65) when age<=65 and 0.064594824*(age-65) when age>65. Stroke and bleed use 0.039138147*(age-65) and 0.043476276*(age-65) with no knot.","required":true,"schema":{"type":"integer"},"example":65},{"in":"query","name":"sex","description":"Sex as recorded (female or male). Fox 2017 female sex adds 0.306202287 to the mortality linear predictor. Stroke and bleed equations have no sex term.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"weight_kg","description":"Weight in kg (20-300). Mortality: -0.021535182*(weight_kg-75) when weight_kg<=75; 0 when weight_kg>75. magent does not convert lb.","required":true,"schema":{"type":"number"},"example":75},{"in":"query","name":"pulse","description":"Pulse in beats per minute (30-250). Mortality: 0.007678035*(pulse-120) when pulse<=120; 0 when pulse>120. Bleed uses 0.004167103*(pulse-120) with no truncation.","required":true,"schema":{"type":"number"},"example":70},{"in":"query","name":"diastolic_bp_mm_hg","description":"Diastolic blood pressure in mm Hg (30-150). Mortality: -0.019304333*(dbp-80) when dbp<=80; 0 when dbp>80. Stroke: 0.01590016*(dbp-80) when dbp>80; 0 when dbp<=80.","required":true,"schema":{"type":"number"},"example":80},{"in":"query","name":"heart_failure","description":"Caller-assigned heart failure (true or false). Mortality +0.693789082; stroke +0.233182644. magent does not diagnose heart failure.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"vascular_disease","description":"Caller-assigned vascular disease (true or false). Mortality +0.306120964; stroke +0.197919709; bleed +0.168950627.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"prior_stroke","description":"Caller-assigned prior stroke (true or false). Mortality +0.26585298; stroke +0.800863063.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"history_of_bleeding","description":"Caller-assigned history of bleeding (true or false). Mortality +0.385407386; stroke +0.29883967; bleed +0.782237771.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"diabetes","description":"Caller-assigned diabetes (true or false). Mortality +0.280133213; stroke +0.211995445; bleed +0.176898047.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"moderate_to_severe_ckd","description":"Caller-assigned moderate-to-severe chronic kidney disease (true or false). Mortality +0.377903886; stroke +0.349516938; bleed +0.498686574. magent does not compute eGFR.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"dementia","description":"Caller-assigned dementia (true or false). Mortality +0.489453313; stroke +0.513221391.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"current_smoking","description":"Caller-assigned current smoking (true or false). Mortality +0.345481149; stroke +0.478831506.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"oac","description":"Caller-assigned oral anticoagulant class: none, noac, or vka (mutually exclusive). NOAC and VKA enter as separate Fox 2017 terms. magent does not choose an anticoagulant.","required":true,"schema":{"type":"string","enum":["none","noac","vka"]},"example":"none"},{"in":"query","name":"ethnicity","description":"Caller-assigned ethnicity using Fox 2017 / GARFIELD-AF terms. white (White/Caucasian) is the mortality reference (0); hispanic_latino +0.157023564; asian -0.609609055; black_mixed_other +0.375675102. Stroke and bleed have no ethnicity term. magent does not assign race or ethnicity.","required":true,"schema":{"type":"string","enum":["white","hispanic_latino","asian","black_mixed_other"]},"example":"white"},{"in":"query","name":"carotid_occlusive_disease","description":"Caller-assigned carotid occlusive disease (true or false). Bleed +0.316245771. Mortality and stroke have no carotid term.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"antiplatelet","description":"Caller-assigned antiplatelet therapy (true or false). Bleed +0.236620846. Mortality and stroke have no antiplatelet term. magent does not order antiplatelet therapy.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"GARFIELD-AF","operationId":"get_api_calc_garfield_af","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age, sex, weight_kg, pulse, diastolic_bp_mm_hg, heart_failure, vascular_disease, prior_stroke, history_of_bleeding, diabetes, moderate_to_severe_ckd, dementia, current_smoking, oac, ethnicity, carotid_occlusive_disease, antiplatelet, mortality_lp, mortality_1y_percent, stroke_lp, stroke_1y_percent, bleed_lp, bleed_1y_percent, citation, disclaimer."},"400":{"description":"invalid_garfield_af: GARFIELD-AF inputs must match Fox 2017 age, sex, weight, pulse, diastolic blood pressure, comorbidities, caller-assigned ethnicity, smoking, and oral anticoagulant class. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/garfield-af"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"GARFIELD-AF (bulk)","operationId":"post_api_calc_garfield_af","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_garfield_af: GARFIELD-AF inputs must match Fox 2017 age, sex, weight, pulse, diastolic blood pressure, comorbidities, caller-assigned ethnicity, smoking, and oral anticoagulant class. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/garfield-af"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"65","antiplatelet":"false","carotid_occlusive_disease":"false","current_smoking":"false","dementia":"false","diabetes":"false","diastolic_bp_mm_hg":"80","ethnicity":"white","heart_failure":"false","history_of_bleeding":"false","moderate_to_severe_ckd":"false","oac":"none","prior_stroke":"false","pulse":"70","sex":"male","vascular_disease":"false","weight_kg":"75"},{"age":"65","antiplatelet":"false","carotid_occlusive_disease":"false","current_smoking":"false","dementia":"false","diabetes":"false","diastolic_bp_mm_hg":"80","ethnicity":"white","heart_failure":"false","history_of_bleeding":"false","moderate_to_severe_ckd":"false","oac":"none","prior_stroke":"false","pulse":"70","sex":"male","vascular_disease":"false","weight_kg":"75"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/gelf":{"get":{"description":"Apply the Brice 1997 GELF high-tumor-burden checklist and return low_burden or high_burden from eight caller-assigned items.\n\nWhen an agent already has follicular lymphoma findings as assigned by the caller and needs the published Brice 1997 GELF high-versus-low tumor-burden checklist.\n\nNot a medical device and not a follicular-lymphoma diagnosis or a treatment-initiation or watchful-waiting order. magent does not examine the patient.\n\nThis tool is the Brice 1997 original GELF high-tumor-burden checklist only. It is not FLIPI and not IPI. It is not modified GELF (LDH or β2-microglobulin).\n\nThe caller assigns all eight items. magent does not measure nodes, spleen, counts, or effusions.\n\nHigh tumor burden is the published any-criterion rule only: any yes is high_burden; all absent is low_burden. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"mass_gt_7cm","description":"Any nodal or extranodal tumor mass >7 cm as assigned by the caller. true or false. magent does not measure nodes or extranodal masses.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"three_nodes_gt_3cm","description":"At least 3 nodal sites, each with diameter >3 cm, as assigned by the caller. true or false. magent does not count or measure nodes.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"b_symptoms","description":"Systemic / B symptoms as assigned by the caller. true or false. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"spleen_below_umbilicus","description":"Substantial splenic enlargement (inferior margin below the umbilicus) as assigned by the caller. true or false. magent does not measure the spleen.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"compression","description":"Compression syndrome (ureter, GI tract, great vessels, or other vital organ as assigned by the caller). true or false. magent does not diagnose compression.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"effusion","description":"Pleural or peritoneal serous effusion as assigned by the caller. true or false. magent does not image or tap an effusion.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"leukemic_phase","description":"Leukemic phase as assigned by the caller (paper: circulating malignant cells >5.0×10^9/L). true or false. magent does not count cells.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cytopenia","description":"Cytopenia as assigned by the caller (paper: granulocytes <1.0×10^9/L and/or platelets <100×10^9/L). true or false. magent does not count cells.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"GELF criteria","operationId":"get_api_calc_gelf","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, tumor_burden, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gelf"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"GELF criteria (bulk)","operationId":"post_api_calc_gelf","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gelf"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"b_symptoms":"false","compression":"false","cytopenia":"false","effusion":"false","leukemic_phase":"false","mass_gt_7cm":"false","spleen_below_umbilicus":"false","three_nodes_gt_3cm":"false"},{"b_symptoms":"false","compression":"false","cytopenia":"false","effusion":"false","leukemic_phase":"false","mass_gt_7cm":"false","spleen_below_umbilicus":"false","three_nodes_gt_3cm":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/wisconsin-criteria":{"get":{"description":"Apply the Sitzman 2011 Wisconsin Criteria and return whether any of five caller-assigned maxillofacial trauma findings is present (meets_criteria) and how many (criteria_present 0–5).\n\nWhen an agent has caller-assigned findings after facial trauma and needs the published any-one-of-five Wisconsin Criteria, not NEXUS, PECARN head, or Canadian CT Head.\n\nNot a medical device. Not a diagnosis. magent does not examine the face or assign GCS.\n\nThis tool is the Sitzman 2011 any-one-of-five Wisconsin Criteria only. It is not NEXUS, not PECARN head, and not the Canadian CT Head Rule.\n\nEach flag is caller-assigned, including GCS < 14 as a boolean. magent does not take a GCS integer.\n\nMeeting criteria is the published any-one rule. This tool does not classify risk bands or print an imaging order. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"bony_stepoff_or_instability","description":"Bony step-off or instability of the facial skeleton as assigned by the caller. true or false. magent does not examine the face.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"periorbital_swelling_or_contusion","description":"Periorbital swelling or contusion as assigned by the caller. true or false. magent does not examine the face.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"gcs_lt_14","description":"Glasgow Coma Scale less than 14 as assigned by the caller. true or false. magent does not take a GCS integer or assign GCS.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"malocclusion","description":"Malocclusion as assigned by the caller. true or false. magent does not examine occlusion.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"tooth_absence","description":"Tooth absence as assigned by the caller. true or false. magent does not examine the dentition.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Wisconsin Criteria","operationId":"get_api_calc_wisconsin_criteria","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, meets_criteria, criteria_present, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/wisconsin-criteria"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Wisconsin Criteria (bulk)","operationId":"post_api_calc_wisconsin_criteria","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/wisconsin-criteria"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bony_stepoff_or_instability":"false","gcs_lt_14":"false","malocclusion":"false","periorbital_swelling_or_contusion":"false","tooth_absence":"false"},{"bony_stepoff_or_instability":"false","gcs_lt_14":"false","malocclusion":"false","periorbital_swelling_or_contusion":"false","tooth_absence":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/easi":{"get":{"description":"Compute Hanifin 2001 EASI from four body regions. For each region the caller assigns area 0-6 and four intensity signs (erythema, edema/papulation, excoriation, lichenification) each 0-3. Region score = (sum of 4 signs) × area × adult weight. Total EASI is the sum (max 72).\n\nWhen an agent already has caller-assigned Hanifin 2001 EASI region area and sign integers and needs the published adult-weight total. magent does not examine the skin, diagnose atopic dermatitis, apply pediatric region weights, or assign Investigator Global Assessment or later mild-moderate-severe EASI cutoffs.\n\nNot a medical device and not a diagnosis of atopic dermatitis or a treatment order. magent does not examine the skin. Each area (0-6) and sign (0-3) is a caller-assigned integer.\n\nmagent uses the published adult area weights (head/neck 0.1, upper extremities 0.2, trunk 0.3, lower extremities 0.4). It does not apply later pediatric (<8 years) head/neck 0.2 and lower-extremity 0.3 multipliers.\n\nHanifin 2001 published no Investigator Global Assessment or mild-moderate-severe EASI cutoffs. magent returns the numeric EASI only.\n\nEach sign is a caller-assigned integer 0-3. magent does not accept half-point grades. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"head_neck_area","description":"Caller-assigned Hanifin 2001 EASI area of involvement for this body region (integer 0-6): 0 none, 1 <10%, 2 10-29%, 3 30-49%, 4 50-69%, 5 70-89%, 6 90-100%. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4,5,6]},"example":"0"},{"in":"query","name":"head_neck_erythema","description":"Caller-assigned Hanifin 2001 EASI erythema for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"head_neck_edema_papulation","description":"Caller-assigned Hanifin 2001 EASI edema/papulation for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"head_neck_excoriation","description":"Caller-assigned Hanifin 2001 EASI excoriation for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"head_neck_lichenification","description":"Caller-assigned Hanifin 2001 EASI lichenification for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"upper_extremities_area","description":"Caller-assigned Hanifin 2001 EASI area of involvement for this body region (integer 0-6): 0 none, 1 <10%, 2 10-29%, 3 30-49%, 4 50-69%, 5 70-89%, 6 90-100%. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4,5,6]},"example":"0"},{"in":"query","name":"upper_extremities_erythema","description":"Caller-assigned Hanifin 2001 EASI erythema for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"upper_extremities_edema_papulation","description":"Caller-assigned Hanifin 2001 EASI edema/papulation for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"upper_extremities_excoriation","description":"Caller-assigned Hanifin 2001 EASI excoriation for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"upper_extremities_lichenification","description":"Caller-assigned Hanifin 2001 EASI lichenification for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"trunk_area","description":"Caller-assigned Hanifin 2001 EASI area of involvement for this body region (integer 0-6): 0 none, 1 <10%, 2 10-29%, 3 30-49%, 4 50-69%, 5 70-89%, 6 90-100%. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4,5,6]},"example":"0"},{"in":"query","name":"trunk_erythema","description":"Caller-assigned Hanifin 2001 EASI erythema for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"trunk_edema_papulation","description":"Caller-assigned Hanifin 2001 EASI edema/papulation for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"trunk_excoriation","description":"Caller-assigned Hanifin 2001 EASI excoriation for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"trunk_lichenification","description":"Caller-assigned Hanifin 2001 EASI lichenification for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"lower_extremities_area","description":"Caller-assigned Hanifin 2001 EASI area of involvement for this body region (integer 0-6): 0 none, 1 <10%, 2 10-29%, 3 30-49%, 4 50-69%, 5 70-89%, 6 90-100%. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4,5,6]},"example":"0"},{"in":"query","name":"lower_extremities_erythema","description":"Caller-assigned Hanifin 2001 EASI erythema for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"lower_extremities_edema_papulation","description":"Caller-assigned Hanifin 2001 EASI edema/papulation for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"lower_extremities_excoriation","description":"Caller-assigned Hanifin 2001 EASI excoriation for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"lower_extremities_lichenification","description":"Caller-assigned Hanifin 2001 EASI lichenification for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"}],"summary":"EASI","operationId":"get_api_calc_easi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, head_neck_score, upper_extremities_score, trunk_score, lower_extremities_score, components, citation, disclaimer."},"400":{"description":"invalid_easi: EASI needs Hanifin 2001 region area (0-6) and erythema, edema/papulation, excoriation, and lichenification (0-3) for each region. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/easi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"EASI (bulk)","operationId":"post_api_calc_easi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_easi: EASI needs Hanifin 2001 region area (0-6) and erythema, edema/papulation, excoriation, and lichenification (0-3) for each region. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/easi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"head_neck_area":"0","head_neck_edema_papulation":"0","head_neck_erythema":"0","head_neck_excoriation":"0","head_neck_lichenification":"0","lower_extremities_area":"0","lower_extremities_edema_papulation":"0","lower_extremities_erythema":"0","lower_extremities_excoriation":"0","lower_extremities_lichenification":"0","trunk_area":"0","trunk_edema_papulation":"0","trunk_erythema":"0","trunk_excoriation":"0","trunk_lichenification":"0","upper_extremities_area":"0","upper_extremities_edema_papulation":"0","upper_extremities_erythema":"0","upper_extremities_excoriation":"0","upper_extremities_lichenification":"0"},{"head_neck_area":"0","head_neck_edema_papulation":"0","head_neck_erythema":"0","head_neck_excoriation":"0","head_neck_lichenification":"0","lower_extremities_area":"0","lower_extremities_edema_papulation":"0","lower_extremities_erythema":"0","lower_extremities_excoriation":"0","lower_extremities_lichenification":"0","trunk_area":"0","trunk_edema_papulation":"0","trunk_erythema":"0","trunk_excoriation":"0","trunk_lichenification":"0","upper_extremities_area":"0","upper_extremities_edema_papulation":"0","upper_extremities_erythema":"0","upper_extremities_excoriation":"0","upper_extremities_lichenification":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pss-3":{"get":{"description":"Apply Boudreaux 2015 PSS-3 from four caller-assigned flags and return screen_positive using the same-group ED-SAFE definition used with PSS-3 (Boudreaux 2016 Am J Prev Med): ideation past 2 weeks or attempt within 6 months. Depression is a segue and is not factored into screening results. magent does not interview the patient. Not a diagnosis. Not C-SSRS.\n\nWhen an agent has already assigned Boudreaux 2015 PSS-3 flags (2-week depressed mood, 2-week suicidal ideation, lifetime attempt, and whether the most recent attempt was within 6 months) and needs the published screen_positive result, not a suicide-risk diagnosis, a C-SSRS interview, or a clinical interview.\n\nNot a medical device and not a diagnosis or treatment order.\n\nmagent does not interview the patient. The caller assigns four bools.\n\ndepressed_mood is the Boudreaux 2015 2-week down/depressed/hopeless segue and is not factored into screening results.\n\nscreen_positive uses the same-group ED-SAFE definition used with PSS-3 (Boudreaux 2016 Am J Prev Med): ideation past 2 weeks or attempt within 6 months. ToolRecord citation is Boudreaux 2015 (PSS-3 validation).\n\nIf lifetime_attempt is false, attempt_within_6_months must be false. This is not C-SSRS. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"depressed_mood","description":"Over the past 2 weeks, felt down, depressed, or hopeless (Boudreaux 2015 PSS-3 segue item). true or false as assigned by the caller. Not factored into screen_positive. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ideation_2_weeks","description":"Active suicidal ideation in the past 2 weeks (Boudreaux 2015: over the past 2 weeks, thoughts of killing yourself). true or false as assigned by the caller. screen_positive is true if this is true. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"lifetime_attempt","description":"Lifetime suicide attempt (Boudreaux 2015: ever attempted to kill yourself). true or false as assigned by the caller. If false, attempt_within_6_months must be false. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"attempt_within_6_months","description":"Most recent suicide attempt was within 6 months (Boudreaux 2015 timing follow-up). true or false as assigned by the caller. Always required. If lifetime_attempt is false this must be false. screen_positive is true when lifetime_attempt and this are both true. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"PSS-3","operationId":"get_api_calc_pss_3","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, depressed_mood, ideation_2_weeks, lifetime_attempt, attempt_within_6_months, screen_positive, components, citation, disclaimer."},"400":{"description":"invalid_pss3: PSS-3 needs Boudreaux 2015 depressed_mood, ideation_2_weeks, lifetime_attempt, and attempt_within_6_months as true or false. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pss-3"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PSS-3 (bulk)","operationId":"post_api_calc_pss_3","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pss3: PSS-3 needs Boudreaux 2015 depressed_mood, ideation_2_weeks, lifetime_attempt, and attempt_within_6_months as true or false. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pss-3"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"attempt_within_6_months":"false","depressed_mood":"false","ideation_2_weeks":"false","lifetime_attempt":"false"},{"attempt_within_6_months":"false","depressed_mood":"false","ideation_2_weeks":"false","lifetime_attempt":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/hospital":{"get":{"description":"Sum the Donze 2013 HOSPITAL integer score (acronym table, max 13) from caller-assigned flags and prior-year admissions and return the derivation-study band (low / intermediate / high).\n\nWhen an agent needs the published HOSPITAL point total and must not invent a discharge order, a diagnosis, or a measured 30-day readmission percent.\n\nNot a medical device and not a discharge, admission, or follow-up order. magent does not examine the patient or read the chart.\n\nNot a diagnosis. The published outcome is potentially avoidable 30-day readmission (SQLape), not all-cause readmission.\n\nHemoglobin <12 g/dL and sodium <135 mmol/L are caller-assigned flags. magent does not assay labs or accept hemoglobin or sodium numbers.\n\nRisk bands 0–4 low, 5–6 intermediate, ≥7 high follow the Donze 2013 derivation study. magent returns the band only, not a measured readmission percent for this discharge. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"hemoglobin_lt_12","description":"Last hemoglobin <12 g/dL as assigned by the caller (Donze 2013 H). true scores 1. magent does not assay hemoglobin. Do not send a hemoglobin number.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"oncology_service","description":"Discharge from an oncology service as assigned by the caller (Donze 2013 O). true scores 2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"sodium_lt_135","description":"Last sodium <135 mmol/L as assigned by the caller (Donze 2013 S). true scores 1. magent does not assay sodium. Do not send a sodium number.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"procedure","description":"Any ICD-coded procedure during the stay as assigned by the caller (Donze 2013 P). true scores 1. magent does not read the chart.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"urgent_or_emergent_admission","description":"Index admission type urgent or emergent, not elective, as assigned by the caller (Donze 2013 I). true scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"admissions_12mo","description":"Hospital admissions during the previous year (integer 0-50, magent clamp). Donze 2013 A: 0-1 scores 0; 2-5 scores 2; >5 scores 5. Count 0 and 1 both score 0; 2 scores 2; 5 scores 2; 6 scores 5.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"los_ge_5_days","description":"Length of stay ≥5 days as assigned by the caller (Donze 2013 L). true scores 2. magent does not compute length of stay from dates.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"HOSPITAL","operationId":"get_api_calc_hospital","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk_band, admissions_12mo, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_admissions_12mo: admissions_12mo must be an integer from 0 to 50 (Donze 2013 prior-year count; magent clamp). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hospital"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HOSPITAL (bulk)","operationId":"post_api_calc_hospital","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_admissions_12mo: admissions_12mo must be an integer from 0 to 50 (Donze 2013 prior-year count; magent clamp). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hospital"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"admissions_12mo":"0","hemoglobin_lt_12":"false","los_ge_5_days":"false","oncology_service":"false","procedure":"false","sodium_lt_135":"false","urgent_or_emergent_admission":"false"},{"admissions_12mo":"0","hemoglobin_lt_12":"false","los_ge_5_days":"false","oncology_service":"false","procedure":"false","sodium_lt_135":"false","urgent_or_emergent_admission":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/disease-steps":{"get":{"description":"Return the caller-assigned Hohol 1995 Disease Steps integer 0-6 with the published description. magent does not examine gait.\n\nWhen an agent already has a Hohol 1995 Disease Step 0-6 as assigned by the caller and needs the published description. magent does not examine gait, assign a step from findings, map to EDSS, or use later Disease Steps Plus.\n\nNot a medical device. magent does not examine gait.\n\nNot an MS diagnosis. The caller assigns Disease Steps 0-6. magent does not examine the patient or walk 25 feet.\n\nHohol 1995 integer steps 0-6 only. 0.5 half-steps are not in that paper. Unclassifiable U is published but not scored. Not later Disease Steps Plus.\n\nNot EDSS. Not a treatment order. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"step","description":"Hohol 1995 Disease Steps 0-6 as assigned by the caller (0 normal; 1 mild disability, mild symptoms or signs; 2 moderate disability, visible abnormality of gait; 3 early cane, intermittent use of cane; 4 late cane, cane-dependent; 5 bilateral support; 6 confined to wheelchair). 0.5 half-steps and unclassifiable U are not scored. magent does not examine gait.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"Disease Steps","operationId":"get_api_calc_disease_steps","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, step, score, max_score, description, components, citation, disclaimer."},"400":{"description":"invalid_disease_steps: step must be an integer 0–6 (Hohol 1995 Disease Steps). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/disease-steps"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Disease Steps (bulk)","operationId":"post_api_calc_disease_steps","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_disease_steps: step must be an integer 0–6 (Hohol 1995 Disease Steps). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/disease-steps"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"step":"0"},{"step":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mess":{"get":{"description":"Compute the Johansen 1990 Mangled Extremity Severity Score from caller-assigned skeletal/soft-tissue, limb ischemia, shock, and age integers, doubling ischemia when time exceeds 6 hours, and return the published 0-6 / ≥7 band.\n\nWhen an agent has already assigned Johansen 1990 MESS category integers and needs the published total and ≥7 band, not an amputation or limb-salvage decision.\n\nNot a medical device and not an amputation, revascularization, or limb-salvage decision or protocol.\n\nCategory integers are caller-assigned. magent does not examine the limb, pulses, perfusion, or blood pressure.\n\nThis is Johansen 1990 MESS only. MESS ≥7 predicted amputation with 100% accuracy in that series. It does not use later papers' cutoff of 8. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"skeletal_soft_tissue","description":"Caller-assigned Johansen 1990 skeletal/soft-tissue energy (integer 1 low, 2 medium, 3 high, or 4 very high). magent does not examine the limb.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"limb_ischemia","description":"Caller-assigned Johansen 1990 limb ischemia (integer 1 pulse reduced but perfusion normal, 2 pulseless with paresthesia, or 3 cool paralyzed insensate). Doubled when ischemia_over_6h is true.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"shock","description":"Caller-assigned Johansen 1990 shock (integer 0 SBP always >90, 1 transient <90, or 2 persistent <90).","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"age","description":"Age in years (integer 0-120). Johansen 1990 points: <30 → 0, 30-50 → 1, >50 → 2. Not the adult 18-120 clamp.","required":true,"schema":{"type":"integer"},"example":"25"},{"in":"query","name":"ischemia_over_6h","description":"true if limb ischemia time is greater than 6 hours (Johansen 1990 doubles the ischemia score). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"MESS","operationId":"get_api_calc_mess","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, mess_band, skeletal_soft_tissue, limb_ischemia, shock, age, age_points, ischemia_over_6h, ischemia_points, components, citation, disclaimer."},"400":{"description":"invalid_mess_item: skeletal_soft_tissue 1-4, limb_ischemia 1-3, and shock 0-2 (Johansen 1990). Returned before settlement; you are not charged.; invalid_mess_age: age must be an integer from 0 to 120 (Johansen 1990 includes children). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mess"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"MESS (bulk)","operationId":"post_api_calc_mess","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_mess_item: skeletal_soft_tissue 1-4, limb_ischemia 1-3, and shock 0-2 (Johansen 1990). Returned before settlement; you are not charged.; invalid_mess_age: age must be an integer from 0 to 120 (Johansen 1990 includes children). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mess"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"25","ischemia_over_6h":"false","limb_ischemia":"1","shock":"0","skeletal_soft_tissue":"1"},{"age":"25","ischemia_over_6h":"false","limb_ischemia":"1","shock":"0","skeletal_soft_tissue":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/binet":{"get":{"description":"Apply Binet 1981 chronic lymphocytic leukemia staging and return stage A, B, or C from caller-assigned anemia (Hb <10 g/dL), thrombocytopenia (platelets <100×10^9/L), and involved lymphoid areas (0-5).\n\nWhen an agent already has CLL with lymphocytosis and caller-assigned anemia, thrombocytopenia, and Binet five-area count, and needs the published Binet 1981 stage. magent does not diagnose CLL and does not examine the patient.\n\nNot a medical device.\n\nNot a CLL diagnosis. The caller already has CLL with lymphocytosis; magent does not diagnose CLL.\n\nmagent does not examine the patient or count lymph-node areas. The caller assigns the five-area count after Binet's uni/bilateral rule (cervical, axillary, inguinal — uni or bilateral counts as one area each — plus spleen, plus liver).\n\nThis tool is Binet 1981 staging only. Not Rai staging (Rai anemia is Hb <11), not modified Rai, and not CLL-IPI. No A/B/C substages and no survival months. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"anemia_hb_lt_10","description":"Hb <10 g/dL as assigned by the caller (Binet 1981 stage C cutoff is 10 g/dL, not Rai 11). true or false. magent does not assay hemoglobin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"thrombocytopenia_plt_lt_100","description":"Platelets <100×10^9/L as assigned by the caller (Binet 1981 stage C). true or false. magent does not count platelets.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"involved_areas","description":"Count of involved Binet lymphoid areas (integer 0-5) as assigned by the caller after Binet 1981: cervical, axillary, and inguinal (unilateral or bilateral counts as one area each), plus spleen, plus liver. magent does not examine the patient or count lymph-node areas.","required":true,"schema":{"type":"integer"},"example":"1"}],"summary":"Binet","operationId":"get_api_calc_binet","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, binet_stage, involved_areas, anemia_hb_lt_10, thrombocytopenia_plt_lt_100, criteria, citation, disclaimer."},"400":{"description":"invalid_binet: anemia_hb_lt_10 and thrombocytopenia_plt_lt_100 must be true or false (Binet 1981). Returned before settlement; you are not charged.; invalid_involved_areas: involved_areas must be an integer from 0 to 5 (Binet 1981 five lymphoid areas). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/binet"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Binet (bulk)","operationId":"post_api_calc_binet","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_binet: anemia_hb_lt_10 and thrombocytopenia_plt_lt_100 must be true or false (Binet 1981). Returned before settlement; you are not charged.; invalid_involved_areas: involved_areas must be an integer from 0 to 5 (Binet 1981 five lymphoid areas). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/binet"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"anemia_hb_lt_10":"false","involved_areas":"1","thrombocytopenia_plt_lt_100":"false"},{"anemia_hb_lt_10":"false","involved_areas":"1","thrombocytopenia_plt_lt_100":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/anion-gap":{"get":{"description":"Compute the serum anion gap from sodium, chloride, and bicarbonate, with or without potassium, using the Emmett–Narins 1977 formulas. formula is required.\n\nWhen an agent needs a published anion gap and must not pick with-K vs without-K silently, assign high/low AG, or apply an albumin correction.\n\nNot a diagnosis. magent does not assign a high or low anion gap.\n\nDoes not correct for albumin. Figge/Fencl albumin-corrected anion gap is not this tool.\n\nDoes not compute a delta gap. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sodium_mmol_l","description":"Serum sodium in mmol/L (110-160).","required":true,"schema":{"type":"number"},"example":"140"},{"in":"query","name":"chloride_mmol_l","description":"Serum chloride in mmol/L (70-130).","required":true,"schema":{"type":"number"},"example":"104"},{"in":"query","name":"bicarbonate_mmol_l","description":"Serum bicarbonate in mmol/L (2-45).","required":true,"schema":{"type":"number"},"example":"24"},{"in":"query","name":"potassium_mmol_l","description":"Serum potassium in mmol/L (1.5-8.0). Required when formula=with_k. Ignored when formula=without_k.","required":false,"schema":{"type":"number"},"example":"4.0"},{"in":"query","name":"formula","description":"without_k (Na - Cl - HCO3) or with_k (Na + K - Cl - HCO3). Required; magent does not pick one silently.","required":true,"schema":{"type":"string","enum":["without_k","with_k"]},"example":"without_k"}],"summary":"Anion gap","operationId":"get_api_calc_anion_gap","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, sodium_mmol_l, chloride_mmol_l, bicarbonate_mmol_l, potassium_mmol_l, anion_gap_mmol_l, citation, disclaimer."},"400":{"description":"invalid_sodium: sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.; invalid_chloride: chloride_mmol_l must be a number from 70 to 130. Returned before settlement; you are not charged.; invalid_bicarbonate: bicarbonate_mmol_l must be a number from 2 to 45. Returned before settlement; you are not charged.; invalid_potassium: potassium_mmol_l must be a number from 1.5 to 8.0. Returned before settlement; you are not charged.; invalid_anion_gap_formula: formula must be without_k or with_k. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/anion-gap"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Anion gap (bulk)","operationId":"post_api_calc_anion_gap","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_sodium: sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.; invalid_chloride: chloride_mmol_l must be a number from 70 to 130. Returned before settlement; you are not charged.; invalid_bicarbonate: bicarbonate_mmol_l must be a number from 2 to 45. Returned before settlement; you are not charged.; invalid_potassium: potassium_mmol_l must be a number from 1.5 to 8.0. Returned before settlement; you are not charged.; invalid_anion_gap_formula: formula must be without_k or with_k. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/anion-gap"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bicarbonate_mmol_l":"24","chloride_mmol_l":"104","formula":"without_k","sodium_mmol_l":"140"},{"bicarbonate_mmol_l":"24","chloride_mmol_l":"104","formula":"without_k","sodium_mmol_l":"140"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/fni":{"get":{"description":"Compute the Tavaglione 2023 fibrotic NASH index (FNI) from AST, HbA1c, and HDL cholesterol as a score for fibrotic nonalcoholic steatohepatitis.\n\nWhen an agent needs published Tavaglione 2023 FNI arithmetic and must not invent FIB-4, NAFLD fibrosis, SAFE, or BARD cutoffs or a biopsy result.\n\nNot a medical device. Not a diagnosis and not a biopsy. FNI bands are published rule-out and rule-in cut-points, not histology.\n\nTavaglione 2023 FNI only. Not FIB-4, not the NAFLD fibrosis score, not SAFE, and not BARD.\n\nHDL must be exactly one of hdl_mg_dl (5-150) or hdl_mmol_l (0.1-3.9). mmol/L converts as mg/dL = mmol/L * 38.67. magent does not assay AST, HbA1c, or HDL. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ast_u_l","description":"Aspartate aminotransferase in U/L (1-10000).","required":true,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"a1c_percent","description":"HbA1c in percent (4-15). magent does not convert from eAG.","required":true,"schema":{"type":"number"},"example":"5.5"},{"in":"query","name":"hdl_mg_dl","description":"HDL cholesterol in mg/dL (5-150). Provide this or hdl_mmol_l, not both. Used in the natural-log term.","required":false,"schema":{"type":"number"},"example":"50"},{"in":"query","name":"hdl_mmol_l","description":"HDL cholesterol in mmol/L (0.1-3.9). Converted as mg/dL = mmol/L * 38.67. Provide this or hdl_mg_dl, not both.","required":false,"schema":{"type":"number"},"example":"1.29"}],"summary":"FNI","operationId":"get_api_calc_fni","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, ast_u_l, a1c_percent, hdl_mg_dl, hdl_unit, x, fni, fni_band, citation, disclaimer."},"400":{"description":"invalid_ast: ast_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.; invalid_a1c: a1c_percent must be a number from 4 to 15 Returned before settlement; you are not charged.; invalid_hdl: hdl_mg_dl must be a number from 5 to 150, or hdl_mmol_l from 0.1 to 3.9, not both. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/fni"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"FNI (bulk)","operationId":"post_api_calc_fni","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ast: ast_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.; invalid_a1c: a1c_percent must be a number from 4 to 15 Returned before settlement; you are not charged.; invalid_hdl: hdl_mg_dl must be a number from 5 to 150, or hdl_mmol_l from 0.1 to 3.9, not both. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/fni"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"a1c_percent":"5.5","ast_u_l":"40","hdl_mg_dl":"50"},{"a1c_percent":"5.5","ast_u_l":"40","hdl_mg_dl":"50"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/canadian-tia":{"get":{"description":"Compute the Perry 2021 Canadian TIA Score from caller-assigned clinical findings and investigations for subsequent 7-day stroke or carotid revascularization risk after TIA.\n\nWhen an agent has caller-assigned ED TIA findings and needs the published Perry 2021 Table 1 total and Table 4 low/medium/high bands, without inventing ABCD2 or an admit order.\n\nNot a medical device. Not a stroke diagnosis, TIA diagnosis, or admit order.\n\nThis is the Canadian TIA Score (Perry 2021 Table 1), not ABCD2 and not ABCD2i.\n\nAge is required for the adult ED cohort (18-120) and does not add points. magent does not examine the patient, read ECG or CT, or assay platelets or glucose.\n\nVertigo scores -3 when present (false scores 0). Dysarthria or aphasia scores 1, not 3. Glucose ≥15 mmol/L scores 3 (mg/dL converts as mmol/L = mg/dL / 18). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Required for the adult ED cohort. Does not add points (Perry 2021 Table 1 has no age item).","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"first_tia","description":"Lifetime first TIA (Perry 2021 Table 1). true scores 2; false scores 0. Caller-assigned; magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"symptoms_ge_10_min","description":"Symptoms lasting 10 minutes or longer (Perry 2021 Table 1). true scores 2; false scores 0. magent does not time the episode.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"carotid_stenosis","description":"Past history of carotid stenosis (Perry 2021 Table 1). true scores 2; false scores 0. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"on_antiplatelet","description":"Already on antiplatelet therapy (Perry 2021 Table 1). true scores 3; false scores 0.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"gait_disturbance","description":"Gait disturbance (Perry 2021 Table 1). true scores 1; false scores 0. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"unilateral_weakness","description":"Unilateral weakness (Perry 2021 Table 1). true scores 1; false scores 0. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"vertigo","description":"Vertigo (Perry 2021 Table 1). true scores -3; false scores 0. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"diastolic_mm_hg","description":"Initial triage diastolic blood pressure in mm Hg (20-160). ≥110 scores 3; 109 scores 0 (Perry 2021 Table 1).","required":true,"schema":{"type":"number"},"example":"80"},{"in":"query","name":"dysarthria_or_aphasia","description":"Dysarthria or aphasia on history or examination (Perry 2021 Table 1). true scores 1; false scores 0. Not 3. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"af_on_ecg","description":"Atrial fibrillation on ECG (Perry 2021 Table 1). true scores 2; false scores 0. magent does not read the ECG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"infarct_on_ct","description":"New or old infarction on CT (Perry 2021 Table 1). true scores 1; false scores 0. magent does not read the CT.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"platelets_10e9_l","description":"Platelet count ×10^9/L (1-2000). ≥400 scores 2; 399 scores 0 (Perry 2021 Table 1).","required":true,"schema":{"type":"number"},"example":"200"},{"in":"query","name":"glucose_mmol_l","description":"Glucose in mmol/L (2.8-55.5). Provide this or glucose_mg_dl, not both. ≥15.0 scores 3; 14.9 scores 0 (Perry 2021 Table 1).","required":false,"schema":{"type":"number"},"example":"5.0"},{"in":"query","name":"glucose_mg_dl","description":"Glucose in mg/dL (50-1000). Converted as mmol/L = mg/dL / 18. Provide this or glucose_mmol_l, not both. ≥15 mmol/L after conversion scores 3.","required":false,"schema":{"type":"number"},"example":"90"}],"summary":"Canadian TIA Score","operationId":"get_api_calc_canadian_tia","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, tia_risk, age_years, diastolic_mm_hg, platelets_10e9_l, glucose_mmol_l, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_diastolic_bp: diastolic_mm_hg must be a number from 20 to 160. Returned before settlement; you are not charged.; invalid_platelets: platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.; invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/canadian-tia"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Canadian TIA Score (bulk)","operationId":"post_api_calc_canadian_tia","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_diastolic_bp: diastolic_mm_hg must be a number from 20 to 160. Returned before settlement; you are not charged.; invalid_platelets: platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.; invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/canadian-tia"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"af_on_ecg":"false","age":"70","carotid_stenosis":"false","diastolic_mm_hg":"80","dysarthria_or_aphasia":"false","first_tia":"false","gait_disturbance":"false","glucose_mmol_l":"5.0","infarct_on_ct":"false","on_antiplatelet":"false","platelets_10e9_l":"200","symptoms_ge_10_min":"false","unilateral_weakness":"false","vertigo":"false"},{"af_on_ecg":"false","age":"70","carotid_stenosis":"false","diastolic_mm_hg":"80","dysarthria_or_aphasia":"false","first_tia":"false","gait_disturbance":"false","glucose_mmol_l":"5.0","infarct_on_ct":"false","on_antiplatelet":"false","platelets_10e9_l":"200","symptoms_ge_10_min":"false","unilateral_weakness":"false","vertigo":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/heart-pathway":{"get":{"description":"Apply the Mahler 2015 HEART Pathway and return whether a caller-assigned HEART score plus 0-hour and 3-hour troponin flags meet the published early-discharge rule.\n\nWhen an agent already has a caller-assigned Six 2008 HEART total (0-10) and caller-assigned 0-hour and 3-hour troponin elevation flags and needs the published Mahler 2015 early-discharge candidate result. magent does not assign HEART items, read an ECG, or assay a troponin.\n\nNot a medical device and not a diagnosis of ACS or of discharge safety.\n\nheart_score is the caller-assigned Six 2008 HEART total (0-10). magent does not assign history, ECG, age, risk-factor, or troponin HEART items.\n\ntroponin_0_elevated and troponin_3h_elevated are caller-assigned flags for a value above the 99th percentile. magent does not assay a troponin or read an ECG.\n\nThis tool does not order a stress test or angiogram. Presence of high-risk features does not mandate a test.\n\nThis is the Mahler 2015 HEART Pathway (HEART 0-3 plus serial 0h/3h troponin), not the Six 2008 HEART score alone. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"heart_score","description":"Caller-assigned HEART score integer 0-10 (Six 2008 components already summed by the caller). magent does not assign history, ECG, age, risk-factor, or troponin HEART items. Early discharge requires 0-3 when both serial troponin flags are false.","required":true,"schema":{"type":"integer"},"example":"2"},{"in":"query","name":"troponin_0_elevated","description":"0-hour troponin above the 99th percentile threshold as assigned by the caller. true or false. true blocks early discharge. magent does not assay a troponin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"troponin_3h_elevated","description":"3-hour troponin above the 99th percentile threshold as assigned by the caller. true or false. true blocks early discharge. magent does not assay a troponin.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"HEART Pathway","operationId":"get_api_calc_heart_pathway","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, heart_score, troponin_0_elevated, troponin_3h_elevated, early_discharge_candidate, components, citation, disclaimer."},"400":{"description":"invalid_heart_score: heart_score must be an integer from 0 to 10. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/heart-pathway"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HEART Pathway (bulk)","operationId":"post_api_calc_heart_pathway","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_heart_score: heart_score must be an integer from 0 to 10. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/heart-pathway"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"heart_score":"2","troponin_0_elevated":"false","troponin_3h_elevated":"false"},{"heart_score":"2","troponin_0_elevated":"false","troponin_3h_elevated":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/gds-15":{"get":{"description":"Sum fifteen Sheikh 1986 GDS-15 yes/no items using that paper's reverse-scoring key and return the published 0-15 total. Does not apply later total-score severity bands.\n\nWhen an agent already has Sheikh 1986 GDS-15 yes/no answers (as asked, not pre-scored points) and needs the published total. magent does not interview the patient, diagnose depression, score PHQ-9, score the 30-item GDS, or apply later 0-4/5-9/10+ cutoffs.\n\nNot a medical device and not a depression diagnosis or treatment order.\n\nEach of the fifteen items is a caller-assigned yes/no answering the question as asked. magent does not interview the patient.\n\nThis is Sheikh 1986 GDS-15 only (15-item short form; max 15). magent does not score the 30-item GDS or PHQ-9.\n\nSheikh 1986 published no total-score severity bands. This tool returns score and max_score only. It does not apply later Almeida or website 0-4/5-9/10+ cutoffs. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"satisfied_with_life","description":"Are you basically satisfied with your life? (Sheikh 1986 GDS-15 item 1). true or false as assigned by the caller. false is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"dropped_activities","description":"Have you dropped many of your activities and interests? (Sheikh 1986 GDS-15 item 2). true or false as assigned by the caller. true is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"life_empty","description":"Do you feel that your life is empty? (Sheikh 1986 GDS-15 item 3). true or false as assigned by the caller. true is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"often_bored","description":"Do you often get bored? (Sheikh 1986 GDS-15 item 4). true or false as assigned by the caller. true is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"good_spirits","description":"Are you in good spirits most of the time? (Sheikh 1986 GDS-15 item 5). true or false as assigned by the caller. false is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"afraid_something_bad","description":"Are you afraid that something bad is going to happen to you? (Sheikh 1986 GDS-15 item 6). true or false as assigned by the caller. true is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"happy_most_of_time","description":"Do you feel happy most of the time? (Sheikh 1986 GDS-15 item 7). true or false as assigned by the caller. false is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"often_helpless","description":"Do you often feel helpless? (Sheikh 1986 GDS-15 item 8). true or false as assigned by the caller. true is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"prefer_stay_home","description":"Do you prefer to stay at home, rather than going out and doing new things? (Sheikh 1986 GDS-15 item 9). true or false as assigned by the caller. true is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"more_memory_problems","description":"Do you feel you have more problems with memory than most? (Sheikh 1986 GDS-15 item 10). true or false as assigned by the caller. true is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"wonderful_to_be_alive","description":"Do you think it is wonderful to be alive now? (Sheikh 1986 GDS-15 item 11). true or false as assigned by the caller. false is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"pretty_worthless","description":"Do you feel pretty worthless the way you are now? (Sheikh 1986 GDS-15 item 12). true or false as assigned by the caller. true is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"full_of_energy","description":"Do you feel full of energy? (Sheikh 1986 GDS-15 item 13). true or false as assigned by the caller. false is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"situation_hopeless","description":"Do you feel that your situation is hopeless? (Sheikh 1986 GDS-15 item 14). true or false as assigned by the caller. true is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"most_people_better_off","description":"Do you think that most people are better off than you are? (Sheikh 1986 GDS-15 item 15). true or false as assigned by the caller. true is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"GDS-15","operationId":"get_api_calc_gds_15","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_gds: GDS-15 needs the fifteen Sheikh 1986 yes/no items as true or false. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gds-15"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"GDS-15 (bulk)","operationId":"post_api_calc_gds_15","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_gds: GDS-15 needs the fifteen Sheikh 1986 yes/no items as true or false. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gds-15"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"afraid_something_bad":"false","dropped_activities":"false","full_of_energy":"true","good_spirits":"true","happy_most_of_time":"true","life_empty":"false","more_memory_problems":"false","most_people_better_off":"false","often_bored":"false","often_helpless":"false","prefer_stay_home":"false","pretty_worthless":"false","satisfied_with_life":"true","situation_hopeless":"false","wonderful_to_be_alive":"true"},{"afraid_something_bad":"false","dropped_activities":"false","full_of_energy":"true","good_spirits":"true","happy_most_of_time":"true","life_empty":"false","more_memory_problems":"false","most_people_better_off":"false","often_bored":"false","often_helpless":"false","prefer_stay_home":"false","pretty_worthless":"false","satisfied_with_life":"true","situation_hopeless":"false","wonderful_to_be_alive":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/tisdale":{"get":{"description":"Sum Tisdale 2013 Table 5 points for in-hospital QT prolongation risk and return the published 0-6 / 7-10 / ≥11 band.\n\nWhen an agent needs the published Tisdale point total and must not invent a drug-stop or TdP decision from prose.\n\nNot a medical device.\n\nNot a drug-stop protocol and not a TdP (torsades de pointes) diagnosis.\n\nThe caller assigns clinical flags and the QTc-prolonging drug count. magent does not interpret the ECG or identify the drugs.\n\nBands follow Tisdale 2013 validation (low <7, moderate 7-10, high ≥11). Table 6 “>11” is a typesetting gap; 11 is high. This tool does not return percents. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Age ≥68 scores 1 (Tisdale 2013 Table 5). 67 does not score.","required":true,"schema":{"type":"integer"},"example":"60"},{"in":"query","name":"sex","description":"female scores 1; male scores 0 (Tisdale 2013 Table 5).","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"loop_diuretic","description":"Loop diuretic (Tisdale 2013 Table 5). true or false. Scores 1 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"potassium_mmol_l","description":"Serum potassium in mmol/L (1.5-8.0). ≤3.5 scores 2 (Tisdale 2013 Table 5). 3.5 scores; 3.51 does not.","required":true,"schema":{"type":"number"},"example":"4.0"},{"in":"query","name":"admission_qtc_ms","description":"Admission QTc in milliseconds (200-800). ≥450 scores 2 (Tisdale 2013 Table 5). 450 scores.","required":true,"schema":{"type":"number"},"example":"400"},{"in":"query","name":"acute_mi","description":"Acute myocardial infarction (Tisdale 2013 Table 5). true or false. Scores 2 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"sepsis","description":"Sepsis (Tisdale 2013 Table 5). true or false. Scores 3 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"heart_failure","description":"Left ventricular dysfunction / heart failure (Tisdale 2013 Table 5). true or false. Scores 3 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"qtc_prolonging_drugs","description":"Count of QTc-prolonging drugs (integer 0-20). 0 → 0 points; 1 → 3 points; ≥2 → 6 points (Table 5 one-drug and ≥2-drug rows stack).","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"Tisdale","operationId":"get_api_calc_tisdale","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, tisdale_band, age_years, sex, potassium_mmol_l, admission_qtc_ms, qtc_prolonging_drugs, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_potassium: potassium_mmol_l must be a number from 1.5 to 8.0. Returned before settlement; you are not charged.; invalid_admission_qtc: admission_qtc_ms must be a number from 200 to 800 (Tisdale 2013). Returned before settlement; you are not charged.; invalid_qtc_drug_count: qtc_prolonging_drugs must be an integer from 0 to 20 (Tisdale 2013). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/tisdale"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Tisdale (bulk)","operationId":"post_api_calc_tisdale","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_potassium: potassium_mmol_l must be a number from 1.5 to 8.0. Returned before settlement; you are not charged.; invalid_admission_qtc: admission_qtc_ms must be a number from 200 to 800 (Tisdale 2013). Returned before settlement; you are not charged.; invalid_qtc_drug_count: qtc_prolonging_drugs must be an integer from 0 to 20 (Tisdale 2013). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/tisdale"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"acute_mi":"false","admission_qtc_ms":"400","age":"60","heart_failure":"false","loop_diuretic":"false","potassium_mmol_l":"4.0","qtc_prolonging_drugs":"0","sepsis":"false","sex":"male"},{"acute_mi":"false","admission_qtc_ms":"400","age":"60","heart_failure":"false","loop_diuretic":"false","potassium_mmol_l":"4.0","qtc_prolonging_drugs":"0","sepsis":"false","sex":"male"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rebound-hyperbilirubinemia":{"get":{"description":"Return the Chang 2017 three-variable rebound hyperbilirubinemia prediction score after inpatient phototherapy from gestational age, age at phototherapy initiation in days, TSB at termination, and a caller-supplied AAP phototherapy threshold. Scores <20 correspond to a <4% probability of rebound in that paper.\n\nWhen an agent already has gestational age, age at phototherapy initiation, TSB at termination, and the AAP phototherapy threshold and needs the published Chang 2017 three-variable score. magent does not assay bilirubin, compute the AAP nomogram, or order phototherapy.\n\nNot a medical device and not a phototherapy order. magent does not assay bilirubin or compute the AAP phototherapy nomogram.\n\nThis is Chang 2017's three-variable integer prediction score only (gestational age <38 weeks, age at phototherapy initiation in days, TSB relative to the caller-supplied AAP phototherapy threshold). It is not Chang 2019's two-variable score.\n\nScores <20 correspond to a <4% probability of rebound (TSB back to phototherapy threshold within 72 hours) in Chang 2017. magent does not emit other named risk classes or a logistic probability.\n\nThe derivation cohort was gestational age ≥35 weeks with phototherapy before age 14 days. Age is in days (fractional allowed); magent does not convert hours. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"gestational_age_weeks","description":"Gestational age in completed weeks, integer 35-45. Chang 2017 cohort was ≥35 weeks. Scores +15 when <38 weeks; 38 weeks and above score 0. magent does not convert days.","required":true,"schema":{"type":"integer"},"example":"39"},{"in":"query","name":"age_at_initiation_days","description":"Chronologic age at phototherapy initiation in days (0-14; fractional days allowed). Chang 2017 treated infants before age 14 days. magent does not convert hours.","required":true,"schema":{"type":"number"},"example":"3"},{"in":"query","name":"tsb_at_termination_mg_dl","description":"Total serum bilirubin at phototherapy termination in mg/dL (0-40). magent does not assay bilirubin.","required":true,"schema":{"type":"number"},"example":"12"},{"in":"query","name":"phototherapy_threshold_mg_dl","description":"Caller-supplied AAP phototherapy threshold in mg/dL at termination (0-40). Difference is (threshold − TSB) and may be negative if TSB is still above threshold. magent does not compute the AAP nomogram.","required":true,"schema":{"type":"number"},"example":"16"}],"summary":"Rebound hyperbilirubinemia","operationId":"get_api_calc_rebound_hyperbilirubinemia","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, gestational_age_weeks, age_at_initiation_days, tsb_at_termination_mg_dl, phototherapy_threshold_mg_dl, score, score_lt_20, citation, disclaimer."},"400":{"description":"invalid_rebound_hyperbilirubinemia: Rebound hyperbilirubinemia score inputs must match Chang 2017 gestational age, phototherapy timing, and bilirubin-relative-to-threshold terms from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rebound-hyperbilirubinemia"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rebound hyperbilirubinemia (bulk)","operationId":"post_api_calc_rebound_hyperbilirubinemia","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rebound_hyperbilirubinemia: Rebound hyperbilirubinemia score inputs must match Chang 2017 gestational age, phototherapy timing, and bilirubin-relative-to-threshold terms from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rebound-hyperbilirubinemia"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_at_initiation_days":"3","gestational_age_weeks":"39","phototherapy_threshold_mg_dl":"16","tsb_at_termination_mg_dl":"12"},{"age_at_initiation_days":"3","gestational_age_weeks":"39","phototherapy_threshold_mg_dl":"16","tsb_at_termination_mg_dl":"12"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/wells-dvt":{"get":{"description":"Compute the Wells deep-vein thrombosis probability score and return three-tier and two-tier bands.\n\nWhen an agent needs the published Wells DVT arithmetic and must not invent a probability from prose.\n\nNot a diagnosis. Bands are published cut-points, not a DVT rule-out.\n\nalternative_diagnosis_as_likely subtracts 2. Flags are caller-supplied booleans. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"active_cancer","description":"Active cancer (treatment ongoing, within 6 months, or palliative). +1.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"paralysis_or_cast","description":"Paralysis, paresis, or recent plaster immobilization of the legs. +1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bedridden_or_surgery","description":"Recently bedridden ≥3 days or major surgery within 12 weeks. +1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"tenderness","description":"Localized tenderness along the deep venous system. +1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"entire_leg_swollen","description":"Entire leg swollen. +1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"calf_swelling_gt_3cm","description":"Calf swelling >3 cm compared with the asymptomatic side. +1.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"pitting_edema","description":"Pitting edema confined to the symptomatic leg. +1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"collateral_veins","description":"Collateral superficial veins (nonvaricose). +1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"previous_dvt","description":"Previously documented DVT. +1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"alternative_diagnosis_as_likely","description":"Alternative diagnosis at least as likely as DVT. −2.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Wells DVT","operationId":"get_api_calc_wells_dvt","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, three_tier, two_tier, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/wells-dvt"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Wells DVT (bulk)","operationId":"post_api_calc_wells_dvt","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/wells-dvt"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"active_cancer":"true","alternative_diagnosis_as_likely":"false","bedridden_or_surgery":"false","calf_swelling_gt_3cm":"true","collateral_veins":"false","entire_leg_swollen":"false","paralysis_or_cast":"false","pitting_edema":"false","previous_dvt":"false","tenderness":"false"},{"active_cancer":"true","alternative_diagnosis_as_likely":"false","bedridden_or_surgery":"false","calf_swelling_gt_3cm":"true","collateral_veins":"false","entire_leg_swollen":"false","paralysis_or_cast":"false","pitting_edema":"false","previous_dvt":"false","tenderness":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/tokuhashi":{"get":{"description":"Sum the revised Tokuhashi 2005 score for preoperative evaluation of metastatic spine tumor prognosis from six caller-assigned items and return the published 0–15 integer total and predicted-survival band (0–8 / 9–11 / 12–15). Not an operative order and not original Tokuhashi 1990.\n\nWhen an agent has already assigned Tokuhashi 2005 KPS, extraspinal bone mets, vertebral mets, visceral mets, primary site group, and palsy for a metastatic spine tumor and needs the published integer sum and predicted-survival band, not a surgical order, not SINS (neoplastic spinal instability), and not the original 1990 0–12 score.\n\nNot a medical device. magent does not read imaging. KPS, extraspinal bone mets, vertebral mets, visceral mets, primary site, and palsy are caller-assigned.\n\nNot an operative order. Bands 0-8, 9-11, and 12-15 follow Tokuhashi 2005 predicted survival (<6 months / ≥6 months / ≥12 months); they are not a surgical command.\n\nNot original Tokuhashi 1990 (0–5 / 6–8 / 9–12, max 12). This tool is the revised 2005 0–15 score.\n\nNot SINS (Fisher 2010 neoplastic spinal instability). This tool is Tokuhashi 2005 prognosis for metastatic spine tumors. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"kps","description":"Caller-assigned Karnofsky performance status band (Tokuhashi 2005). poor (KPS 10–40%) scores 0; moderate (50–70%) scores 1; good (80–100%) scores 2. magent does not observe the patient.","required":true,"schema":{"type":"string","enum":["poor","moderate","good"]},"example":"poor"},{"in":"query","name":"extraspinal","description":"Caller-assigned number of extraspinal bone metastases (Tokuhashi 2005). ge_3 (≥3) scores 0; one_or_two scores 1; none scores 2. magent does not read imaging.","required":true,"schema":{"type":"string","enum":["ge_3","one_or_two","none"]},"example":"ge_3"},{"in":"query","name":"vertebral","description":"Caller-assigned number of vertebral metastases (Tokuhashi 2005). ge_3 (≥3) scores 0; two scores 1; one scores 2. There is no vertebral none token. magent does not read imaging.","required":true,"schema":{"type":"string","enum":["ge_3","two","one"]},"example":"ge_3"},{"in":"query","name":"visceral","description":"Caller-assigned metastases to major internal organs (Tokuhashi 2005). unremovable scores 0; removable scores 1; none scores 2. magent does not read imaging.","required":true,"schema":{"type":"string","enum":["unremovable","removable","none"]},"example":"unremovable"},{"in":"query","name":"primary","description":"Caller-assigned Tokuhashi 2005 primary site group. lung, osteosarcoma, stomach, bladder, esophagus, pancreas score 0; liver, gallbladder, unidentified score 1; others scores 2; kidney, uterus score 3; rectum scores 4; thyroid, prostate, breast, carcinoid score 5. others is the published catch-all token. magent does not infer histology.","required":true,"schema":{"type":"string","enum":["lung","osteosarcoma","stomach","bladder","esophagus","pancreas","liver","gallbladder","unidentified","others","kidney","uterus","rectum","thyroid","prostate","breast","carcinoid"]},"example":"lung"},{"in":"query","name":"palsy","description":"Caller-assigned spinal cord palsy (Tokuhashi 2005). complete (Frankel A/B) scores 0; incomplete (Frankel C/D) scores 1; none (Frankel E) scores 2. magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["complete","incomplete","none"]},"example":"complete"}],"summary":"Tokuhashi","operationId":"get_api_calc_tokuhashi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, tokuhashi_band, kps, extraspinal, vertebral, visceral, primary, palsy, components, citation, disclaimer."},"400":{"description":"invalid_tokuhashi: kps must be poor, moderate, or good; extraspinal must be ge_3, one_or_two, or none; vertebral must be ge_3, two, or one; visceral must be unremovable, removable, or none; primary must be a Tokuhashi 2005 site group; palsy must be complete, incomplete, or none (revised Tokuhashi 0-15). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/tokuhashi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Tokuhashi (bulk)","operationId":"post_api_calc_tokuhashi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_tokuhashi: kps must be poor, moderate, or good; extraspinal must be ge_3, one_or_two, or none; vertebral must be ge_3, two, or one; visceral must be unremovable, removable, or none; primary must be a Tokuhashi 2005 site group; palsy must be complete, incomplete, or none (revised Tokuhashi 0-15). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/tokuhashi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"extraspinal":"ge_3","kps":"poor","palsy":"complete","primary":"lung","vertebral":"ge_3","visceral":"unremovable"},{"extraspinal":"ge_3","kps":"poor","palsy":"complete","primary":"lung","vertebral":"ge_3","visceral":"unremovable"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/brue":{"get":{"description":"Apply the Tieder 2016 AAP BRUE definition and return feature_count (0-4) and whether the published definition box holds (brue).\n\nWhen an agent already has the seven caller-assigned Tieder 2016 BRUE definition flags and needs whether the published definition box holds. magent does not examine the infant.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose BRUE, ALTE, or SIDS.\n\nThe caller assigns the seven flags. magent does not examine the infant or take a history.\n\nThis tool is the Tieder 2016 AAP BRUE definition box only. It does not implement the lower-risk subset or the lower-risk management key-action statements. BRUE replaced ALTE; this tool is not an ALTE diagnosis and is not a SIDS diagnosis. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_under_1_year","description":"Infant younger than 1 year as assigned by the caller (Tieder 2016 BRUE definition). true or false. magent does not examine the infant or take an age in days.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"sudden_brief_now_resolved","description":"Observer reports a sudden, brief, and now resolved episode as assigned by the caller. true or false. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"cyanosis_or_pallor","description":"Cyanosis or pallor during the episode (one of four event features; at least one required). true or false as assigned by the caller. magent does not examine the infant.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"absent_decreased_irregular_breathing","description":"Absent, decreased, or irregular breathing during the episode (one of four event features; at least one required). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"marked_tone_change","description":"Marked change in tone (hyper- or hypotonia) during the episode (one of four event features; at least one required). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"altered_responsiveness","description":"Altered level of responsiveness during the episode (one of four event features; at least one required). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"unexplained_after_history_exam","description":"No explanation remains after appropriate history and physical examination as assigned by the caller. true means unexplained and is required for BRUE. true or false. magent does not examine the infant.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"BRUE","operationId":"get_api_calc_brue","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, feature_count, brue, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/brue"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"BRUE (bulk)","operationId":"post_api_calc_brue","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/brue"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"absent_decreased_irregular_breathing":"false","age_under_1_year":"true","altered_responsiveness":"false","cyanosis_or_pallor":"true","marked_tone_change":"false","sudden_brief_now_resolved":"true","unexplained_after_history_exam":"true"},{"absent_decreased_irregular_breathing":"false","age_under_1_year":"true","altered_responsiveness":"false","cyanosis_or_pallor":"true","marked_tone_change":"false","sudden_brief_now_resolved":"true","unexplained_after_history_exam":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/tdn-grade":{"get":{"description":"Apply the Terrapon 2021 Therapy-Disability-Neurology grade and return tdn_grade 1-5 as the maximum of caller-assigned therapy, mapped mRS disability, and new-deficit neurology grades.\n\nWhen an agent already has a caller-assigned therapy intensity (t1-t5), modified Rankin 0-6, and whether a new neurologic deficit occurred, and needs the published TDN grade. magent does not grade the adverse event.\n\nNot a medical device and not a diagnosis. magent does not examine the patient and does not grade the adverse event; the caller assigns therapy, modified Rankin, and new deficit.\n\nNot Clavien-Dindo alone. TDN grades therapy, disability, and neurology together; the overall grade is the maximum of the three dimensions.\n\nDisability uses modified Rankin 0-6 including death (6). This is not van Swieten 1988 modified Rankin 0-5, which omits death.\n\nTherapy t5 or disability_mrs 6 is always TDN grade 5 (death). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"therapy","description":"Terrapon 2021 Therapy dimension as assigned by the caller. t1 no treatment or intervention beyond antiemetics, antipyretics, analgesics, diuretics, electrolytes, physiotherapy, or bedside wound opening (T=1). t2 pharmacologic treatment including blood transfusion or TPN (T=2). t3 invasive procedure, surgical, endoscopic, or radiologic (T=3). t4 life-threatening, ICU management (T=4). t5 death (T=5). magent does not grade the adverse event.","required":true,"schema":{"type":"string","enum":["t1","t2","t3","t4","t5"]},"example":"t1"},{"in":"query","name":"disability_mrs","description":"Modified Rankin 0-6 as assigned by the caller, including death as 6. Maps to Disability D: 0-1→1, 2-3→2, 4→3, 5→4, 6→5. This is not van Swieten 1988 modified Rankin 0-5, which omits death. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"new_neurologic_deficit","description":"New neurologic deficit as assigned by the caller (Terrapon 2021 Neurology dimension). true or false. false is N=1; true is N=2. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"TDN Grade","operationId":"get_api_calc_tdn_grade","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, tdn_grade, therapy_grade, disability_grade, neurology_grade, criteria, citation, disclaimer."},"400":{"description":"invalid_tdn_therapy: therapy must be t1, t2, t3, t4, or t5 (Terrapon 2021 Therapy dimension). Returned before settlement; you are not charged.; invalid_tdn_mrs: disability_mrs must be an integer from 0 to 6 (Terrapon 2021 mRS; 6 is death). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/tdn-grade"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"TDN Grade (bulk)","operationId":"post_api_calc_tdn_grade","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_tdn_therapy: therapy must be t1, t2, t3, t4, or t5 (Terrapon 2021 Therapy dimension). Returned before settlement; you are not charged.; invalid_tdn_mrs: disability_mrs must be an integer from 0 to 6 (Terrapon 2021 mRS; 6 is death). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/tdn-grade"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"disability_mrs":"0","new_neurologic_deficit":"false","therapy":"t1"},{"disability_mrs":"0","new_neurologic_deficit":"false","therapy":"t1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ich-score":{"get":{"description":"Compute the Hemphill 2001 ICH Score from caller-assigned GCS, age, infratentorial origin, ICH volume, and IVH.\n\nWhen an agent needs the published five-item ICH Score total and must not invent GCS, volume, IVH, or origin from a CT scan.\n\nNot a diagnosis and not a withdrawal-of-care protocol.\n\nThe caller assigns GCS, ICH volume, IVH, and infratentorial origin. magent does not read a CT scan.\n\nThis is the Hemphill 2001 ICH Score, not the FUNC score and not ICH-GS.\n\nThe response is a point total (max 6). It does not include a 30-day mortality percentage table. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"gcs","description":"Caller-assigned GCS total (integer 3-15). 3-4 scores 2; 5-12 scores 1; 13-15 scores 0. magent does not compute GCS from eye, verbal, and motor here.","required":true,"schema":{"type":"integer"},"example":"15"},{"in":"query","name":"age","description":"Age in years (18-120). ≥80 scores 1; 79 does not.","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"infratentorial_origin","description":"Infratentorial origin of the hemorrhage as assigned by the caller. true or false. 1 point if true. magent does not read a CT scan.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ich_volume_ml","description":"ICH volume in mL (cm^3 in Hemphill 2001). Number from 0.1 to 300. ≥30 scores 1; 29.9 does not. magent does not measure volume from imaging.","required":true,"schema":{"type":"number"},"example":"10"},{"in":"query","name":"ivh","description":"Intraventricular hemorrhage as assigned by the caller. true or false. 1 point if true. magent does not read a CT scan.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"ICH Score","operationId":"get_api_calc_ich_score","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, gcs, age_years, ich_volume_ml, components, citation, disclaimer."},"400":{"description":"invalid_gcs_total: gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_ich_volume: ich_volume_ml must be a number from 0.1 to 300. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ich-score"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ICH Score (bulk)","operationId":"post_api_calc_ich_score","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_gcs_total: gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_ich_volume: ich_volume_ml must be a number from 0.1 to 300. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ich-score"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"70","gcs":"15","ich_volume_ml":"10","infratentorial_origin":"false","ivh":"false"},{"age":"70","gcs":"15","ich_volume_ml":"10","infratentorial_origin":"false","ivh":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/euroscore-ii":{"get":{"description":"Compute the Nashef 2012 Table 6 logistic estimated in-hospital mortality after adult cardiac surgery from the published multivariable coefficients.\n\nWhen an agent needs the published EuroSCORE II probability and must not substitute additive EuroSCORE I, invent low/intermediate/high percent bands, or issue an operative clearance.\n\nNot a medical device. Not a diagnosis and not an operative clearance.\n\nNashef 2012 Table 6 multivariable logistic EuroSCORE II only. This is not additive EuroSCORE I and not Table 5 univariable coefficients.\n\nNashef 2012 does not publish low, intermediate, or high percent cuts; magent does not invent them.\n\nrenal is a caller-assigned creatinine-clearance band or dialysis. magent does not run Cockcroft-Gault and does not parse a creatinine number.\n\nNYHA, LV function, urgency, procedure weight, and flags are caller-assigned published categories. magent does not examine the patient or classify an operative note.\n\nThe paper's developmental cohort oldest patient was 95; predicted percent is for a population, not an individual outcome. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Nashef 2012 Table 6: Xi = 1 if age <= 60; Xi = age - 59 if older (age 61 → 2). Coefficient 0.0285181 on the encoded step, not on raw years.","required":true,"schema":{"type":"integer"},"example":"60"},{"in":"query","name":"sex","description":"Sex as assigned by the caller. male is the reference (0). female adds 0.2196434 (Nashef 2012 Table 6).","required":true,"schema":{"type":"string","enum":["male","female"]},"example":"male"},{"in":"query","name":"renal","description":"Nashef 2012 renal-function band as assigned by the caller: cc_gt_85 (reference, 0), cc_51_85 (+0.303553), cc_le_50 (+0.8592256), or dialysis (+0.6421508). magent does not run Cockcroft-Gault and does not parse a creatinine number.","required":true,"schema":{"type":"string","enum":["cc_gt_85","cc_51_85","cc_le_50","dialysis"]},"example":"cc_gt_85"},{"in":"query","name":"nyha","description":"NYHA class 1-4 as assigned by the caller (Nashef 2012 Table 6). class 1 is the reference (0); class 2 +0.1070545; class 3 +0.2958358; class 4 +0.5597929.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"lv_function","description":"Left-ventricular function band as assigned by the caller: good (LVEF 51% or more, reference 0), moderate (31-50%, +0.3150652), poor (21-30%, +0.8084096), or very_poor (20% or less, +0.9346919). magent does not parse an ejection-fraction number.","required":true,"schema":{"type":"string","enum":["good","moderate","poor","very_poor"]},"example":"good"},{"in":"query","name":"urgency","description":"Nashef 2012 urgency as assigned by the caller: elective (reference, 0), urgent (+0.3174673), emergency (+0.7039121), or salvage (+1.362947).","required":true,"schema":{"type":"string","enum":["elective","urgent","emergency","salvage"]},"example":"elective"},{"in":"query","name":"weight_of_procedure","description":"Nashef 2012 weight of the intervention as assigned by the caller: isolated_cabg (reference, 0), single_non_cabg (+0.0062118), two (+0.5521478), or three_plus (+0.9724533). magent does not classify an operative note.","required":true,"schema":{"type":"string","enum":["isolated_cabg","single_non_cabg","two","three_plus"]},"example":"isolated_cabg"},{"in":"query","name":"pulmonary_hypertension","description":"Nashef 2012 Table 6 PA systolic-pressure band as assigned by the caller: none (reference, 0), moderate (31-55 mmHg, +0.1788899), or severe (>=55 mmHg, +0.3491475). magent does not parse a PA pressure number.","required":true,"schema":{"type":"string","enum":["none","moderate","severe"]},"example":"none"},{"in":"query","name":"extracardiac_arteriopathy","description":"true if extracardiac arteriopathy is present (Nashef 2012 Table 6 ECA +0.5360268). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"poor_mobility","description":"true if severe impairment of mobility secondary to musculoskeletal or neurological dysfunction (Nashef 2012 Table 6 N/M mob +0.2407181). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"previous_cardiac_surgery","description":"true if one or more previous major cardiac operations involving opening the pericardium (Nashef 2012 Table 6 redo +1.118599). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"chronic_lung_disease","description":"true if chronic pulmonary dysfunction is present (Nashef 2012 Table 6 CPD +0.1886564). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"active_endocarditis","description":"true if still on antibiotic treatment for endocarditis at the time of surgery (Nashef 2012 Table 6 AE +0.6194522). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"critical_preoperative_state","description":"true if a Nashef 2012 critical preoperative state is present (Table 6 +1.086517). true or false. magent does not assign this from a chart.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"insulin_dependent_diabetes","description":"true if insulin-dependent diabetes mellitus (Nashef 2012 Table 6 IDDM +0.3542749). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ccs_class_4","description":"true if CCS class 4 angina (Nashef 2012 Table 6 CCS4 +0.2226147). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"recent_mi","description":"true if myocardial infarction within 90 days before operation (Nashef 2012 Table 6 +0.1528943). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"thoracic_aorta","description":"true if surgery on the thoracic aorta (Nashef 2012 Table 6 +0.6527205). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"EuroSCORE II","operationId":"get_api_calc_euroscore_ii","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, age_step, sex, renal, nyha, lv_function, urgency, weight_of_procedure, pulmonary_hypertension, extracardiac_arteriopathy, poor_mobility, previous_cardiac_surgery, chronic_lung_disease, active_endocarditis, critical_preoperative_state, insulin_dependent_diabetes, ccs_class_4, recent_mi, thoracic_aorta, logit, estimated_probability_percent, citation, disclaimer."},"400":{"description":"invalid_euroscore_ii: EuroSCORE II needs Nashef 2012 cardiac-surgery predictors in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/euroscore-ii"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"EuroSCORE II (bulk)","operationId":"post_api_calc_euroscore_ii","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_euroscore_ii: EuroSCORE II needs Nashef 2012 cardiac-surgery predictors in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/euroscore-ii"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"active_endocarditis":"false","age":"60","ccs_class_4":"false","chronic_lung_disease":"false","critical_preoperative_state":"false","extracardiac_arteriopathy":"false","insulin_dependent_diabetes":"false","lv_function":"good","nyha":"1","poor_mobility":"false","previous_cardiac_surgery":"false","pulmonary_hypertension":"none","recent_mi":"false","renal":"cc_gt_85","sex":"male","thoracic_aorta":"false","urgency":"elective","weight_of_procedure":"isolated_cabg"},{"active_endocarditis":"false","age":"60","ccs_class_4":"false","chronic_lung_disease":"false","critical_preoperative_state":"false","extracardiac_arteriopathy":"false","insulin_dependent_diabetes":"false","lv_function":"good","nyha":"1","poor_mobility":"false","previous_cardiac_surgery":"false","pulmonary_hypertension":"none","recent_mi":"false","renal":"cc_gt_85","sex":"male","thoracic_aorta":"false","urgency":"elective","weight_of_procedure":"isolated_cabg"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/who-pv":{"get":{"description":"Apply the Arber 2016 / WHO 2016 polycythemia vera diagnostic criteria and return whether the published combination of three majors, or major 1 and major 2 plus subnormal EPO, is met.\n\nWhen an agent already has caller-assigned hemoglobin or hematocrit or red-cell mass, marrow panmyelosis, JAK2 V617F or exon 12, and EPO status, and needs the WHO 2016 PV criteria result. magent does not diagnose PV and does not assay EPO or sequence JAK2.\n\nNot a medical device.\n\nNot a WHO diagnosis. Criteria met is not a polycythemia vera diagnosis without the rest of the WHO 2016 workup.\n\nmagent does not assay EPO or sequence JAK2. subnormal_epo and jak2_v617f_or_exon12 are caller-assigned.\n\nmagent does not read bone-marrow slides. bone_marrow_panmyelosis is caller-assigned.\n\nThis tool is Arber 2016 / WHO 2016 PV only. Not WHO 2022 and not ICC. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sex","description":"female or male (Arber 2016 WHO 2016 PV hemoglobin/hematocrit thresholds). Required even when only increased_red_cell_mass is used. Assigned by the caller.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"hemoglobin_g_dl","description":"Hemoglobin in g/dL (3-22). Major 1 meets when male >16.5 or female >16.0. Optional when hematocrit_percent is sent or increased_red_cell_mass is true. At least one of hemoglobin_g_dl, hematocrit_percent, or increased_red_cell_mass true is required. magent does not assay hemoglobin.","required":false,"schema":{"type":"number"},"example":"15"},{"in":"query","name":"hematocrit_percent","description":"Hematocrit percent (10-70). Major 1 meets when male >49 or female >48. Optional when hemoglobin_g_dl is sent or increased_red_cell_mass is true. magent does not assay hematocrit.","required":false,"schema":{"type":"number"},"example":"45"},{"in":"query","name":"increased_red_cell_mass","description":"Increased red-cell mass as assigned by the caller (Arber 2016 WHO 2016 major 1 alternative to Hb/Hct). true or false. true meets major 1 even when Hb/Hct are omitted or below threshold. magent does not measure red-cell mass.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bone_marrow_panmyelosis","description":"WHO 2016 marrow major as assigned by the caller (age-adjusted hypercellularity with panmyelosis, including pleomorphic mature megakaryocytes). true or false. magent does not read slides.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"jak2_v617f_or_exon12","description":"JAK2 V617F or JAK2 exon 12 mutation as assigned by the caller (Arber 2016 WHO 2016 major 3). true or false. magent does not sequence JAK2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"subnormal_epo","description":"Subnormal serum erythropoietin as assigned by the caller (Arber 2016 WHO 2016 minor criterion). true or false. magent does not assay EPO.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"WHO 2016 PV criteria","operationId":"get_api_calc_who_pv","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, pv_criteria_met, major_1, major_2, major_3, minor, sex, hemoglobin_g_dl, hematocrit_percent, increased_red_cell_mass, bone_marrow_panmyelosis, jak2_v617f_or_exon12, subnormal_epo, criteria, citation, disclaimer."},"400":{"description":"invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_hematocrit: hematocrit_percent must be a number from 10 to 70. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/who-pv"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"WHO 2016 PV criteria (bulk)","operationId":"post_api_calc_who_pv","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_hematocrit: hematocrit_percent must be a number from 10 to 70. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/who-pv"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bone_marrow_panmyelosis":"false","hematocrit_percent":"45","hemoglobin_g_dl":"15","increased_red_cell_mass":"false","jak2_v617f_or_exon12":"false","sex":"male","subnormal_epo":"false"},{"bone_marrow_panmyelosis":"false","hematocrit_percent":"45","hemoglobin_g_dl":"15","increased_red_cell_mass":"false","jak2_v617f_or_exon12":"false","sex":"male","subnormal_epo":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/hfa-icos-vegf":{"get":{"description":"Classify Lyon 2020 HFA-ICOS baseline cardiovascular risk for someone scheduled to receive VEGF inhibitors or VEGF TKIs, using that table's very-high, High, Medium 2, and Medium 1 rows.\n\nWhen an agent already has caller-assigned age, sex, LVEF, QTc, and the VEGF-inhibitor table's yes/no factors and needs the published low/medium/high/very-high class plus cardiotoxicity guide. magent does not measure QTc or decide whether to start a VEGF inhibitor.\n\nNot a medical device. Not a treatment, hold, or monitoring order for VEGF inhibitors or VEGF TKIs.\n\nCardiotoxicity percentages are a published guide (low <2%, medium 2-9%, high 10-19%, very high >=20%). The paper states evidence for defining absolute risk is limited.\n\nmagent does not measure QTc, LVEF, troponin, BNP, lipids, eGFR, or BMI, and does not assign vascular disease, arrhythmia, or smoking history.\n\nHypertension, diabetes, hyperlipidemia, CKD, proteinuria, smoking, and obesity are caller-assigned flags matching Lyon 2020 footnotes, not computed from labs.\n\nOne Medium 1 factor remains low risk. Age >=75 is High only. QTc >=480 ms is High only. LVEF <50% is High only. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_years","description":"Integer age in years (18-100) as assigned by the caller. Lyon 2020 VEGF-inhibitor table: >=75 High; 65-74 Medium 1; <65 no age points. Bands are exclusive. magent does not read an identity document.","required":true,"schema":{"type":"integer"},"example":50},{"in":"query","name":"sex","description":"male or female as assigned by the caller. Used only for the sex-specific borderline QTc Medium 2 band (men 450-479 ms; women 460-479 ms).","required":true,"schema":{"type":"string"},"example":"female"},{"in":"query","name":"lvef_percent","description":"Baseline left-ventricular ejection fraction, integer percent 10-80, as assigned by the caller. <50 High; 50-54 Medium 2; >=55 no LVEF points. magent does not read an echocardiogram.","required":true,"schema":{"type":"integer"},"example":60},{"in":"query","name":"qtc_ms","description":"Baseline QTc in milliseconds, integer 300-700, as assigned by the caller. >=480 High; men 450-479 Medium 2; women 460-479 Medium 2. magent does not measure QTc.","required":true,"schema":{"type":"integer"},"example":400},{"in":"query","name":"heart_failure_or_cardiomyopathy","description":"Heart failure or cardiomyopathy (Lyon 2020 VEGF-inhibitor table, very high). Caller-assigned. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"arterial_vascular_disease","description":"Arterial vascular disease: IHD, PCI, CABG, stable angina, TIA, stroke, or PVD as one caller bool (Lyon 2020 VEGF-inhibitor table, very high). true or false. magent does not diagnose vascular disease.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"venous_thrombosis","description":"Venous thrombosis (DVT or PE) as assigned by the caller (Lyon 2020 VEGF-inhibitor table, High). true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"hypertension","description":"Hypertension (SBP >140 mmHg or DBP >90 mmHg, or on treatment) as assigned by the caller (Lyon 2020 VEGF-inhibitor table, High). true or false. magent does not read a blood-pressure cuff.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"prior_anthracycline","description":"Prior anthracycline exposure as assigned by the caller (Lyon 2020 VEGF-inhibitor table, High). true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"arrhythmia","description":"Arrhythmia (atrial fibrillation, atrial flutter, ventricular tachycardia, or ventricular fibrillation) as assigned by the caller (Lyon 2020 VEGF-inhibitor table, Medium 2). true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"elevated_troponin","description":"Elevated baseline troponin above the local laboratory upper limit of normal as assigned by the caller (Lyon 2020 VEGF-inhibitor table, Medium 1). true or false. magent does not assay troponin.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"elevated_bnp","description":"Elevated baseline BNP or NT-proBNP above the local laboratory upper limit of normal as assigned by the caller (Lyon 2020 VEGF-inhibitor table, Medium 1). true or false. magent does not assay BNP.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"diabetes","description":"Diabetes mellitus (glycated haemoglobin >7.0% or >53 mmol/mol, or on treatment) as assigned by the caller (Lyon 2020 VEGF-inhibitor table, Medium 1). true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"hyperlipidemia","description":"Hyperlipidemia (non-HDL cholesterol >3.8 mmol/L or >145 mg/dL) as assigned by the caller (Lyon 2020 VEGF-inhibitor table, Medium 1). true or false. magent does not convert lipid units.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"ckd","description":"Chronic kidney disease (eGFR <60 mL/min/1.73 m2) as assigned by the caller (Lyon 2020 VEGF-inhibitor table, Medium 1). true or false. magent does not compute eGFR.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"proteinuria","description":"Proteinuria as assigned by the caller (Lyon 2020 VEGF-inhibitor table, Medium 1). true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"prior_left_chest_or_mediastinal_rt","description":"Prior radiotherapy to the left chest or mediastinum as assigned by the caller (Lyon 2020 VEGF-inhibitor table, Medium 1). true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"current_or_significant_smoker","description":"Current smoker or significant smoking history as assigned by the caller (Lyon 2020 VEGF-inhibitor table, Medium 1). true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"obesity","description":"Obesity (BMI >30 kg/m2) as assigned by the caller (Lyon 2020 VEGF-inhibitor table, Medium 1). true or false. magent does not compute BMI.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"HFA-ICOS VEGF-inhibitor baseline CV risk","operationId":"get_api_calc_hfa_icos_vegf","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, sex, lvef_percent, qtc_ms, very_high_factor, high_factor, medium_points, risk_level, cardiotoxicity_guide, components, citation, disclaimer."},"400":{"description":"invalid_hfa_icos_vegf: Lyon 2020 HFA-ICOS VEGF-inhibitor inputs must match that table's age, LVEF, QTc, sex, and yes/no factors. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hfa-icos-vegf"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HFA-ICOS VEGF-inhibitor baseline CV risk (bulk)","operationId":"post_api_calc_hfa_icos_vegf","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_hfa_icos_vegf: Lyon 2020 HFA-ICOS VEGF-inhibitor inputs must match that table's age, LVEF, QTc, sex, and yes/no factors. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hfa-icos-vegf"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_years":"50","arrhythmia":"false","arterial_vascular_disease":"false","ckd":"false","current_or_significant_smoker":"false","diabetes":"false","elevated_bnp":"false","elevated_troponin":"false","heart_failure_or_cardiomyopathy":"false","hyperlipidemia":"false","hypertension":"false","lvef_percent":"60","obesity":"false","prior_anthracycline":"false","prior_left_chest_or_mediastinal_rt":"false","proteinuria":"false","qtc_ms":"400","sex":"female","venous_thrombosis":"false"},{"age_years":"50","arrhythmia":"false","arterial_vascular_disease":"false","ckd":"false","current_or_significant_smoker":"false","diabetes":"false","elevated_bnp":"false","elevated_troponin":"false","heart_failure_or_cardiomyopathy":"false","hyperlipidemia":"false","hypertension":"false","lvef_percent":"60","obesity":"false","prior_anthracycline":"false","prior_left_chest_or_mediastinal_rt":"false","proteinuria":"false","qtc_ms":"400","sex":"female","venous_thrombosis":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/lent":{"get":{"description":"Sum the Clive 2014 Table 3 LENT score (pleural fluid LDH, ECOG, serum NLR, tumour type) and return low (0-1), moderate (2-4), or high (5-7).\n\nWhen an agent already has pleural fluid LDH, a caller-assigned ECOG 0-4, a serum NLR number, and a Clive tumour token, and must not invent a diagnosis, treatment order, or survival assignment. magent does not observe the patient or compute NLR from percents.\n\nNot a medical device and not a diagnosis or treatment order. magent does not observe the patient.\n\nClive 2014 Table 3 writes <1500 vs >1500 and <9 vs >9 with no equals. LDH 1500 and NLR 9 are not scored.\n\nMedian survivals 319 / 130 / 44 days are Clive 2014 paper numbers only, not a prognosis assignment.\n\nOken 1982 ECOG 0-4 only. Grade 5 (dead) is not scored. The caller assigns ecog; magent does not convert Karnofsky.\n\nnlr is a number. magent does not compute NLR from neutrophil or lymphocyte percents. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"pleural_ldh_u_l","description":"Pleural fluid LDH in IU/L (1-20000, not 1500). Clive 2014 Table 3: <1500 scores 0, >1500 scores 1. Equality at 1500 is not scored.","required":true,"schema":{"type":"number"},"example":"1000"},{"in":"query","name":"ecog","description":"Oken 1982 ECOG performance status 0-4 as assigned by the caller. Clive 2014: 0→0, 1→1, 2→2, 3-4→3. Grade 5 (dead) is not scored. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"nlr","description":"Serum neutrophil-to-lymphocyte ratio as a number (0.05-200, not 9). Clive 2014 Table 3: <9 scores 0, >9 scores 1. Equality at 9 is not scored. Pass nlr; magent does not compute it from percents.","required":true,"schema":{"type":"number"},"example":"5"},{"in":"query","name":"tumor_type","description":"Clive 2014 tumour type. mesothelioma or haematological (also hematological) scores 0; breast, gynaecological (also gynecological), or renal_cell scores 1; lung or other scores 2. magent does not assign tumour type from histology text.","required":true,"schema":{"type":"string","enum":["mesothelioma","haematological","breast","gynaecological","renal_cell","lung","other"]},"example":"mesothelioma"}],"summary":"LENT","operationId":"get_api_calc_lent","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk, pleural_ldh_u_l, ecog, nlr, tumor_type, components, citation, disclaimer."},"400":{"description":"invalid_lent_ldh: pleural_ldh_u_l must be a number from 1 to 20000 and not 1500 (Clive 2014 LENT uses <1500 vs >1500). Returned before settlement; you are not charged.; invalid_ecog_ps: ecog must be an integer from 0 to 4 (Oken 1982). Grade 5 (dead) is not scored. Returned before settlement; you are not charged.; invalid_lent_nlr: nlr must be a number from 0.05 to 200 and not 9 (Clive 2014 LENT uses <9 vs >9). Returned before settlement; you are not charged.; invalid_lent_tumor: tumor_type must be mesothelioma, haematological, breast, gynaecological, renal_cell, lung, or other (Clive 2014 LENT). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/lent"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"LENT (bulk)","operationId":"post_api_calc_lent","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_lent_ldh: pleural_ldh_u_l must be a number from 1 to 20000 and not 1500 (Clive 2014 LENT uses <1500 vs >1500). Returned before settlement; you are not charged.; invalid_ecog_ps: ecog must be an integer from 0 to 4 (Oken 1982). Grade 5 (dead) is not scored. Returned before settlement; you are not charged.; invalid_lent_nlr: nlr must be a number from 0.05 to 200 and not 9 (Clive 2014 LENT uses <9 vs >9). Returned before settlement; you are not charged.; invalid_lent_tumor: tumor_type must be mesothelioma, haematological, breast, gynaecological, renal_cell, lung, or other (Clive 2014 LENT). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/lent"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ecog":"0","nlr":"5","pleural_ldh_u_l":"1000","tumor_type":"mesothelioma"},{"ecog":"0","nlr":"5","pleural_ldh_u_l":"1000","tumor_type":"mesothelioma"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/promise":{"get":{"description":"Sum the Psallidas 2018 Table 2A clinical PROMISE points (previous chemotherapy and radiotherapy, haemoglobin, WBC, CRP, ECOG, cancer type) and return group A-D 3-month mortality bands.\n\nWhen an agent already has caller-assigned previous chemotherapy and radiotherapy flags, haemoglobin g/dL, serum WBC as 10^9/L, CRP mg/L, ECOG 0-4, and a cancer type token (mesothelioma, lung, or other), and must not invent a diagnosis, pleurodesis or chemotherapy order, or biological PROMISE/TIMP1 result. magent does not assay labs or assign ECOG.\n\nNot a medical device and not a diagnosis or treatment order. magent does not assay labs or assign ECOG.\n\nClinical PROMISE only (Psallidas 2018 Table 2A). Not biological PROMISE. No TIMP1 input.\n\nNot a pleurodesis success score and not a chemotherapy or radiotherapy order.\n\nCRP is mg/L (0-500), not IU/L. magent does not convert CRP units.\n\n3-month mortality percents are published Table 2A group bands, not a prognosis assignment.\n\nThe caller assigns chemotherapy, radiotherapy, ECOG 0-4, and cancer type (mesothelioma, lung, or other). magent does not convert Karnofsky or assign cancer type from histology text. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"chemotherapy","description":"Previous chemotherapy as assigned by the caller (Psallidas 2018 Table 2A). true or false. true scores 4; false scores 0. Not a chemotherapy order. magent does not read a treatment history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"radiotherapy","description":"Previous radiotherapy as assigned by the caller (Psallidas 2018 Table 2A). true or false. true scores 2; false scores 0. Not a radiotherapy order. magent does not read a treatment history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"haemoglobin_g_dl","description":"Haemoglobin in g/dL (3-25). Psallidas 2018 Table 2A: ≥16 scores 0; 14 to <16 scores 1; 12 to <14 scores 2; 10 to <12 scores 3; <10 scores 4. Caller-supplied; magent does not assay haemoglobin.","required":true,"schema":{"type":"number"},"example":"15.0"},{"in":"query","name":"wbc","description":"Serum white cell count as 10^9/L (0.1-80). Psallidas 2018 Table 2A: <4 scores 0; 4 to <6.3 scores 2; 6.3 to <10 scores 4; 10 to <15.8 scores 7; ≥15.8 scores 10. Caller-supplied; magent does not assay WBC.","required":true,"schema":{"type":"number"},"example":"8.0"},{"in":"query","name":"crp_mg_l","description":"Serum CRP in mg/L (0-500), not IU/L. Psallidas 2018 Table 2A: <3 scores 0; 3 to <10 scores 3; 10 to <32 scores 5; 32 to <100 scores 8; ≥100 scores 11. Caller-supplied; magent does not assay CRP or convert IU/L.","required":true,"schema":{"type":"number"},"example":"20"},{"in":"query","name":"ecog","description":"Oken 1982 ECOG performance status 0-4 as assigned by the caller. Psallidas 2018 Table 2A: 0-1 scores 0; 2-4 scores 7. Grade 5 (dead) is not scored. magent does not observe the patient or convert Karnofsky.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"cancer_type","description":"Psallidas 2018 Table 2A cancer type as assigned by the caller. mesothelioma scores 0; other scores 4; lung scores 5. magent does not assign cancer type from histology text.","required":true,"schema":{"type":"string","enum":["mesothelioma","lung","other"]},"example":"other"}],"summary":"PROMISE","operationId":"get_api_calc_promise","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, group, three_month_mortality, chemotherapy, radiotherapy, haemoglobin_g_dl, wbc, crp_mg_l, ecog, cancer_type, components, citation, disclaimer."},"400":{"description":"invalid_promise: Clinical PROMISE needs Psallidas 2018 chemotherapy, radiotherapy, haemoglobin, WBC, CRP, ECOG, and cancer type in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/promise"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PROMISE (bulk)","operationId":"post_api_calc_promise","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_promise: Clinical PROMISE needs Psallidas 2018 chemotherapy, radiotherapy, haemoglobin, WBC, CRP, ECOG, and cancer type in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/promise"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"cancer_type":"other","chemotherapy":"false","crp_mg_l":"20","ecog":"0","haemoglobin_g_dl":"15.0","radiotherapy":"false","wbc":"8.0"},{"cancer_type":"other","chemotherapy":"false","crp_mg_l":"20","ecog":"0","haemoglobin_g_dl":"15.0","radiotherapy":"false","wbc":"8.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-child-constipation":{"get":{"description":"Apply the Hyams 2016 Rome IV H3a functional constipation (child/adolescent) criteria and return features_met and whether the published child constipation box holds (rome_iv_child_constipation).\n\nWhen an agent already has the caller-assigned Hyams 2016 Rome IV H3a flags (developmental age at least 4 years, 1-month duration, the six constipation features, insufficient criteria for IBS, and not explained by another condition, including digital rectal exam as large_fecal_mass_in_rectum) and needs whether the published child/adolescent functional constipation box holds. magent does not examine the child.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose child functional constipation.\n\nThe caller assigns the flags, including large_fecal_mass_in_rectum (digital rectal exam is caller-assigned). magent does not examine the child.\n\nThis tool is Hyams 2016 Rome IV H3a functional constipation (child/adolescent, developmental age at least 4 years) only. Not infant G7 (Benninga 2016). Not adult Rome IV FC (Mearin 2016 C2).\n\nfeatures_met always counts a fixed six-item list. Toilet-trained extras from G7 are not used. Weekly frequency is folded into the six feature flags (caller-assigned). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"developmental_age_at_least_4_years","description":"Developmental age at least 4 years, as assigned (Hyams 2016 Rome IV H3a child/adolescent). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"two_or_fewer_defecations_in_toilet_per_week","description":"Two or fewer defecations in the toilet per week, as assigned (Hyams 2016 Rome IV H3a; one of six features; weekly frequency is folded into this flag). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"fecal_incontinence_at_least_weekly","description":"At least one episode of fecal incontinence per week, as assigned (Hyams 2016 Rome IV H3a; one of six features; weekly frequency is folded into this flag). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"retentive_posturing_or_excessive_volitional_stool_retention","description":"History of retentive posturing or excessive volitional stool retention, as assigned (Hyams 2016 Rome IV H3a; one of six features; weekly frequency is folded into this flag). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"painful_or_hard_bowel_movements","description":"History of painful or hard bowel movements, as assigned (Hyams 2016 Rome IV H3a; one of six features; weekly frequency is folded into this flag). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"large_fecal_mass_in_rectum","description":"Presence of a large fecal mass in the rectum, as assigned (Hyams 2016 Rome IV H3a; one of six features; digital rectal exam is caller-assigned). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"large_diameter_stools_that_can_obstruct_toilet","description":"History of large-diameter stools that can obstruct the toilet, as assigned (Hyams 2016 Rome IV H3a; one of six features; weekly frequency is folded into this flag). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"duration_at_least_1_month","description":"Must include 1 month of at least 2 features occurring at least once per week, as assigned (Hyams 2016 Rome IV H3a). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"insufficient_criteria_for_ibs","description":"Insufficient criteria for irritable bowel syndrome, as assigned (Hyams 2016 Rome IV H3a). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"not_explained_by_another_condition","description":"After appropriate evaluation, the symptoms cannot be fully explained by another medical condition, as assigned (Hyams 2016 Rome IV H3a). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV Child Constipation","operationId":"get_api_calc_rome_iv_child_constipation","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, features_met, rome_iv_child_constipation, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_child_constipation: Rome IV child functional constipation needs the Hyams 2016 child/adolescent H3a flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-child-constipation"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV Child Constipation (bulk)","operationId":"post_api_calc_rome_iv_child_constipation","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_child_constipation: Rome IV child functional constipation needs the Hyams 2016 child/adolescent H3a flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-child-constipation"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"developmental_age_at_least_4_years":"true","duration_at_least_1_month":"true","fecal_incontinence_at_least_weekly":"false","insufficient_criteria_for_ibs":"true","large_diameter_stools_that_can_obstruct_toilet":"false","large_fecal_mass_in_rectum":"false","not_explained_by_another_condition":"true","painful_or_hard_bowel_movements":"true","retentive_posturing_or_excessive_volitional_stool_retention":"false","two_or_fewer_defecations_in_toilet_per_week":"true"},{"developmental_age_at_least_4_years":"true","duration_at_least_1_month":"true","fecal_incontinence_at_least_weekly":"false","insufficient_criteria_for_ibs":"true","large_diameter_stools_that_can_obstruct_toilet":"false","large_fecal_mass_in_rectum":"false","not_explained_by_another_condition":"true","painful_or_hard_bowel_movements":"true","retentive_posturing_or_excessive_volitional_stool_retention":"false","two_or_fewer_defecations_in_toilet_per_week":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/meld":{"get":{"description":"Compute the Kamath 2001 model for end-stage liver disease (MELD) integer from creatinine, bilirubin, INR, and cholestatic or alcoholic etiology.\n\nWhen an agent needs the published Kamath 2001 MELD integer and must not apply UNOS lab floors, add dialysis, invent a listing order, or substitute MELD-Na.\n\nNot a medical device.\n\nNot a transplant listing or allocation order.\n\nKamath 2001 original MELD only. This is not MELD-Na (OPTN 2016) and not MELD 3.0.\n\nDoes not floor bilirubin, INR, or creatinine at 1.0. Those floors are later UNOS/OPTN, not this paper. Kamath tables include bilirubin 0.8.\n\nDoes not include dialysis. Dialysis is not in Kamath 2001.\n\nDoes not include sodium. That is MELD-Na. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"creatinine_mg_dl","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l, not both. Kamath 2001 does not floor creatinine at 1.0 and does not include dialysis.","required":false,"schema":{"type":"number"},"example":"1.9"},{"in":"query","name":"creatinine_umol_l","description":"Serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42.","required":false,"schema":{"type":"number"},"example":"168"},{"in":"query","name":"bilirubin_mg_dl","description":"Total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l. Kamath 2001 tables include bilirubin 0.8; magent does not floor at 1.0.","required":false,"schema":{"type":"number"},"example":"4.2"},{"in":"query","name":"bilirubin_umol_l","description":"Total bilirubin in µmol/L (2-684). Converted as mg/dL = µmol/L / 17.1.","required":false,"schema":{"type":"number"},"example":"71.82"},{"in":"query","name":"inr","description":"International normalized ratio (0.8-10). Kamath 2001 does not floor INR at 1.0.","required":true,"schema":{"type":"number"},"example":"1.2"},{"in":"query","name":"cholestatic_or_alcoholic","description":"true if the liver disease is cholestatic or alcoholic (etiology 0); false otherwise (etiology 1).","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"MELD","operationId":"get_api_calc_meld","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, creatinine_mg_dl, bilirubin_mg_dl, inr, cholestatic_or_alcoholic, etiology, meld, citation, disclaimer."},"400":{"description":"invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_bilirubin: bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.; invalid_inr: inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/meld"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"MELD (bulk)","operationId":"post_api_calc_meld","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_bilirubin: bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.; invalid_inr: inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/meld"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bilirubin_mg_dl":"4.2","cholestatic_or_alcoholic":"true","creatinine_mg_dl":"1.9","inr":"1.2"},{"bilirubin_mg_dl":"4.2","cholestatic_or_alcoholic":"true","creatinine_mg_dl":"1.9","inr":"1.2"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/gad-7":{"get":{"description":"Sum seven caller-assigned Spitzer 2006 GAD-7 integers (0-3) and return the published 0-21 total, 5/10/15 severity cuts, and ≥10 case-finding flag.\n\nWhen an agent has already assigned the seven Spitzer 2006 item scores and needs the published GAD-7 total, severity cuts, and ≥10 case-finding flag, not a diagnosis, PHQ-9, or GAD-2.\n\nNot a medical device and not a GAD diagnosis.\n\nnervous, control_worry, worry_too_much, relaxing, restless, irritable, and afraid are caller-assigned integers 0-3 (0 not at all, 1 several days, 2 more than half the days, 3 nearly every day). magent does not interpret the items.\n\nCut points are Spitzer 2006 5 / 10 / 15 (mild / moderate / severe). Scores 0-4 are below the mild cut of 5 and return severity minimal; that is not an extra named class in the paper.\n\ncase_finding_ge_10 is this paper's GAD-7 ≥10 operating point (sensitivity 89% and specificity 82% for GAD). Not a treatment order. Not PHQ-9. Not GAD-2. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"nervous","description":"Caller-assigned Spitzer 2006 GAD-7 item 1 points (integer 0-3): feeling nervous, anxious, or on edge. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"control_worry","description":"Caller-assigned Spitzer 2006 GAD-7 item 2 points (integer 0-3): not being able to stop or control worrying. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"worry_too_much","description":"Caller-assigned Spitzer 2006 GAD-7 item 3 points (integer 0-3): worrying too much about different things. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"relaxing","description":"Caller-assigned Spitzer 2006 GAD-7 item 4 points (integer 0-3): trouble relaxing. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"restless","description":"Caller-assigned Spitzer 2006 GAD-7 item 5 points (integer 0-3): being so restless that it is hard to sit still. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"irritable","description":"Caller-assigned Spitzer 2006 GAD-7 item 6 points (integer 0-3): becoming easily annoyed or irritable. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"afraid","description":"Caller-assigned Spitzer 2006 GAD-7 item 7 points (integer 0-3): feeling afraid as if something awful might happen. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"GAD-7","operationId":"get_api_calc_gad_7","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, severity, case_finding_ge_10, components, citation, disclaimer."},"400":{"description":"invalid_gad7_item: each GAD-7 item must be an integer from 0 to 3 (Spitzer 2006: 0 not at all, 1 several days, 2 more than half the days, 3 nearly every day). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gad-7"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"GAD-7 (bulk)","operationId":"post_api_calc_gad_7","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_gad7_item: each GAD-7 item must be an integer from 0 to 3 (Spitzer 2006: 0 not at all, 1 several days, 2 more than half the days, 3 nearly every day). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gad-7"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"afraid":"0","control_worry":"0","irritable":"0","nervous":"0","relaxing":"0","restless":"0","worry_too_much":"0"},{"afraid":"0","control_worry":"0","irritable":"0","nervous":"0","relaxing":"0","restless":"0","worry_too_much":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/cp-aki":{"get":{"description":"Sum the Gupta 2024 Figure 2 simple integer/half-integer points for severe CP-AKI after a first intravenous cisplatin dose and return low, moderate, high, or very_high.\n\nWhen an agent already has caller-assigned age, hypertension, diabetes, smoking, hemoglobin, WBC, albumin, magnesium, and first cisplatin dose in mg and needs the published Figure 2 point total. magent does not assay labs or dose cisplatin.\n\nNot a medical device and not a diagnosis of AKI, CKD, or cisplatin toxicity. Not a chemotherapy order, dose reduction, or hydration protocol.\n\nThis is the Gupta 2024 Figure 2 simple integer/half-integer score only (range 0–22.5). It is not the restricted-cubic-spline logistic primary model.\n\nSerum creatinine is omitted from the simple score for parsimony (Gupta 2024). Platelets are in the primary model and are not Figure 2 points. Current or former smoking is a simple-score covariate (BMJ 2024;385:q1207).\n\nmagent does not assay hemoglobin, WBC, albumin, or magnesium and does not dose cisplatin. Values are caller-assigned. Use paper units (hemoglobin g/L, albumin g/L, magnesium mmol/L) or the documented dual-unit aliases.\n\nFigure 3 groups are low 0–5.5, moderate 6–9.5, high 10–15.5, very_high ≥16. Published CP-AKI incidence was 1.3% (low) to 23.5% (very high) in derivation and 1.1% to 16.7% in validation. Those cohort rates are not a patient-specific probability. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120). Gupta 2024 Figure 2: ≤45 scores 0; 46-60 scores 2.5; 61-70 scores 3.5; >70 scores 4.5.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"hypertension","description":"Caller-assigned hypertension (Gupta 2024 Figure 2). true scores 1. magent does not diagnose hypertension.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"diabetes","description":"Caller-assigned diabetes mellitus (Gupta 2024 Figure 2). true scores 1. magent does not diagnose diabetes.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"current_or_former_smoker","description":"Caller-assigned current or former smoker (Gupta 2024 Figure 2 simple score; BMJ 2024;385:q1207). true scores 1. magent does not take a smoking history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hemoglobin_g_l","description":"Hemoglobin in g/L (30-220), Gupta 2024 units. Provide this or hemoglobin_g_dl, not both. ≥120 scores 0; 110-119 scores 1; <110 scores 1.5. magent does not assay hemoglobin.","required":false,"schema":{"type":"number"},"example":"130"},{"in":"query","name":"hemoglobin_g_dl","description":"Hemoglobin in g/dL (3-22). Converted as hemoglobin_g_l = hemoglobin_g_dl × 10. Provide this or hemoglobin_g_l, not both.","required":false,"schema":{"type":"number"},"example":"13"},{"in":"query","name":"wbc_k_ul","description":"White blood cell count in 10^9/L (0.01-500), same as k/µL. Provide this or wbc_ul, not both. ≤12.0 scores 0; >12.0 scores 1.5 (Gupta 2024 Figure 2). magent does not assay WBC.","required":false,"schema":{"type":"number"},"example":"8"},{"in":"query","name":"wbc_ul","description":"White blood cell count per µL (10-500000). Converted as wbc_10e9_l = wbc_ul / 1000. Provide this or wbc_k_ul, not both.","required":false,"schema":{"type":"number"},"example":"8000"},{"in":"query","name":"albumin_g_l","description":"Serum albumin in g/L (10-60), Gupta 2024 units. Provide this or albumin_g_dl, not both. >38 scores 0; 33-38 scores 1; <33 scores 1.5. magent does not assay albumin.","required":false,"schema":{"type":"number"},"example":"42"},{"in":"query","name":"albumin_g_dl","description":"Serum albumin in g/dL (1-6). Converted as albumin_g_l = albumin_g_dl × 10. Provide this or albumin_g_l, not both.","required":false,"schema":{"type":"number"},"example":"4.2"},{"in":"query","name":"magnesium_mmol_l","description":"Serum magnesium in mmol/L (0.2-2.5), Gupta 2024 units. ≥0.82 scores 0; <0.82 scores 1. magent does not assay magnesium.","required":true,"schema":{"type":"number"},"example":"0.90"},{"in":"query","name":"cisplatin_dose_mg","description":"First intravenous cisplatin dose in mg (1-500), Gupta 2024 Figure 2. ≤50 scores 0; 51-75 scores 2; 76-100 scores 2.5; 101-125 scores 3; 126-150 scores 5; 151-200 scores 7.5; >200 scores 9.5. magent does not dose cisplatin.","required":true,"schema":{"type":"number"},"example":"50"}],"summary":"CP-AKI simple score","operationId":"get_api_calc_cp_aki","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk_group, age, hemoglobin_g_l, wbc_10e9_l, albumin_g_l, magnesium_mmol_l, cisplatin_dose_mg, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_magnesium_mmol: magnesium_mmol_l must be a number from 0.2 to 2.5 (Gupta 2024 CP-AKI serum magnesium mmol/L). Returned before settlement; you are not charged.; invalid_cisplatin_dose_mg: cisplatin_dose_mg must be a number from 1 to 500 (Gupta 2024 CP-AKI first intravenous cisplatin dose mg). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cp-aki"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CP-AKI simple score (bulk)","operationId":"post_api_calc_cp_aki","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_magnesium_mmol: magnesium_mmol_l must be a number from 0.2 to 2.5 (Gupta 2024 CP-AKI serum magnesium mmol/L). Returned before settlement; you are not charged.; invalid_cisplatin_dose_mg: cisplatin_dose_mg must be a number from 1 to 500 (Gupta 2024 CP-AKI first intravenous cisplatin dose mg). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cp-aki"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","albumin_g_l":"42","cisplatin_dose_mg":"50","current_or_former_smoker":"false","diabetes":"false","hemoglobin_g_l":"130","hypertension":"false","magnesium_mmol_l":"0.90","wbc_k_ul":"8"},{"age":"40","albumin_g_l":"42","cisplatin_dose_mg":"50","current_or_former_smoker":"false","diabetes":"false","hemoglobin_g_l":"130","hypertension":"false","magnesium_mmol_l":"0.90","wbc_k_ul":"8"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/peg":{"get":{"description":"Compute the Krebs 2009 PEG as the unweighted mean of three caller-assigned 0-10 integers (pain_average, enjoyment_of_life, general_activity). Potential range 0-10. Krebs 2009 did not publish a diagnostic cutoff.\n\nWhen an agent has already assigned Krebs 2009 PEG integers 0-10 for average pain, enjoyment-of-life interference, and general-activity interference in the past week and needs the published mean, not a pain diagnosis, opioid order, Brief Pain Inventory total, or an invented severity band.\n\nNot a medical device and not a pain diagnosis or opioid order.\n\nEach item is a caller-assigned integer 0-10. magent does not interview the patient.\n\nKrebs 2009 did not publish a diagnostic cutoff. magent does not invent mild, moderate, or severe bands.\n\nThis is the three-item PEG mean, not the full Brief Pain Inventory. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"pain_average","description":"Caller-assigned Krebs 2009 PEG item (integer 0-10): \"What number best describes your pain on average in the past week?\" 0 = no pain, 10 = pain as bad as you can imagine. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"enjoyment_of_life","description":"Caller-assigned Krebs 2009 PEG interference with enjoyment of life in the past week (integer 0-10). 0 = does not interfere, 10 = completely interferes. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"general_activity","description":"Caller-assigned Krebs 2009 PEG interference with general activity in the past week (integer 0-10). 0 = does not interfere, 10 = completely interferes. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"PEG","operationId":"get_api_calc_peg","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, pain_average, enjoyment_of_life, general_activity, citation, disclaimer."},"400":{"description":"invalid_peg_item: pain_average, enjoyment_of_life, and general_activity must each be an integer from 0 to 10 (Krebs 2009 PEG). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/peg"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PEG (bulk)","operationId":"post_api_calc_peg","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_peg_item: pain_average, enjoyment_of_life, and general_activity must each be an integer from 0 to 10 (Krebs 2009 PEG). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/peg"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"enjoyment_of_life":"0","general_activity":"0","pain_average":"0"},{"enjoyment_of_life":"0","general_activity":"0","pain_average":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/ready":{"get":{"summary":"Readiness probe","operationId":"get_ready","responses":{"200":{"description":"Ready. Includes vm_rss_kb versus the VM limit."},"503":{"description":"Not ready: schema_missing, database_read_only, database_unavailable, scheme_unsupported, or memory_pressure."}},"security":[]}},"/api/calc/cfs":{"get":{"description":"Return the Rockwood 2005 CSHA Clinical Frailty Scale 1-7 from a caller-assigned integer, with the published Box 1 description.\n\nWhen an agent already has a CSHA Clinical Frailty Scale 1-7 as in Rockwood 2005 Box 1 and must not invent the later 9-point CFS or CFS 2.0 labels.\n\nNot a medical device and not a diagnosis. magent does not examine the patient.\n\nRockwood 2005 7-point CSHA Clinical Frailty Scale only. magent does not implement the later 9-point CFS (8 very severely frail, 9 terminally ill) or CFS 2.0 label changes.\n\nThe caller assigns cfs 1-7. magent does not interview or examine the patient. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"cfs","description":"Rockwood 2005 CSHA Clinical Frailty Scale 1-7 as assigned by the caller (1 very fit; 2 well; 3 well, with treated comorbid disease; 4 apparently vulnerable; 5 mildly frail; 6 moderately frail; 7 severely frail, completely dependent or terminally ill). magent does not examine the patient. The later 9-point CFS (8 very severely frail, 9 terminally ill) is not accepted.","required":true,"schema":{"type":"integer"},"example":"1"}],"summary":"CFS","operationId":"get_api_calc_cfs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, cfs, score, max_score, description, components, citation, disclaimer."},"400":{"description":"invalid_cfs: cfs must be an integer from 1 to 7 (Rockwood 2005 CSHA Clinical Frailty Scale). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cfs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CFS (bulk)","operationId":"post_api_calc_cfs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_cfs: cfs must be an integer from 1 to 7 (Rockwood 2005 CSHA Clinical Frailty Scale). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cfs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"cfs":"1"},{"cfs":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/stone-score":{"get":{"description":"Sum the Moore 2014 STONE score for uncomplicated ureteral stone from five caller-assigned Table 3 items and return the 0-13 total plus low (0-5), moderate (6-9), or high (10-13) probability.\n\nWhen an agent has caller-assigned sex, pain timing, origin as used in Moore 2014, nausea, and dipstick hematuria for suspected uncomplicated ureteral stone in the emergency department and needs the published STONE total and band, not a CT order, stone diagnosis, or S.T.O.N.E. nephrolithometry.\n\nNot a medical device. Not a CT order or a ureteral stone diagnosis.\n\nOrigin is caller-assigned as used in Moore 2014 Table 3 (Race: Black 0, Non-black 3). magent does not assign race.\n\nSex, timing, nausea, and hematuria are caller-assigned. magent does not take a history, assign sex, read a dipstick, or order imaging.\n\nNot S.T.O.N.E. nephrolithometry (Okhunov 2013) for kidney calculi / PCNL. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sex","description":"Caller-assigned sex (Moore 2014 Table 3). female scores 0; male scores 2. magent does not assign sex.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"timing","description":"Caller-assigned duration of pain to presentation (Moore 2014 Table 3). gt_24h scores 0; 6_to_24h scores 1; lt_6h scores 3. magent does not timestamp onset.","required":true,"schema":{"type":"string","enum":["gt_24h","6_to_24h","lt_6h"]},"example":"lt_6h"},{"in":"query","name":"origin","description":"Caller-assigned origin as used in Moore 2014 Table 3 (Race: Black 0, Non-black 3). black scores 0; nonblack scores 3. magent does not assign race.","required":true,"schema":{"type":"string","enum":["black","nonblack"]},"example":"nonblack"},{"in":"query","name":"nausea","description":"Caller-assigned nausea (Moore 2014 Table 3). none scores 0; nausea_alone scores 1; vomiting scores 2 (Table 3 vomiting alone). If vomiting is present use vomiting even if nausea is also present. magent does not take a history.","required":true,"schema":{"type":"string","enum":["none","nausea_alone","vomiting"]},"example":"vomiting"},{"in":"query","name":"hematuria","description":"Caller-assigned erythrocytes / hematuria on urine dipstick (Moore 2014 Table 3). false (absent) scores 0; true (present) scores 3. Binary dipstick as in Table 3, not graded RBC counts. magent does not read a dipstick.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"STONE score","operationId":"get_api_calc_stone_score","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, probability, derivation_stone_percent, sex, timing, origin, nausea, hematuria, components, citation, disclaimer."},"400":{"description":"invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_stone_score: STONE inputs must match Moore 2014 sex, timing, origin, nausea, and dipstick hematuria. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/stone-score"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"STONE score (bulk)","operationId":"post_api_calc_stone_score","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_stone_score: STONE inputs must match Moore 2014 sex, timing, origin, nausea, and dipstick hematuria. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/stone-score"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"hematuria":"true","nausea":"vomiting","origin":"nonblack","sex":"male","timing":"lt_6h"},{"hematuria":"true","nausea":"vomiting","origin":"nonblack","sex":"male","timing":"lt_6h"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/perc":{"get":{"description":"Apply the Kline 2004 eight-factor pulmonary embolism rule-out criteria and return whether all eight are met (PERC-negative).\n\nWhen an agent already has a low pretest probability of PE, as in the derivation paper, and needs a published PERC-negative result from caller-assigned findings.\n\nNot a diagnosis and not a D-dimer protocol.\n\nOnly for patients who already have a low pretest probability of pulmonary embolism, as in the derivation paper. magent does not assign pretest probability.\n\nThe caller assigns age, pulse, SaO2, and the five clinical flags. magent does not examine the patient.\n\nThis tool is the Kline 2004 derivation rule. Altitude-adjusted PERC is not this tool. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Criterion met when age < 50; 50 does not meet.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"heart_rate_bpm","description":"Pulse in beats per minute (integer 30-220). Criterion met when pulse < 100; 100 does not meet.","required":true,"schema":{"type":"integer"},"example":"80"},{"in":"query","name":"spo2_percent","description":"Oxygen saturation percent (50-100). Criterion met when SaO2 > 94; 94 does not meet.","required":true,"schema":{"type":"number"},"example":"98"},{"in":"query","name":"unilateral_leg_swelling","description":"Unilateral leg swelling. true or false as assigned by the caller. Criterion met when false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hemoptysis","description":"Hemoptysis. true or false as assigned by the caller. Criterion met when false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"recent_surgery_or_trauma","description":"Recent trauma or surgery. true or false as assigned by the caller. Criterion met when false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"prior_vte","description":"Prior PE or DVT. true or false as assigned by the caller. Criterion met when false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"estrogen_use","description":"Hormone or exogenous estrogen use. true or false as assigned by the caller. Criterion met when false.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"PERC rule","operationId":"get_api_calc_perc","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, perc_negative, criteria, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/perc"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PERC rule (bulk)","operationId":"post_api_calc_perc","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/perc"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","estrogen_use":"false","heart_rate_bpm":"80","hemoptysis":"false","prior_vte":"false","recent_surgery_or_trauma":"false","spo2_percent":"98","unilateral_leg_swelling":"false"},{"age":"40","estrogen_use":"false","heart_rate_bpm":"80","hemoptysis":"false","prior_vte":"false","recent_surgery_or_trauma":"false","spo2_percent":"98","unilateral_leg_swelling":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/up-to-7":{"get":{"description":"Apply Mazzaferro 2009 Up-to-seven criteria and return whether tumor_count plus largest_cm is 7 or less without microvascular invasion (meets_up_to_seven).\n\nWhen an agent already has tumor count, largest diameter in centimetres, and a microvascular-invasion flag as in Mazzaferro 2009, and needs the published Up-to-seven eligibility result. magent does not interpret imaging or histology.\n\nNot a medical device.\n\nNot a transplant listing or organ-allocation order.\n\nPathology/explant-style inputs as assigned by the caller. magent does not interpret imaging or histology.\n\nThis tool is Mazzaferro 2009 Up-to-seven criteria only. Not Milan criteria and not Metroticket 2.0 AFP-adjusted-to-HCC-size criteria.\n\nNot a website contour calculator.\n\nDoes not output a survival percentage. The paper's 71.2% 5-year overall survival subgroup was patients without microvascular invasion who fell within up-to-seven; this tool returns the boolean criteria result only. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"tumor_count","description":"Number of HCC nodules (integer 1-20) as assigned by the caller. Added to largest_cm as size_number_sum. The Up-to-seven ceiling is size_number_sum <= 7. magent does not interpret imaging or histology.","required":true,"schema":{"type":"integer"},"example":"3"},{"in":"query","name":"largest_cm","description":"Largest tumor diameter in centimetres (0.1-30) as assigned by the caller. Added to tumor_count as size_number_sum. Equality at 7.0 meets; 7.1 fails. magent does not interpret imaging or histology.","required":true,"schema":{"type":"number"},"example":"4"},{"in":"query","name":"microvascular_invasion","description":"Microvascular invasion as assigned by the caller (pathology/explant-style). true fails Up-to-seven even when size_number_sum is 7 or less. true or false. magent does not interpret imaging or histology.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Up-to-seven","operationId":"get_api_calc_up_to_7","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, meets_up_to_seven, size_number_sum, tumor_count, largest_cm, microvascular_invasion, criteria, citation, disclaimer."},"400":{"description":"invalid_tumor_count: tumor_count must be an integer from 1 to 20 (Mazzaferro 1996). Returned before settlement; you are not charged.; invalid_largest_cm: largest_cm must be a number from 0.1 to 30 (Mazzaferro 1996). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/up-to-7"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Up-to-seven (bulk)","operationId":"post_api_calc_up_to_7","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_tumor_count: tumor_count must be an integer from 1 to 20 (Mazzaferro 1996). Returned before settlement; you are not charged.; invalid_largest_cm: largest_cm must be a number from 0.1 to 30 (Mazzaferro 1996). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/up-to-7"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"largest_cm":"4","microvascular_invasion":"false","tumor_count":"3"},{"largest_cm":"4","microvascular_invasion":"false","tumor_count":"3"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/findrisc":{"get":{"description":"Sum the original Lindström 2003 seven-item Finnish diabetes risk score (FINDRISC, 0–20) and return at_risk when the total is ≥9.\n\nWhen an agent needs the published 2003 FINDRISC point total and must not invent a type 2 diabetes diagnosis or a later family-history revision.\n\nNot a medical device. magent does not diagnose type 2 diabetes or assay glucose.\n\nOriginal Lindström 2003 seven-item score 0–20, cutoff ≥9. Not the later 0–26 / family-history / eight-item FINDRISC revision. No family-history field.\n\nat_risk is score ≥9 from that paper, not a diabetes diagnosis and not a 10-year diabetes probability.\n\nBMI 25.0 and 30.0 score in the middle band (1). Waist 94 and 102 cm (men) and 80 and 88 cm (women) score in the middle band (3).\n\nBMI is caller-supplied kg/m^2. magent does not compute BMI from height and weight. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Lindström 2003: <45 scores 0; 45-54 scores 2; 55-64 scores 3; ≥65 scores 4. Age 45 and 54 score 2; 55 and 64 score 3; 65 scores 4.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"bmi_kg_m2","description":"Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI from height and weight. Lindström 2003: <25 scores 0; 25-30 scores 1; >30 scores 3. 25.0 and 30.0 score 1; 30.1 scores 3.","required":true,"schema":{"type":"number"},"example":"22"},{"in":"query","name":"sex","description":"female or male. Selects the Lindström 2003 waist bands.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"waist_cm","description":"Waist circumference in cm (40-200). Lindström 2003 men: <94 scores 0; 94-102 scores 3; >102 scores 4. Women: <80 scores 0; 80-88 scores 3; >88 scores 4. 94 and 102 (men) and 80 and 88 (women) score 3.","required":true,"schema":{"type":"number"},"example":"80"},{"in":"query","name":"bp_medication","description":"History of antihypertensive drug treatment (Lindström 2003). true scores 2; false scores 0.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"history_high_glucose","description":"History of high blood glucose (health examination, illness, or pregnancy) (Lindström 2003). Caller-assigned; magent does not assay glucose. true scores 5; false scores 0.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"activity_30min","description":"Usually at least 30 minutes of physical activity daily at work and/or leisure, including normal daily activity (Lindström 2003). true scores 0; false scores 2.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"daily_vegetables","description":"Daily consumption of vegetables, fruit, or berries (Lindström 2003). true scores 0; false scores 1.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"FINDRISC","operationId":"get_api_calc_findrisc","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, at_risk, age_years, bmi_kg_m2, sex, waist_cm, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_waist_range: waist_cm must be a number from 40 to 200. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/findrisc"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"FINDRISC (bulk)","operationId":"post_api_calc_findrisc","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_waist_range: waist_cm must be a number from 40 to 200. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/findrisc"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"activity_30min":"true","age":"40","bmi_kg_m2":"22","bp_medication":"false","daily_vegetables":"true","history_high_glucose":"false","sex":"male","waist_cm":"80"},{"activity_30min":"true","age":"40","bmi_kg_m2":"22","bp_medication":"false","daily_vegetables":"true","history_high_glucose":"false","sex":"male","waist_cm":"80"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/nci-ctc-mucositis":{"get":{"description":"Apply NCI CTC v2.0 Mucositis due to radiation (Trotti 2000; CTC 30 April 1999) and return grade 0–4 from a caller-assigned mucosal appearance token. magent does not examine the mucosa.\n\nWhen an agent already has a caller-assigned NCI CTC v2.0 radiation mucositis appearance (none, erythema, patchy_pseudomembrane, confluent_pseudomembrane, or necrosis_or_deep_ulcer) and needs the published grade. Not CTC stomatitis/pharyngitis (chemotherapy oral mucositis), not CTCAE v3/v4/v5, and not WHO mucositis.\n\nNot a medical device.\n\nNot a diagnosis. magent does not examine the mucosa. The caller assigns appearance.\n\nNCI CTC v2.0 Mucositis due to radiation (30 April 1999) only. Not CTC stomatitis or pharyngitis (chemotherapy oral mucositis) grades.\n\nNot CTCAE v3, v4, or v5 mucositis.\n\nNot WHO mucositis.\n\nGrade 5 (death related to toxicity) is not a token. This tool maps appearance to grades 0–4 only. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"appearance","description":"NCI CTC v2.0 Mucositis due to radiation appearance as assigned by the caller: none (grade 0), erythema (grade 1, erythema of the mucosa), patchy_pseudomembrane (grade 2, patchy pseudomembranous reaction, patches generally ≤1.5 cm and noncontiguous), confluent_pseudomembrane (grade 3, confluent pseudomembranous reaction, contiguous patches generally >1.5 cm), or necrosis_or_deep_ulcer (grade 4, necrosis or deep ulceration; may include bleeding not induced by minor trauma or abrasion). Case-insensitive. Not CTC stomatitis/pharyngitis. magent does not examine the mucosa.","required":true,"schema":{"type":"string"},"example":"erythema"}],"summary":"NCI CTC mucositis","operationId":"get_api_calc_nci_ctc_mucositis","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, appearance, grade, description, criteria, citation, disclaimer."},"400":{"description":"invalid_mucositis_appearance: appearance must be none, erythema, patchy_pseudomembrane, confluent_pseudomembrane, or necrosis_or_deep_ulcer (NCI CTC v2.0 Mucositis due to radiation). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nci-ctc-mucositis"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"NCI CTC mucositis (bulk)","operationId":"post_api_calc_nci_ctc_mucositis","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_mucositis_appearance: appearance must be none, erythema, patchy_pseudomembrane, confluent_pseudomembrane, or necrosis_or_deep_ulcer (NCI CTC v2.0 Mucositis due to radiation). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nci-ctc-mucositis"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"appearance":"erythema"},{"appearance":"erythema"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mehran":{"get":{"description":"Sum the Mehran 2004 eGFR model B integer score for contrast-induced nephropathy after PCI and return low (≤5), moderate (6–10), high (11–15), or very_high (≥16) with the development-set CIN percent.\n\nWhen an agent already has caller-assigned hypotension, IABP, CHF, anemia, diabetes, contrast volume, and eGFR and needs the published Mehran 2004 point total. magent does not measure contrast or compute eGFR. Not a CKD diagnosis.\n\nNot a medical device and not a CKD diagnosis or a diagnosis of contrast-induced nephropathy.\n\nmagent does not measure contrast. contrast_ml is a caller-supplied integer (10-1000).\n\negfr_ml_min is caller-assigned. magent does not compute eGFR and does not implement race-based MDRD.\n\nThis is Mehran 2004 Table 3 model B (eGFR bands) only. Serum creatinine >1.5 is the alternate model A and is not added; that would double-count.\n\nHypotension (SBP <80 mm Hg ≥1 h requiring inotropes or IABP within 24 h), IABP, CHF (NYHA III/IV and/or pulmonary edema), anemia (WHO hematocrit), and diabetes are caller-assigned flags. magent does not examine the patient or assay hematocrit.\n\nRisk groups are ≤5 / 6–10 / 11–15 / ≥16. Score 16 is very_high. CIN percents are the development-set four-group rates (7.5 / 14.0 / 26.1 / 57.3). Dialysis and one-year mortality are separate figures and are not returned. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Age >75 scores 4 (Mehran 2004 Table 3 model B). Age 75 scores 0.","required":true,"schema":{"type":"integer"},"example":"60"},{"in":"query","name":"hypotension","description":"Hypotension as assigned by the caller: SBP <80 mm Hg for ≥1 h requiring inotropes or IABP within 24 h (Mehran 2004). true scores 5. true or false. magent does not measure blood pressure.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"iabp","description":"Intra-aortic balloon pump use as assigned by the caller (Mehran 2004 Table 3). true scores 5. Independent of the hypotension flag. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"chf","description":"CHF as assigned by the caller: NYHA III/IV and/or pulmonary edema (Mehran 2004). true scores 5. true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"anemia","description":"Anemia as assigned by the caller using WHO hematocrit <39% (men) or <36% (women) (Mehran 2004). true scores 3. Flag only; do not send a hematocrit number. magent does not assay hematocrit.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"diabetes","description":"Diabetes mellitus as assigned by the caller (Mehran 2004 Table 3). true scores 3. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"contrast_ml","description":"Contrast volume in mL (integer 10-1000). Scores 1 per 100 mL: floor(contrast_ml/100) (Mehran 2004). 100 scores 1; 199 scores 1; 200 scores 2. magent does not measure contrast.","required":true,"schema":{"type":"integer"},"example":"100"},{"in":"query","name":"egfr_ml_min","description":"Caller-assigned eGFR in mL/min/1.73m² (5-150). Mehran 2004 Table 3 model B: ≥60 scores 0; 40 to <60 scores 2; 20 to <40 scores 4; <20 scores 6. magent does not compute eGFR and does not use race-based MDRD. Do not send serum creatinine; creatinine >1.5 is the alternate model A and would double-count.","required":true,"schema":{"type":"number"},"example":"90"}],"summary":"Mehran CIN risk score","operationId":"get_api_calc_mehran","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk_group, cin_percent, age_years, hypotension, iabp, chf, anemia, diabetes, contrast_ml, egfr_ml_min, components, citation, disclaimer."},"400":{"description":"invalid_mehran: contrast_ml 10-1000 and egfr_ml_min 5-150 (Mehran 2004; magent clamps). Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mehran"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Mehran CIN risk score (bulk)","operationId":"post_api_calc_mehran","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_mehran: contrast_ml 10-1000 and egfr_ml_min 5-150 (Mehran 2004; magent clamps). Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mehran"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"60","anemia":"false","chf":"false","contrast_ml":"100","diabetes":"false","egfr_ml_min":"90","hypotension":"false","iabp":"false"},{"age":"60","anemia":"false","chf":"false","contrast_ml":"100","diabetes":"false","egfr_ml_min":"90","hypotension":"false","iabp":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mayo-spn":{"get":{"description":"Compute the Swensen 1997 Mayo Clinic logistic probability of malignancy for a radiologically indeterminate solitary pulmonary nodule from age, smoking, remote extrathoracic cancer, diameter, spiculation, and upper-lobe location.\n\nWhen an agent already has the six Swensen 1997 predictors as assigned by the caller and needs the published logistic probability. magent does not read the film. Not a diagnosis, biopsy order, or medical device.\n\nNot a medical device, not a diagnosis, and not a biopsy order.\n\nSwensen 1997 Mayo Clinic model only. Not the VA Gould 2007 model and not Brock.\n\nmagent does not read the film. Spiculation and upper-lobe location are caller-assigned.\n\nDiameter is clamped to the 4-30 mm derivation range. Cancer diagnosed within 5 years of the nodule was excluded from derivation.\n\nAge 18-120 is an implementation clamp; Swensen 1997 is an adult derivation. No malignancy-percent bands are published in this model. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Swensen 1997 is an adult derivation; 18 is an implementation clamp.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"smoke","description":"Cigarette smoking as coded in Swensen 1997. true = current or former smoker (1); false = never (0). The caller assigns smoking history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cancer","description":"Extrathoracic cancer diagnosed ≥5 years before the nodule (Swensen 1997). true scores 1; false scores 0. The derivation excluded cancer within 5 years. The caller assigns the history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"diameter_mm","description":"Largest nodule diameter in millimetres (4-30). Swensen 1997 derivation range. magent does not measure the film.","required":true,"schema":{"type":"number"},"example":"8"},{"in":"query","name":"spiculation","description":"Spiculated edge as assigned by the caller (Swensen 1997). true or false. magent does not read the film.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"upper_lobe","description":"Upper-lobe location as assigned by the caller (Swensen 1997). true or false. magent does not read the film.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Mayo SPN","operationId":"get_api_calc_mayo_spn","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, smoke, cancer, diameter_mm, spiculation, upper_lobe, linear_predictor, probability, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_mayo_spn: each Mayo 1997 SPN item must be a published value for that field. Returned before settlement; you are not charged.; invalid_nodule_mm: diameter_mm must be a number from 4 to 30 (Swensen 1997 derivation). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mayo-spn"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Mayo SPN (bulk)","operationId":"post_api_calc_mayo_spn","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_mayo_spn: each Mayo 1997 SPN item must be a published value for that field. Returned before settlement; you are not charged.; invalid_nodule_mm: diameter_mm must be a number from 4 to 30 (Swensen 1997 derivation). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mayo-spn"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","cancer":"false","diameter_mm":"8","smoke":"false","spiculation":"false","upper_lobe":"false"},{"age":"50","cancer":"false","diameter_mm":"8","smoke":"false","spiculation":"false","upper_lobe":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pc-ptsd-5":{"get":{"description":"Apply the Prins 2016 PC-PTSD-5 trauma-exposure gate and sum five caller-assigned past-month yes/no items (max 5). Return whether the score is at or above that paper's optimally sensitive cut of 3.\n\nWhen an agent has already assigned the Prins 2016 lifetime trauma-exposure flag and five past-month symptom flags and needs the published total and ≥3 sensitive screen, not a PTSD diagnosis or an interview.\n\nNot a medical device and not a PTSD diagnosis.\n\nmagent does not interview the patient.\n\nThe caller assigns each flag. magent does not interpret individual items.\n\nIf trauma_exposure is false, the five past-month items are not counted (score is 0) even if they are true; they remain required query parameters.\n\nThis is Prins 2016 PC-PTSD-5 only (lifetime trauma-exposure gate and five past-month items; optimally sensitive screen at score ≥ 3). Cuts of 4 (maximized efficiency) and 5 (maximized specificity) are published in that paper and are not the primary flag. magent does not apply later sex-specific cutoffs. Not the DSM-IV four-item PC-PTSD. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"trauma_exposure","description":"Caller-assigned Prins 2016 lifetime trauma-exposure gate: whether an unusually or especially frightening, horrible, or traumatic event has ever been experienced (examples in that paper include a serious accident or fire, physical or sexual assault or abuse, earthquake or flood, war, seeing someone killed or seriously injured, or a loved one dying by homicide or suicide). true or false. If false, the five past-month items are not counted (score is 0) but remain required. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"nightmare_or_intrusion","description":"In the past month, nightmares about the event(s) or unwanted thoughts of the event(s) (Prins 2016). true or false as assigned by the caller. Counted only when trauma_exposure is true. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"avoidance","description":"In the past month, tried hard not to think about the event(s) or went out of the way to avoid situations that reminded of the event(s) (Prins 2016). true or false as assigned by the caller. Counted only when trauma_exposure is true. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypervigilance_or_startle","description":"In the past month, constantly on guard, watchful, or easily startled (Prins 2016). true or false as assigned by the caller. Counted only when trauma_exposure is true. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"numbing_or_detachment","description":"In the past month, felt numb or detached from people, activities, or surroundings (Prins 2016). true or false as assigned by the caller. Counted only when trauma_exposure is true. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"guilt_or_blame","description":"In the past month, felt guilty or unable to stop blaming self or others for the event(s) or problems the event(s) may have caused (Prins 2016). true or false as assigned by the caller. Counted only when trauma_exposure is true. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"PC-PTSD-5","operationId":"get_api_calc_pc_ptsd_5","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, trauma_exposure, score, max_score, at_or_above_sensitive_cutoff, components, citation, disclaimer."},"400":{"description":"invalid_pc_ptsd_5: PC-PTSD-5 inputs must match Prins 2016 trauma exposure and five past-month symptom items from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pc-ptsd-5"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PC-PTSD-5 (bulk)","operationId":"post_api_calc_pc_ptsd_5","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pc_ptsd_5: PC-PTSD-5 inputs must match Prins 2016 trauma exposure and five past-month symptom items from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pc-ptsd-5"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"avoidance":"false","guilt_or_blame":"false","hypervigilance_or_startle":"false","nightmare_or_intrusion":"false","numbing_or_detachment":"false","trauma_exposure":"false"},{"avoidance":"false","guilt_or_blame":"false","hypervigilance_or_startle":"false","nightmare_or_intrusion":"false","numbing_or_detachment":"false","trauma_exposure":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/epiphany":{"get":{"description":"Apply the Carmona-Bayonas 2017 EPIPHANY Index decision tree and return low, intermediate, or high 15-day serious-complication class with the published class rates.\n\nWhen an agent already has the six Figure 2 covariates for a patient with cancer and PE (incidental or symptomatic) and needs the published CHAID class, not an additive PE score.\n\nNot a medical device and not a diagnosis. Not an anticoagulation, admission, fibrinolysis, or outpatient-treatment order. magent does not examine the patient, measure vitals, assign ECOG-PS, apply RECIST, or read an operative note; the caller assigns the six Figure 2 covariates.\n\nThis is the Carmona-Bayonas 2017 Exhaustive CHAID tree (Figure 2), not an additive point score. Off-path covariates are parsed and ignored.\n\nThe Hestia-like CDR is the paper's six-item adaptation (any vs none), not the 11-item Zondag 2011 Hestia checklist and not PESI, sPESI, Wells PE, POMPE-C, or RIETE.\n\nArterial oxygen saturation <90% is both a Hestia-like CDR item and a later split on the ECOG-PS >=2 branch; the caller assigns both independently as the figure does. Both saturation leaves are high class.\n\nTumour 'others' is complete or partial response, stable disease, or no evidence of disease (Table 1). Progression, unknown, or not evaluated is the uncontrolled split.\n\nClass rates 1.6 / 9.4 / 30.6% (15-day serious complications) and 0.3 / 6.1 / 17.1% (15-day mortality) are the published three-class summaries, not per-leaf percents.\n\nDoes not use race. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"hestia_like_any","description":"true if any Carmona-Bayonas 2017 Hestia-like clinical decision rule item is present: SBP <100 mm Hg, arterial oxygen saturation <90%, respiratory rate >=30 breaths/min, pulse >=110 beats/min, sudden or progressive dyspnoea, or clinically relevant haemorrhage / high bleeding risk / platelets <50 000 mm^-3 (Figure 2). false if none. Caller-assigned; magent does not measure vitals or score the 11-item Zondag Hestia checklist.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ecog_ps_ge_2","description":"ECOG-PS >=2 as assigned by the caller (Carmona-Bayonas 2017: <2 vs >=2). true or false. Used on the Hestia-like-any branch. magent does not assign performance status.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"oxygen_sat_lt_90","description":"Arterial oxygen saturation <90% as assigned by the caller (Figure 2: <90 vs >=90%). true or false. Used when Hestia-like any is present and ECOG-PS >=2; both sat leaves are high class. Distinct from the same cutoff inside the Hestia-like CDR. magent does not measure saturation.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pe_specific_symptoms","description":"PE-specific symptoms present as assigned by the caller (Carmona-Bayonas 2017 Figure 2). true or false. Used when Hestia-like any is present and ECOG-PS <2. Distinct from incidental vs symptomatic diagnosis and from the dyspnoea CDR item. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"tumour_uncontrolled","description":"true if tumour response is progression, unknown, or not evaluated; false for others (complete or partial response, stable disease, or no evidence of disease) per Carmona-Bayonas 2017 Table 1 / Figure 2. Used on the Hestia-like-none branch. magent does not apply RECIST.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"primary_tumour_resected","description":"Prior surgical resection of the primary tumour as assigned by the caller. true or false. Used when Hestia-like none and tumour_uncontrolled are both true. magent does not read an operative note.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"EPIPHANY","operationId":"get_api_calc_epiphany","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, hestia_like_any, ecog_ps_ge_2, oxygen_sat_lt_90, pe_specific_symptoms, tumour_uncontrolled, primary_tumour_resected, risk_class, leaf, serious_complication_15d_percent, mortality_15d_percent, criteria, citation, disclaimer."},"400":{"description":"invalid_epiphany: EPIPHANY needs Carmona-Bayonas 2017 Hestia-like, ECOG, saturation, symptoms, tumour response, and resection flags. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/epiphany"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"EPIPHANY (bulk)","operationId":"post_api_calc_epiphany","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_epiphany: EPIPHANY needs Carmona-Bayonas 2017 Hestia-like, ECOG, saturation, symptoms, tumour response, and resection flags. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/epiphany"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ecog_ps_ge_2":"false","hestia_like_any":"false","oxygen_sat_lt_90":"false","pe_specific_symptoms":"false","primary_tumour_resected":"true","tumour_uncontrolled":"false"},{"ecog_ps_ge_2":"false","hestia_like_any":"false","oxygen_sat_lt_90":"false","pe_specific_symptoms":"false","primary_tumour_resected":"true","tumour_uncontrolled":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/codes/lookup":{"get":{"description":"Look up a current RxNorm, ICD-10-CM, or LOINC preferred term from an exact published code.\n\nWhen an agent already has a code and must not invent the preferred term. found=false is a valid paid 200.\n\nICD-10 means ICD-10-CM. Dotted or compact form is accepted (E11.9 or E119).\n\nNot a billing submission. Production coverage is Current Prescribable + ICD-10-CM + LOINC, not complete UMLS.\n\nDo not send names or MRNs. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"system","description":"rxnorm, icd10 (ICD-10-CM), or loinc.","required":true,"schema":{"type":"string","enum":["rxnorm","icd10","loinc"]},"example":"rxnorm"},{"in":"query","name":"code","description":"Exact published identifier. ICD-10-CM accepts dotted or compact form (E11.9 or E119). Max 32 characters.","required":true,"schema":{"type":"string"},"example":"198440"}],"summary":"Code lookup","operationId":"get_api_codes_lookup","responses":{"200":{"description":"200 JSON fields: found, system, code, display, tty, status, billable, obsolete, synonyms, catalog, disclaimer."},"400":{"description":"invalid_system: system must be rxnorm, icd10, or loinc Returned before settlement; you are not charged.; invalid_code: code is required and must be 1-32 characters Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/code-lookup"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Code lookup (bulk)","operationId":"post_api_codes_lookup","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_system: system must be rxnorm, icd10, or loinc Returned before settlement; you are not charged.; invalid_code: code is required and must be 1-32 characters Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/code-lookup"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"code":"198440","system":"rxnorm"},{"code":"198440","system":"rxnorm"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/air":{"get":{"description":"Compute the Andersson 2008 appendicitis inflammatory response (AIR) score from caller-assigned findings, temperature, WBC, neutrophil percent, and CRP in mg/L.\n\nWhen an agent needs the published Andersson 2008 AIR total and must not invent abdominal findings or treat the total as an operating-room protocol.\n\nNot a medical device. Not a diagnosis or operating-room protocol.\n\nFindings, rebound or guarding grade, and laboratory values are caller-assigned. magent does not examine the abdomen.\n\nCRP is scored in mg/L, not mg/dL (Andersson 2008 AIR table as restated in the 2021 same-group validation table).\n\nBands 0-4, 5-8, and 9-12 are published AIR strata. magent does not return probability percents or operate-versus-observe orders. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"vomiting","description":"Vomiting (Andersson 2008). true scores 1; false scores 0.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"rif_pain","description":"Pain in the right iliac fossa / right lower quadrant (Andersson 2008). true scores 1; false scores 0.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"rebound_or_guarding","description":"Caller-assigned rebound tenderness or muscular guarding (Andersson 2008). none scores 0; light 1; medium 2; strong 3. magent does not examine the abdomen.","required":true,"schema":{"type":"string","enum":["none","light","medium","strong"]},"example":"none"},{"in":"query","name":"temperature_c","description":"Temperature in °C (30.0-45.0). ≥38.5 scores 1 (38.5 scores; 38.49 does not).","required":true,"schema":{"type":"number"},"example":"37.0"},{"in":"query","name":"wbc_k_ul","description":"WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500. Converted to ×10^9/L: <10 scores 0; 10.0-14.9 scores 1; ≥15.0 scores 2.","required":false,"schema":{"type":"number"},"example":"8.0"},{"in":"query","name":"wbc_ul","description":"WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000. Converted to ×10^9/L (= wbc_ul/1000): <10 scores 0; 10.0-14.9 scores 1; ≥15.0 scores 2.","required":false,"schema":{"type":"number"},"example":"8000"},{"in":"query","name":"neutrophil_percent","description":"Neutrophil percent (0-100). <70 scores 0; 70-84 scores 1; ≥85 scores 2 (69.9 does not; 70 and 84 score 1; 85 scores 2).","required":true,"schema":{"type":"number"},"example":"60"},{"in":"query","name":"crp_mg_l","description":"C-reactive protein in mg/L (0-500), not mg/dL. <10 scores 0; 10-49 scores 1; ≥50 scores 2 (9.9 does not; 10 and 49 score 1; 50 scores 2).","required":true,"schema":{"type":"number"},"example":"5"}],"summary":"AIR score","operationId":"get_api_calc_air","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, air_band, vomiting, rif_pain, rebound_or_guarding, temperature_c, wbc_ul, wbc_10e9_l, neutrophil_percent, crp_mg_l, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_air_rebound: rebound_or_guarding must be none, light, medium, or strong (Andersson 2008 AIR). Returned before settlement; you are not charged.; invalid_temperature: temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_neutrophil_percent: neutrophil_percent must be a number from 0 to 100 Returned before settlement; you are not charged.; invalid_crp: crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/air"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"AIR score (bulk)","operationId":"post_api_calc_air","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_air_rebound: rebound_or_guarding must be none, light, medium, or strong (Andersson 2008 AIR). Returned before settlement; you are not charged.; invalid_temperature: temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_neutrophil_percent: neutrophil_percent must be a number from 0 to 100 Returned before settlement; you are not charged.; invalid_crp: crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/air"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"crp_mg_l":"5","neutrophil_percent":"60","rebound_or_guarding":"none","rif_pain":"false","temperature_c":"37.0","vomiting":"false","wbc_ul":"8000"},{"crp_mg_l":"5","neutrophil_percent":"60","rebound_or_guarding":"none","rif_pain":"false","temperature_c":"37.0","vomiting":"false","wbc_ul":"8000"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/modified-sgarbossa":{"get":{"description":"Apply the Smith 2012 unweighted modified Sgarbossa rule from three caller-assigned ECG flags and return whether any criterion is met.\n\nWhen an agent already has the three Smith 2012 modified Sgarbossa flags for a tracing with left bundle-branch block and needs whether the unweighted any-of rule is positive. magent does not measure the ECG. Use the original Sgarbossa 1996 5/3/2 points score when that published weighting is required.\n\nNot a medical device.\n\nNot a diagnosis of myocardial infarction, STEMI equivalent, or reperfusion decision.\n\nmagent does not measure the ECG. Each flag is caller-assigned.\n\nThis is Smith 2012 unweighted modified Sgarbossa (any of three flags). Not the original Sgarbossa 1996 5/3/2 points score.\n\nNot a 5 mm discordant ST-elevation rule. The third flag is excessive discordant STE with ST/S ratio ≤ −0.25 as assigned by the caller. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"concordant_st_elevation_1mm","description":"Concordant ST elevation ≥1 mm in a lead with a positive QRS as assigned by the caller (Smith 2012). true or false. magent does not measure the ECG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"concordant_st_depression_v1_v3","description":"Concordant ST depression ≥1 mm in V1, V2, or V3 as assigned by the caller (Smith 2012). true or false. magent does not measure the ECG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"excessive_discordant_ste_st_s_ge_0_25","description":"≥1 mm discordant ST elevation with ST/S ratio ≤ −0.25 (STE ≥25% of the preceding S-wave depth) as assigned by the caller (Smith 2012). true or false. magent does not measure the ECG. Not the original Sgarbossa 1996 5 mm discordant rule.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Modified Sgarbossa","operationId":"get_api_calc_modified_sgarbossa","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, modified_sgarbossa, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/modified-sgarbossa"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Modified Sgarbossa (bulk)","operationId":"post_api_calc_modified_sgarbossa","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/modified-sgarbossa"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"concordant_st_depression_v1_v3":"false","concordant_st_elevation_1mm":"false","excessive_discordant_ste_st_s_ge_0_25":"false"},{"concordant_st_depression_v1_v3":"false","concordant_st_elevation_1mm":"false","excessive_discordant_ste_st_s_ge_0_25":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pediatric-ett":{"get":{"description":"Compute Cole 1957 uncuffed pediatric endotracheal tube internal diameter from age in years.\n\nWhen an agent needs the published age/4+4 millimetre arithmetic and must not invent a cuffed formula or tape length.\n\nNot a device-selection order and not a substitute for length-based tapes. Cole does not specify 0.5 mm stock rounding; magent returns 1 decimal.\n\nUncuffed Cole formula only. Does not apply Khine/cuffed (age/4)+3.5. Age 0.5-12 years is an implementation clamp around typical pediatric use. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_years","description":"Age in years (0.5-12). Cole uncuffed ID (mm) = age/4 + 4. Not a neonatal-only formula.","required":true,"schema":{"type":"number"},"example":"4"}],"summary":"Pediatric ETT size","operationId":"get_api_calc_pediatric_ett","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, ett_id_mm, citation, disclaimer."},"400":{"description":"invalid_pediatric_age: age_years must be a number from 0.5 to 12. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pediatric-ett"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Pediatric ETT size (bulk)","operationId":"post_api_calc_pediatric_ett","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pediatric_age: age_years must be a number from 0.5 to 12. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pediatric-ett"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_years":"4"},{"age_years":"4"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pre-score":{"get":{"description":"Compute the Pittsburgh Response to Endovascular therapy (PRE) score from age, caller-assigned NIHSS, and ASPECTS using PRE = age + 2×NIHSS - 10×ASPECTS (Rangaraju 2015).\n\nWhen an agent needs the published Rangaraju 2015 PRE total, quartile, and recanalization-benefit stratum for large-vessel occlusion, and must not invent NIHSS or ASPECTS from a chart narrative or CT.\n\nNot a medical device and not a thrombectomy recommendation.\n\nThe caller assigns the NINDS NIHSS total and ASPECTS. magent does not assign NIHSS or read CT.\n\nQuartiles and recanalization-benefit groups are those published in Rangaraju 2015. magent does not invent outcome percents or extra cutpoints.\n\nThis tool does not recommend for or against endovascular therapy. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120).","required":true,"schema":{"type":"integer"},"example":"65"},{"in":"query","name":"nihss","description":"Caller-assigned NIH Stroke Scale total (integer 0-42, NINDS total). magent does not assign NIHSS or examine the patient.","required":true,"schema":{"type":"integer"},"example":"18"},{"in":"query","name":"aspects","description":"Alberta Stroke Program Early CT Score (integer 0-10). magent does not read CT.","required":true,"schema":{"type":"integer"},"example":"8"}],"summary":"PRE score","operationId":"get_api_calc_pre_score","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, pre_score, age_years, nihss, aspects, pre_quartile, recanalization_stratum, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_nihss: nihss must be an integer from 0 to 42. Returned before settlement; you are not charged.; invalid_aspects: aspects must be an integer from 0 to 10. Returned before settlement; you are not charged.; invalid_pre: PRE score needs age, nihss, and aspects (Rangaraju 2015). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pre-score"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PRE score (bulk)","operationId":"post_api_calc_pre_score","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_nihss: nihss must be an integer from 0 to 42. Returned before settlement; you are not charged.; invalid_aspects: aspects must be an integer from 0 to 10. Returned before settlement; you are not charged.; invalid_pre: PRE score needs age, nihss, and aspects (Rangaraju 2015). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pre-score"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"65","aspects":"8","nihss":"18"},{"age":"65","aspects":"8","nihss":"18"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/c-diva":{"get":{"description":"Sum four caller-assigned Bell 2023 C-DIVA integers (0-2) and return the published total (max 8) and Figure 1 low/medium/high risk band.\n\nWhen an agent has already assigned Bell 2023 Figure 1 domain integers (visual appearance, palpable sites, history of difficult access, clinical factors) and needs the published C-DIVA total and risk band, not an IV insertion or escalation order.\n\nNot a medical device and not a vascular-access, ultrasound, CVC, IO, or treatment order.\n\nEach of the four domains is a caller-assigned integer 0, 1, or 2 from Bell 2023 Figure 1. magent does not examine the patient, inspect veins, or take a history.\n\nReturned bands are Bell 2023 Figure 1 risk groups (low 0-3, medium 4-5, high 6-8), not orders to obtain IV access, consult a vascular access specialist, or place a CVC or IO. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"visual_appearance","description":"Caller-assigned Bell 2023 Figure 1 visual appearance (integer 0-2): 0 many visible veins; 1 few visible veins; 2 no visible veins. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"palpable_sites","description":"Caller-assigned Bell 2023 Figure 1 palpable sites (integer 0-2): 0 many palpable veins; 1 few palpable veins; 2 no palpable veins. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"history_of_difficult_access","description":"Caller-assigned Bell 2023 Figure 1 history of difficult access (integer 0-2): 0 no difficulty; 1 reported difficulty or recent missed attempts; 2 history of major difficulty as evidenced by previous central lines or PICCs. magent does not take a history.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"clinical_factors","description":"Caller-assigned Bell 2023 Figure 1 clinical factors (integer 0-2): 0 not applicable; 1 pediatric patients or urgent conditions (ESI 3-4); 2 comorbidities or emergency conditions (ESI 1-2). magent does not assign ESI or examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"C-DIVA","operationId":"get_api_calc_c_diva","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, c_diva_band, components, citation, disclaimer."},"400":{"description":"invalid_c_diva: C-DIVA needs the published vein-visibility, palpability, access-history, and clinical-factor scores. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/c-diva"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"C-DIVA (bulk)","operationId":"post_api_calc_c_diva","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_c_diva: C-DIVA needs the published vein-visibility, palpability, access-history, and clinical-factor scores. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/c-diva"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"clinical_factors":"0","history_of_difficult_access":"0","palpable_sites":"0","visual_appearance":"0"},{"clinical_factors":"0","history_of_difficult_access":"0","palpable_sites":"0","visual_appearance":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/who-sm":{"get":{"description":"Apply the Valent 2016 / WHO 2016 systemic mastocytosis diagnostic criteria (Table 1) and return whether the published combination of the major criterion plus at least one minor, or at least three minors, is met. Tryptase >20 ng/mL does not count when an unrelated myeloid neoplasm is present.\n\nWhen an agent already has caller-assigned WHO 2016 SM major and minor flags and needs the published criteria result. magent does not diagnose systemic mastocytosis, does not read a biopsy, and does not assay tryptase.\n\nNot a medical device.\n\nNot a diagnosis. Criteria met is not a systemic mastocytosis diagnosis without the rest of the WHO 2016 workup.\n\nNot cutaneous mastocytosis only. This tool is WHO 2016 systemic mastocytosis (Table 1) only.\n\nNot ICC 2022. CD30 is not a 2016 minor criterion on this tool.\n\nmagent does not read a biopsy or assay tryptase. All flags are caller-assigned.\n\nWhen associated_myeloid_neoplasm is true, tryptase_gt_20 does not count as a minor (Valent 2016 Table 1 item d is not valid). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"major_infiltrates","description":"Multifocal dense infiltrates of mast cells (≥15 MCs in aggregates) in bone marrow or another extracutaneous organ, as assigned by the caller (Valent 2016 Table 1 major). true or false. magent does not read a biopsy.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"atypical_or_spindle","description":">25% atypical (type I/II) or spindle-shaped mast cells in infiltrates or smears, as assigned by the caller (Valent 2016 Table 1 minor a). true or false. magent does not read slides.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"kit_codon_816","description":"KIT point mutation at codon 816 in bone marrow or another extracutaneous organ, as assigned by the caller (Valent 2016 Table 1 minor b). true or false. magent does not sequence KIT.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"cd2_or_cd25","description":"Mast cells in bone marrow, blood, or another extracutaneous organ exhibit CD2 and/or CD25, as assigned by the caller (Valent 2016 Table 1 minor c). true or false. magent does not phenotype mast cells.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"tryptase_gt_20","description":"Baseline serum tryptase >20 ng/mL as assigned by the caller (Valent 2016 Table 1 minor d). Does not count when associated_myeloid_neoplasm is true. true or false. magent does not assay tryptase.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"associated_myeloid_neoplasm","description":"Unrelated myeloid neoplasm present as assigned by the caller (Valent 2016 Table 1: item d is not valid). When true, tryptase_gt_20 does not count as a minor. true or false. magent does not diagnose a myeloid neoplasm.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"WHO 2016 SM criteria","operationId":"get_api_calc_who_sm","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, diagnosed, major, minor_count, tryptase_counts, major_infiltrates, atypical_or_spindle, kit_codon_816, cd2_or_cd25, tryptase_gt_20, associated_myeloid_neoplasm, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/who-sm"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"WHO 2016 SM criteria (bulk)","operationId":"post_api_calc_who_sm","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/who-sm"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"associated_myeloid_neoplasm":"false","atypical_or_spindle":"false","cd2_or_cd25":"false","kit_codon_816":"true","major_infiltrates":"true","tryptase_gt_20":"false"},{"associated_myeloid_neoplasm":"false","atypical_or_spindle":"false","cd2_or_cd25":"false","kit_codon_816":"true","major_infiltrates":"true","tryptase_gt_20":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/bisap":{"get":{"description":"Compute the Wu 2008 BISAP score for early prediction of mortality in acute pancreatitis from BUN, caller-assigned impaired mental status, caller-assigned SIRS, age, and caller-assigned pleural effusion.\n\nWhen an agent needs the published BISAP total and must not invent Ranson, APACHE II, CTSI, or mortality percentages.\n\nNot a diagnosis. magent does not diagnose acute pancreatitis or its severity.\n\nNot Ranson, not APACHE II, and not CTSI. This tool is the Wu 2008 BISAP score only.\n\nmagent does not recompute SIRS from vitals. sirs is a caller-assigned flag.\n\nmagent does not assign mental status and does not take GCS. impaired_mental_status is a caller-assigned flag (paper: GCS <15).\n\nmagent does not read imaging. pleural_effusion is assigned by the caller.\n\nBUN >25 mg/dL and age >60 are strict inequalities: BUN 25.0 and age 60 do not score.\n\nScore only. magent does not emit mortality percentages. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Scores 1 when age >60; 60 does not score.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"bun_mg_dl","description":"Blood urea nitrogen in mg/dL (1-200). Scores 1 when >25; 25.0 does not score.","required":true,"schema":{"type":"number"},"example":"20"},{"in":"query","name":"impaired_mental_status","description":"Impaired mental status as assigned by the caller (paper: GCS <15). true or false. magent does not take GCS or assign mental status. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"sirs","description":"SIRS present as assigned by the caller. true or false. magent does not recompute Bone SIRS from vitals. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pleural_effusion","description":"Pleural effusion as assigned by the caller from imaging. true or false. magent does not read imaging. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"BISAP","operationId":"get_api_calc_bisap","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, age_years, bun_mg_dl, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_bun: bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bisap"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"BISAP (bulk)","operationId":"post_api_calc_bisap","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_bun: bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bisap"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","bun_mg_dl":"20","impaired_mental_status":"false","pleural_effusion":"false","sirs":"false"},{"age":"50","bun_mg_dl":"20","impaired_mental_status":"false","pleural_effusion":"false","sirs":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/saps-ii":{"get":{"description":"Compute the Le Gall 1993 SAPS II integer from 12 physiology variables, age, type of admission, and one chronic disease, then the paper's logit hospital-mortality probability.\n\nWhen an agent needs the published 1993 SAPS II integer and hospital-mortality probability and must not invent SAPS 3 points, APACHE points, or unnamed class bands.\n\nNot a medical device. magent does not measure vitals and does not examine the patient.\n\nEach physiology item is the worst value in 24 hours as assigned by the caller. magent does not choose the worst from a time series.\n\nNot SAPS 3. Not APACHE II, APACHE III, or APACHE IV. Le Gall 1993 Table 1 bands and logit only.\n\nThe 1993 derivation excluded patients younger than 18 years, burn patients, coronary care patients, and cardiac surgery patients. This tool still returns the published table for a valid adult input; it does not apply later customizations.\n\nPaO2/FiO2 is scored only if the caller assigns mechanical ventilation or CPAP. If ventilated is false, oxygenation points are 0 even when a ratio is sent. Ventilated or CPAP scores at least 6.\n\nChronic diseases are one Table 1 row (none, metastatic cancer, hematologic malignancy, or AIDS), not additive.\n\nHospital-mortality probability is the 1993 logit only. The paper publishes no named low/intermediate/high class bands.\n\nTemperature has no hypothermia points in the 1993 table (<39 °C is 0). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years, integer 18-120 (Le Gall 1993 excluded patients younger than 18). <40 → 0; 40-59 → 7; 60-69 → 12; 70-74 → 15; 75-79 → 16; ≥80 → 18.","required":true,"schema":{"type":"integer"},"example":"35"},{"in":"query","name":"heart_rate","description":"Heart rate in beats/min, integer 20-250, worst in 24h as assigned by the caller. <40 → 11; 40-69 → 2; 70-119 → 0; 120-159 → 4; ≥160 → 7. magent does not measure pulse.","required":true,"schema":{"type":"integer"},"example":"80"},{"in":"query","name":"systolic_bp_mm_hg","description":"Systolic blood pressure in mm Hg (20-300), worst in 24h as assigned by the caller. <70 → 13; 70-99 → 5; 100-199 → 0; ≥200 → 2. magent does not measure blood pressure.","required":true,"schema":{"type":"number"},"example":"120"},{"in":"query","name":"temperature_c","description":"Body temperature in °C (20-46). <39 → 0; ≥39 → 3. The 1993 table has no hypothermia points. magent does not measure temperature or convert Fahrenheit.","required":true,"schema":{"type":"number"},"example":"37.0"},{"in":"query","name":"ventilated","description":"true if the caller assigns mechanical ventilation or CPAP in the first 24h (Le Gall 1993 PaO2/FiO2 row). false → 0 oxygenation points and pao2_fio2 is ignored. Ventilated or CPAP scores at least 6 even when PaO2/FiO2 is ≥200.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pao2_fio2","description":"PaO2/FiO2 ratio in mm Hg (10-800). Required when ventilated is true. <100 → 11; 100-199 → 9; ≥200 → 6. Ignored when ventilated is false. magent does not compute the ratio from PaO2 and FiO2.","required":false,"schema":{"type":"number"},"example":"250"},{"in":"query","name":"urine_output_l_day","description":"Urine output in L/24h (0-20) as assigned by the caller. <0.500 → 11; 0.500-0.999 → 4; ≥1.000 → 0. magent does not measure urine.","required":true,"schema":{"type":"number"},"example":"1.5"},{"in":"query","name":"urea_mmol_l","description":"Serum urea in mmol/L (0.1-80). One of urea_mmol_l or bun_mg_dl is required. If both are sent, urea_mmol_l is scored and bun_mg_dl is ignored. <10.0 → 0; 10.0-29.9 → 6; ≥30.0 → 10.","required":false,"schema":{"type":"number"},"example":"5.0"},{"in":"query","name":"bun_mg_dl","description":"Blood urea nitrogen in mg/dL (1-250). Alternate to urea_mmol_l (Le Gall 1993 US column). Ignored when urea_mmol_l is present. <28 → 0; 28-83 → 6; ≥84 → 10. magent does not convert BUN to urea.","required":false,"schema":{"type":"number"},"example":"15"},{"in":"query","name":"wbc_k_ul","description":"White blood count in thousands per mm^3 (0-100). <1.0 → 12; 1.0-19.9 → 0; ≥20.0 → 3.","required":true,"schema":{"type":"number"},"example":"8.0"},{"in":"query","name":"potassium_mmol_l","description":"Serum potassium in mmol/L (1-12). <3.0 → 3; 3.0-4.9 → 0; ≥5.0 → 3.","required":true,"schema":{"type":"number"},"example":"4.0"},{"in":"query","name":"sodium_mmol_l","description":"Serum sodium in mmol/L (90-200). <125 → 5; 125-144 → 0; ≥145 → 1.","required":true,"schema":{"type":"number"},"example":"140"},{"in":"query","name":"bicarbonate_meq_l","description":"Serum bicarbonate in mEq/L (2-60). <15 → 6; 15-19 → 3; ≥20 → 0. Arterial pH is not a SAPS II variable.","required":true,"schema":{"type":"number"},"example":"24"},{"in":"query","name":"bilirubin_mg_dl","description":"Serum bilirubin in mg/dL (0-40). One of bilirubin_mg_dl or bilirubin_umol_l is required. If both are sent, bilirubin_mg_dl is scored and bilirubin_umol_l is ignored. <4.0 → 0; 4.0-5.9 → 4; ≥6.0 → 9.","required":false,"schema":{"type":"number"},"example":"0.8"},{"in":"query","name":"bilirubin_umol_l","description":"Serum bilirubin in µmol/L (0-684). Alternate to bilirubin_mg_dl (Le Gall 1993 SI column). Ignored when bilirubin_mg_dl is present. <68.4 → 0; 68.4-102.5 → 4; ≥102.6 → 9. magent does not convert units.","required":false,"schema":{"type":"number"},"example":"14"},{"in":"query","name":"gcs","description":"Glasgow Coma Scale total as assigned by the caller (integer 3-15). <6 → 26; 6-8 → 13; 9-10 → 7; 11-13 → 5; 14-15 → 0. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"15"},{"in":"query","name":"admission_type","description":"Le Gall 1993 type of admission as assigned by the caller: scheduled_surgical (0), medical (6), or unscheduled_surgical (8). magent does not classify the admission.","required":true,"schema":{"type":"string","enum":["scheduled_surgical","medical","unscheduled_surgical"]},"example":"scheduled_surgical"},{"in":"query","name":"chronic_disease","description":"Le Gall 1993 chronic-disease row as assigned by the caller: none (0), metastatic_cancer (9), hematologic_malignancy (10), or aids (17). One token; the paper's table is not additive. magent does not diagnose.","required":true,"schema":{"type":"string","enum":["none","metastatic_cancer","hematologic_malignancy","aids"]},"example":"none"}],"summary":"SAPS II","operationId":"get_api_calc_saps_ii","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, logit, hospital_mortality_probability, components, citation, disclaimer."},"400":{"description":"invalid_saps_ii: SAPS II needs Le Gall 1993 physiologic, age, admission-type, and chronic-disease values in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/saps-ii"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SAPS II (bulk)","operationId":"post_api_calc_saps_ii","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_saps_ii: SAPS II needs Le Gall 1993 physiologic, age, admission-type, and chronic-disease values in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/saps-ii"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"admission_type":"scheduled_surgical","age":"35","bicarbonate_meq_l":"24","bilirubin_mg_dl":"0.8","chronic_disease":"none","gcs":"15","heart_rate":"80","potassium_mmol_l":"4.0","sodium_mmol_l":"140","systolic_bp_mm_hg":"120","temperature_c":"37.0","urea_mmol_l":"5.0","urine_output_l_day":"1.5","ventilated":"false","wbc_k_ul":"8.0"},{"admission_type":"scheduled_surgical","age":"35","bicarbonate_meq_l":"24","bilirubin_mg_dl":"0.8","chronic_disease":"none","gcs":"15","heart_rate":"80","potassium_mmol_l":"4.0","sodium_mmol_l":"140","systolic_bp_mm_hg":"120","temperature_c":"37.0","urea_mmol_l":"5.0","urine_output_l_day":"1.5","ventilated":"false","wbc_k_ul":"8.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/nexus-head-ct":{"get":{"description":"Apply the Mower 2017 NEXUS Head CT eight-criterion decision instrument and return whether the patient is low-risk (all eight caller-assigned criteria absent). CT may be omitted by this instrument when low-risk. Does not order a CT.\n\nWhen an agent has caller-assigned findings after blunt head injury and needs the published NEXUS Head CT decision instrument, not Hoffman 2000 NEXUS C-spine and not the Canadian CT Head Rule.\n\nNot a medical device. Not a diagnosis. magent does not examine the patient.\n\nNot a CT order. Low-risk means CT may be omitted by this instrument. Presence of a criterion does not mandate CT. Do not order a CT from this tool.\n\nThis tool is the Mower 2017 eight-criterion NEXUS Head CT decision instrument (derivation Mower 2005 J Trauma). It is not the Hoffman 2000 NEXUS C-spine rule, not NEXUS Chest CT, and not the Canadian CT Head Rule.\n\nAge 65 or older is a high-risk criterion as published; age 64 is not high-risk on age alone. magent takes adult age 18-120. The caller assigns the seven clinical flags. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120). Age ≥ 65 is a high-risk criterion; 64 is not high-risk on age alone. Low-risk age criterion holds when age < 65.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"skull_fracture","description":"Evidence of skull fracture as assigned by the caller. true means a skull-fracture finding is present and low_risk is false. true or false. magent does not examine the patient or read a radiograph.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"scalp_hematoma","description":"Scalp hematoma as assigned by the caller. true means a scalp hematoma is present and low_risk is false. true or false. magent does not examine the scalp.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"neurologic_deficit","description":"Neurologic deficit (neurosurgical deficits) as assigned by the caller. true means a deficit is present and low_risk is false. true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"altered_alertness","description":"Altered level of alertness as assigned by the caller. true means alertness is altered and low_risk is false. true or false. magent does not assign GCS.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"abnormal_behavior","description":"Abnormal behavior as assigned by the caller. true means abnormal behavior is present and low_risk is false. true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"coagulopathy","description":"Coagulopathy as assigned by the caller. true means coagulopathy is present and low_risk is false. true or false. magent does not interpret a coagulation assay.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"persistent_vomiting","description":"Persistent vomiting as assigned by the caller. true means persistent vomiting is present and low_risk is false. true or false. magent does not take a vomit count.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"NEXUS Head CT","operationId":"get_api_calc_nexus_head_ct","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, low_risk, criteria, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nexus-head-ct"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"NEXUS Head CT (bulk)","operationId":"post_api_calc_nexus_head_ct","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nexus-head-ct"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"abnormal_behavior":"false","age":"40","altered_alertness":"false","coagulopathy":"false","neurologic_deficit":"false","persistent_vomiting":"false","scalp_hematoma":"false","skull_fracture":"false"},{"abnormal_behavior":"false","age":"40","altered_alertness":"false","coagulopathy":"false","neurologic_deficit":"false","persistent_vomiting":"false","scalp_hematoma":"false","skull_fracture":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mars":{"get":{"description":"Sum the Jawhar 2019 mutation-adjusted risk score (MARS) for advanced systemic mastocytosis and return low (0–1), intermediate (2), or high (3–5).\n\nWhen an agent needs the published MARS point total and risk band for AdvSM and must not invent a WHO SM diagnosis, sequence S/A/R mutations, or substitute Nazha MDS machine-learning scores.\n\nNot a medical device and not a WHO SM diagnosis (see related who-sm). magent does not examine the patient.\n\nThis is Jawhar 2019 MARS for advanced systemic mastocytosis only. Not indolent SM. Not cutaneous mastocytosis. Not Nazha MDS machine-learning scores.\n\nmagent does not sequence. sar_mutation_count is the caller-assigned count of S/A/R mutations among SRSF2, ASXL1, and RUNX1 (0, 1, or 2 meaning two or more). Exactly one scores 1; two or more scores 2, not 1 plus 2.\n\nmagent does not assay hemoglobin or platelets. Labs are caller-supplied. Provide hemoglobin_g_dl or hemoglobin_g_l, not both.\n\nTraining-set median OS (Jawhar 2019): low not reached, intermediate 3.9 years, high 1.9 years. Validation-set OS (12.2 / 4.4 / 1.9 years) is a cohort figure, not a second band and not a patient-specific prediction. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120). >60 scores 1 (Jawhar 2019). Age 61 scores; age 60 is the ≤60 arm and scores 0.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"hemoglobin_g_dl","description":"Hemoglobin in g/dL (3-22). Provide this or hemoglobin_g_l, not both. <10 g/dL (<100 g/L) scores 1 (Jawhar 2019). 10.0 is the ≥10 arm and scores 0. magent does not assay hemoglobin.","required":false,"schema":{"type":"number"},"example":"12"},{"in":"query","name":"hemoglobin_g_l","description":"Hemoglobin in g/L (30-220). Converted as hemoglobin_g_dl = hemoglobin_g_l / 10. Provide this or hemoglobin_g_dl, not both. <100 g/L scores 1. 100 is the ≥100 arm and scores 0.","required":false,"schema":{"type":"number"},"example":"120"},{"in":"query","name":"platelets_10e9_l","description":"Platelet count in 10^9/L (1-2000). <100 scores 1 (Jawhar 2019). 100.0 is the ≥100 arm and scores 0. magent does not assay platelets.","required":true,"schema":{"type":"number"},"example":"200"},{"in":"query","name":"sar_mutation_count","description":"Caller-assigned count of S/A/R mutations among SRSF2, ASXL1, and RUNX1 (integer 0, 1, or 2; 2 means two or more). Exactly one scores 1. Two or more scores 2 (not 1 plus 2). Count 0 scores 0. magent does not sequence.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"MARS","operationId":"get_api_calc_mars","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk_band, age, hemoglobin_g_dl, platelets_10e9_l, sar_mutation_count, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_platelets: platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.; invalid_sar_count: sar_mutation_count must be 0, 1, or 2 (Jawhar 2019 MARS: number of S/A/R mutations among SRSF2, ASXL1, and RUNX1; 2 means two or more). magent does not sequence. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mars"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"MARS (bulk)","operationId":"post_api_calc_mars","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_platelets: platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.; invalid_sar_count: sar_mutation_count must be 0, 1, or 2 (Jawhar 2019 MARS: number of S/A/R mutations among SRSF2, ASXL1, and RUNX1; 2 means two or more). magent does not sequence. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mars"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","hemoglobin_g_dl":"12","platelets_10e9_l":"200","sar_mutation_count":"0"},{"age":"50","hemoglobin_g_dl":"12","platelets_10e9_l":"200","sar_mutation_count":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rescue-ihca":{"get":{"description":"Sum Tonna 2022 Table 2 RESCUE-IHCA integer cells for in-hospital death after adult ECPR and return the published point total, not a cannulation or ECPR order.\n\nWhen an agent has caller-assigned Tonna 2022 Table 2 predictors (age, preexisting renal insufficiency, time of day, illness category, presenting rhythm, arrest duration) and needs the integer score, not a percent read from a website curve and not an ECPR order.\n\nNot a medical device. magent does not cannulate, does not order ECPR, and does not examine the patient.\n\nNot an ECPR or cannulation order, not a futility determination, and not a code-status order. Derivation is adult IHCA treated with ECPR (excluded age <18 and OHCA preceding admission).\n\nTonna 2022 Table 2 integer cells only. Race appeared in univariate Table 1 but is not in the score (the paper excluded race from the prediction model).\n\nFigure 3 is a continuous probability curve (about 0.22-0.99). The paper does not print a numeric points-to-mortality lookup table; this tool returns the integer score only and does not invent tertiles or percents.\n\nTime of day follows Table 2: 07:00-14:59 (0), 15:00-22:59 (+4), 23:00-06:59 (+13). Medical noncardiac illness and asystole are the 0-point reference cells.\n\nDuration is caller-assigned integer minutes (0-180). Each complete 10 minutes scores +2. magent does not time the arrest. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Tonna 2022 Table 2: ≤20 → 2; each additional 10 years → +2, implemented as 2 + 2 * max(0, floor((age-20)/10)) so 20 → 2, 29 → 2, 30 → 4, 40 → 6. Adult derivation (excluded age <18). Caller-supplied; magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"20"},{"in":"query","name":"preexisting_renal_insufficiency","description":"Preexisting renal insufficiency as assigned by the caller (Tonna 2022 Table 2). true → +8. false → 0. magent does not grade creatinine.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"time_of_day","description":"Time of day of arrest (Tonna 2022 Table 2). day_0700_1459 (07:00-14:59, reference) → 0; evening_1500_2259 (15:00-22:59) → +4; night_2300_0659 (23:00-06:59) → +13. Caller-assigned; magent does not read a clock.","required":true,"schema":{"type":"string"},"example":"day_0700_1459"},{"in":"query","name":"illness_category","description":"Illness category (Tonna 2022 Table 2). medical_noncardiac (reference) → 0; medical_cardiac → -2; surgical_noncardiac → -6; surgical_cardiac → -11. Caller-assigned; magent does not classify the admission.","required":true,"schema":{"type":"string"},"example":"surgical_cardiac"},{"in":"query","name":"presenting_rhythm","description":"Presenting rhythm (Tonna 2022 Table 2). asystole (reference) → 0; pea → -1; pvt → -5; vf → -8; palpable_pulse_initially → -5. Caller-assigned; magent does not interpret a monitor.","required":true,"schema":{"type":"string"},"example":"vf"},{"in":"query","name":"duration_min","description":"Duration of cardiac arrest in integer minutes (0-180). Tonna 2022 Table 2: +2 per complete 10 minutes (2 * floor(duration_min/10)). 0-9 → 0; 10-19 → +2; 20-29 → +4. Caller-supplied; magent does not time the arrest.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"RESCUE-IHCA","operationId":"get_api_calc_rescue_ihca","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, min_score, components, citation, disclaimer."},"400":{"description":"invalid_rescue_ihca: RESCUE-IHCA needs Tonna 2022 age, renal history, time of day, illness category, rhythm, and arrest duration in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rescue-ihca"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"RESCUE-IHCA (bulk)","operationId":"post_api_calc_rescue_ihca","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rescue_ihca: RESCUE-IHCA needs Tonna 2022 age, renal history, time of day, illness category, rhythm, and arrest duration in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rescue-ihca"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"20","duration_min":"0","illness_category":"surgical_cardiac","preexisting_renal_insufficiency":"false","presenting_rhythm":"vf","time_of_day":"day_0700_1459"},{"age":"20","duration_min":"0","illness_category":"surgical_cardiac","preexisting_renal_insufficiency":"false","presenting_rhythm":"vf","time_of_day":"day_0700_1459"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/modified-fisher":{"get":{"description":"Return the Frontera 2006 modified Fisher CT grade 0-4 from a caller-assigned grade, with the published grade description.\n\nWhen an agent needs the modified Fisher (Frontera 2006) CT grades 0-4 and must not invent Fisher 1980 original groups, a millimetre thin/thick cutoff, or a linear vasospasm-risk percentage.\n\nNot a medical device and not a diagnosis. magent does not read the CT.\n\nThis is Frontera 2006 modified Fisher grades 0-4. It is not Fisher 1980 original groups 1-4 (those have no grade 0).\n\nFrontera 2006 did not apply explicit criteria for thin versus thick. magent does not invent a millimetre cutoff. Crude odds of symptomatic vasospasm versus grades 0-1 were OR 1.6 (grade 2), OR 1.6 (grade 3), and OR 2.2 (grade 4). magent returns grade and description only. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"grade","description":"Frontera 2006 modified Fisher CT grade 0-4 as assigned by the caller from CT (0 no SAH or IVH; 1 focal or diffuse thin SAH, no IVH; 2 focal or diffuse thin SAH with IVH; 3 thick SAH, no IVH; 4 thick SAH with IVH). magent does not read the CT. Not Fisher 1980 original groups 1-4.","required":true,"schema":{"type":"integer"},"example":"1"}],"summary":"Modified Fisher","operationId":"get_api_calc_modified_fisher","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, grade, score, max_score, description, components, citation, disclaimer."},"400":{"description":"invalid_modified_fisher_grade: grade must be an integer from 0 to 4 (Frontera 2006 modified Fisher). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/modified-fisher"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Modified Fisher (bulk)","operationId":"post_api_calc_modified_fisher","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_modified_fisher_grade: grade must be an integer from 0 to 4 (Frontera 2006 modified Fisher). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/modified-fisher"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"grade":"1"},{"grade":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rdos":{"get":{"description":"Sum the eight Campbell 2010 RDOS observer-rated items (each a caller-assigned integer 0-2) and return the published total (max 16).\n\nWhen an agent has already assigned Campbell 2010 item integers for a patient unable to self-report dyspnea and needs the published 0-16 total, not a later intensity cutoff, opioid order, or oxygen order.\n\nNot a medical device and not an opioid or oxygen order.\n\nEach of the eight items is a caller-assigned integer 0, 1, or 2 from Campbell 2010. magent does not observe the patient and does not convert raw beats/min or breaths/min.\n\nCampbell 2010 published the 0-16 instrument. magent does not apply later cutoff papers. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"heart_rate","description":"Caller-assigned Campbell 2010 heart_rate points (integer 0-2). Paper bins: ≤90 beats/min → 0; 91–110 → 1; ≥111 → 2. magent does not convert raw beats/min and does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"respiratory_rate","description":"Caller-assigned Campbell 2010 respiratory_rate points (integer 0-2). Paper bins: ≤18 breaths/min → 0; 19–28 → 1; ≥29 → 2. magent does not convert raw breaths/min and does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"restlessness","description":"Caller-assigned Campbell 2010 restlessness (nonpurposeful movements) points (integer 0-2): 0 none; 1 occasional, slight movements; 2 frequent movements. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"paradoxical_breathing","description":"Caller-assigned Campbell 2010 paradoxical_breathing points (integer 0-2). Paper scores 0 none or 2 present (abdomen moves in on inspiration); there is no 1-point cell. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"accessory_muscle_use","description":"Caller-assigned Campbell 2010 accessory_muscle_use (rise in clavicle during inspiration) points (integer 0-2): 0 none; 1 slight rise; 2 pronounced rise. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"grunting","description":"Caller-assigned Campbell 2010 grunting at end-expiration (guttural sound) points (integer 0-2). Paper scores 0 none or 2 present; there is no 1-point cell. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"nasal_flaring","description":"Caller-assigned Campbell 2010 nasal_flaring (involuntary movement of nares) points (integer 0-2). Paper scores 0 none or 2 present; there is no 1-point cell. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"look_of_fear","description":"Caller-assigned Campbell 2010 look_of_fear points (integer 0-2). Paper scores 0 none or 2 eyes wide open, facial muscles tense, brow furrowed, mouth open, teeth together; there is no 1-point cell. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"RDOS","operationId":"get_api_calc_rdos","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_rdos: heart_rate, respiratory_rate, restlessness, paradoxical_breathing, accessory_muscle_use, grunting, nasal_flaring, and look_of_fear must each be an integer 0, 1, or 2 (Campbell 2010 RDOS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rdos"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"RDOS (bulk)","operationId":"post_api_calc_rdos","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rdos: heart_rate, respiratory_rate, restlessness, paradoxical_breathing, accessory_muscle_use, grunting, nasal_flaring, and look_of_fear must each be an integer 0, 1, or 2 (Campbell 2010 RDOS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rdos"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"accessory_muscle_use":"0","grunting":"0","heart_rate":"0","look_of_fear":"0","nasal_flaring":"0","paradoxical_breathing":"0","respiratory_rate":"0","restlessness":"0"},{"accessory_muscle_use":"0","grunting":"0","heart_rate":"0","look_of_fear":"0","nasal_flaring":"0","paradoxical_breathing":"0","respiratory_rate":"0","restlessness":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/kocher":{"get":{"description":"Sum the four Kocher 1999 predictors and return the published predicted probability of septic arthritis versus transient synovitis in children with irritable hip.\n\nWhen an agent needs the published Kocher 1999 point total and predicted probability and must not invent hip findings or treat the total as a diagnosis or aspiration order.\n\nNot a medical device, not a diagnosis of septic arthritis, and not an aspiration or operating-room order.\n\nKocher 1999 four predictors only (history of fever, non-weight-bearing, ESR ≥40 mm/h, serum WBC >12,000/mm³). Does not include Caird CRP. Not for adults.\n\nHistory of fever and non-weight-bearing are caller-assigned. magent does not examine the hip. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"history_of_fever","description":"History of fever (oral temperature >38.5°C in Kocher 1999). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"non_weight_bearing","description":"Non-weight-bearing on the affected limb (Kocher 1999). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"esr_mm_h","description":"Erythrocyte sedimentation rate in mm/h (1.0-150.0). ≥40 scores 1 (40 scores; 39.9 does not).","required":true,"schema":{"type":"number"},"example":"20"},{"in":"query","name":"wbc_k_ul","description":"WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500. >12000/µL scores 1.","required":false,"schema":{"type":"number"},"example":"8.0"},{"in":"query","name":"wbc_ul","description":"WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000. >12000 scores 1 (12000 does not; 12001 does).","required":false,"schema":{"type":"number"},"example":"8000"}],"summary":"Kocher criteria","operationId":"get_api_calc_kocher","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, predicted_probability, esr_mm_h, wbc_ul, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_esr: esr_mm_h must be a number from 1 to 150. Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/kocher"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Kocher criteria (bulk)","operationId":"post_api_calc_kocher","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_esr: esr_mm_h must be a number from 1 to 150. Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/kocher"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"esr_mm_h":"20","history_of_fever":"false","non_weight_bearing":"false","wbc_k_ul":"8.0"},{"esr_mm_h":"20","history_of_fever":"false","non_weight_bearing":"false","wbc_k_ul":"8.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/flamm-vbac":{"get":{"description":"Sum the Flamm 1997 admission VBAC points (max 10) from caller-assigned age, vaginal-birth history, first-cesarean indication, and admission cervical factors, and return the published 49% or 95% success rates only for scores 0–2 and 8–10.\n\nWhen an agent already has Flamm 1997 admission factors and needs the published point total, not a trial-of-labor order, cervical exam, Grobman nomogram, or invented intermediate percents.\n\nNot a medical device and not a trial-of-labor or cesarean order. magent does not examine the cervix.\n\nFlamm 1997 published VBAC success of 49% for scores 0–2 and 95% for scores 8–10. Scores 3–7 return the point total without a success percent.\n\nDoes not implement the Grobman VBAC nomogram. This tool has no race input. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_lt_40","description":"Maternal age under 40 years as assigned by the caller (Flamm 1997). true scores 2. true or false. magent does not date the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"vaginal_birth","description":"Prior vaginal birth history as assigned by the caller (Flamm 1997). Choose one: none scores 0; before_first_cesarean scores 1; after_first_cesarean scores 2; before_and_after scores 4. magent does not read the obstetric history.","required":true,"schema":{"type":"string","enum":["none","before_first_cesarean","after_first_cesarean","before_and_after"]},"example":"none"},{"in":"query","name":"non_ftp_indication","description":"First cesarean was for a reason other than failure to progress (Flamm 1997). true scores 1. true or false. magent does not read the operative indication.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"effacement","description":"Cervical effacement at admission as assigned by the caller (Flamm 1997). gt_75 scores 2; from_25_to_75 scores 1; lt_25 scores 0. magent does not examine the cervix.","required":true,"schema":{"type":"string","enum":["gt_75","from_25_to_75","lt_25"]},"example":"lt_25"},{"in":"query","name":"dilation_ge_4","description":"Cervical dilation at or above 4 cm at admission as assigned by the caller (Flamm 1997). true scores 1. true or false. magent does not examine the cervix.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Flamm VBAC score","operationId":"get_api_calc_flamm_vbac","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, vbac_success_percent, components, citation, disclaimer."},"400":{"description":"invalid_flamm_vbac: Flamm VBAC score inputs must match Flamm 1997 age, prior vaginal birth, cesarean indication, and admission cervical factors from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/flamm-vbac"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Flamm VBAC score (bulk)","operationId":"post_api_calc_flamm_vbac","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flamm_vbac: Flamm VBAC score inputs must match Flamm 1997 age, prior vaginal birth, cesarean indication, and admission cervical factors from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/flamm-vbac"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_lt_40":"true","dilation_ge_4":"false","effacement":"lt_25","non_ftp_indication":"false","vaginal_birth":"none"},{"age_lt_40":"true","dilation_ge_4":"false","effacement":"lt_25","non_ftp_indication":"false","vaginal_birth":"none"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/fast-ed":{"get":{"description":"Sum Lima 2016 Field Assessment Stroke Triage for Emergency Destination (FAST-ED) points from caller-assigned facial palsy, arm weakness, speech, eye deviation, and neglect, and return whether the total suggests large-vessel occlusion (score ≥4) plus the published LVO-rate band.\n\nWhen an agent has caller-assigned Lima 2016 FAST-ED field items and needs the published 0-9 total, score ≥4 LVO flag, and 0_to_1 / 2_to_3 / gte_4 band, not a stroke diagnosis, transfer order, or NIHSS total.\n\nNot a medical device. magent does not examine the patient. Facial palsy, arm weakness, speech, eye deviation, and neglect are caller-assigned Lima 2016 FAST-ED integers (Table 1).\n\nNot a stroke diagnosis and not a transfer or thrombolysis order.\n\nThis is the published FAST-ED field scale, not NIHSS. magent does not compute NIHSS.\n\nTime from last known well is documented for decision making (0 points) and is not a scoring parameter.\n\nlvo_suggested is true iff score ≥ 4 (this paper's abstract threshold). fast_ed_band is the published LVO-rate grouping only (0-1 <15%, 2-3 ~30%, ≥4 ~60%+). Sensitivity, PPV, and a patient-level LVO probability are not returned. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"facial_palsy","description":"Caller-assigned Lima 2016 FAST-ED facial palsy (integer 0-1): 0 normal or minor, 1 partial or complete. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1]},"example":"0"},{"in":"query","name":"arm_weakness","description":"Caller-assigned Lima 2016 FAST-ED arm weakness (integer 0-2): 0 no drift, 1 drift or some effort against gravity, 2 no effort against gravity or no movement. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"speech","description":"Caller-assigned Lima 2016 FAST-ED speech changes (integer 0-2): 0 absent, 1 mild to moderate, 2 severe, global aphasia, or mute. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"eye_deviation","description":"Caller-assigned Lima 2016 FAST-ED eye deviation (integer 0-2): 0 absent, 1 partial, 2 forced. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"neglect","description":"Caller-assigned Lima 2016 FAST-ED denial/neglect (integer 0-2): 0 absent, 1 extinction to bilateral stimulation in only one sensory modality, 2 does not recognize own hand or orients only to one side. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"}],"summary":"FAST-ED","operationId":"get_api_calc_fast_ed","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, lvo_suggested, fast_ed_band, facial_palsy, arm_weakness, speech, eye_deviation, neglect, components, citation, disclaimer."},"400":{"description":"invalid_fast_ed: facial_palsy must be 0-1; arm_weakness, speech, eye_deviation, and neglect must each be 0-2 (Lima 2016 FAST-ED). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/fast-ed"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"FAST-ED (bulk)","operationId":"post_api_calc_fast_ed","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_fast_ed: facial_palsy must be 0-1; arm_weakness, speech, eye_deviation, and neglect must each be 0-2 (Lima 2016 FAST-ED). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/fast-ed"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"arm_weakness":"0","eye_deviation":"0","facial_palsy":"0","neglect":"0","speech":"0"},{"arm_weakness":"0","eye_deviation":"0","facial_palsy":"0","neglect":"0","speech":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-functional-dysphagia":{"get":{"description":"Apply the Aziz 2016 Rome IV functional dysphagia diagnostic criteria and return whether the published functional dysphagia box holds (rome_iv_functional_dysphagia).\n\nWhen an agent already has the six caller-assigned Aziz 2016 Rome IV functional dysphagia flags and needs whether the published box holds. magent does not read barium, endoscopy, or manometry.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose functional dysphagia.\n\nThe caller assigns the six flags. magent does not read barium, endoscopy, or manometry.\n\nThis tool is Aziz 2016 Rome IV functional dysphagia only. Not globus. Not oropharyngeal dysphagia as the primary tool. Minor or borderline motor disorders remain compatible; this tool does not add extra flags for them. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sense_of_food_sticking_or_passing_abnormally","description":"Sense of solid and/or liquid foods sticking, lodging, or passing abnormally through the esophagus, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"no_mucosal_or_structural_abnormality","description":"Absence of evidence that esophageal mucosal or structural abnormality is the cause, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not read endoscopy or barium.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"not_explained_by_gerd_or_eoe","description":"Symptoms not explained by GERD or eosinophilic esophagitis, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not read endoscopy.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"no_major_esophageal_motor_disorder","description":"Absence of a major esophageal motor disorder, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not interpret manometry. Minor or borderline motor disorders remain compatible.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"fulfilled_last_3_months","description":"Criteria fulfilled for the last 3 months, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"onset_at_least_6_months","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Aziz 2016 Rome IV functional dysphagia","operationId":"get_api_calc_rome_iv_functional_dysphagia","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, rome_iv_functional_dysphagia, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_functional_dysphagia: Rome IV functional dysphagia needs the Aziz 2016 esophageal dysphagia flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-functional-dysphagia"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Aziz 2016 Rome IV functional dysphagia (bulk)","operationId":"post_api_calc_rome_iv_functional_dysphagia","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_functional_dysphagia: Rome IV functional dysphagia needs the Aziz 2016 esophageal dysphagia flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-functional-dysphagia"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"fulfilled_last_3_months":"true","no_major_esophageal_motor_disorder":"true","no_mucosal_or_structural_abnormality":"true","not_explained_by_gerd_or_eoe":"true","onset_at_least_6_months":"true","sense_of_food_sticking_or_passing_abnormally":"true"},{"fulfilled_last_3_months":"true","no_major_esophageal_motor_disorder":"true","no_mucosal_or_structural_abnormality":"true","not_explained_by_gerd_or_eoe":"true","onset_at_least_6_months":"true","sense_of_food_sticking_or_passing_abnormally":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/preset":{"get":{"description":"Sum the five Hilder 2017 PRESET-Score items and return class I–III with derivation ICU mortality.\n\nWhen an agent needs the published PRESET-Score total and must not invent a cannulation decision or a continuous logit.\n\nNot a medical device and not an ECMO cannulation, continuation, or withdrawal order. magent does not assay labs or examine the patient.\n\nFive Hilder 2017 Table 4 categorical items only. There is no continuous logit. MAP is mm Hg, lactate mmol/L, arterial pH, platelets ×1000/µL, and hospital days before ECMO as assigned by the caller.\n\nICU mortality percents are the derivation-cohort classes (I 0–5 → 26%, II 6–9 → 68%, III 10–15 → 93%). They are not a website 0–3 / 4–5 class split.\n\nNot RESP (Schmidt 2014), not SAVE, and not ECMOnet. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"mean_arterial_pressure_mm_hg","description":"Mean arterial pressure in mm Hg (20-250). Hilder 2017 Table 4: >100 → 0, 91-100 → 1, 81-90 → 2, 71-80 → 3, ≤70 → 4. magent does not measure blood pressure.","required":true,"schema":{"type":"number"},"example":"110"},{"in":"query","name":"lactate_mmol_l","description":"Lactate in mmol/L (0.0-30.0). Hilder 2017 Table 4: ≤1.50 → 0, 1.51-3.00 → 1, 3.01-6.00 → 2, 6.01-10.00 → 3, >10.00 → 4. magent does not assay labs.","required":true,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"arterial_ph","description":"Arterial pH (6.5-8.0). Hilder 2017 Table 4: >7.300 → 0, 7.201-7.300 → 1, 7.101-7.200 → 2, ≤7.100 → 3. magent does not assay blood gas.","required":true,"schema":{"type":"number"},"example":"7.40"},{"in":"query","name":"platelets_k_ul","description":"Platelet concentration ×1000/µL (1-2000). Hilder 2017 Table 4: >200 → 0, 101-200 → 1, ≤100 → 2. magent does not assay labs.","required":true,"schema":{"type":"number"},"example":"250"},{"in":"query","name":"hospital_days_pre_ecmo","description":"Hospital days before ECMO initiation (integer 0-365). Hilder 2017 Table 4: ≤2 → 0, 3-7 → 1, >7 → 2. Not a cannulation order.","required":true,"schema":{"type":"integer"},"example":"1"}],"summary":"PRESET","operationId":"get_api_calc_preset","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, preset_class, icu_mortality_percent, mean_arterial_pressure_mm_hg, lactate_mmol_l, arterial_ph, platelets_k_ul, hospital_days_pre_ecmo, components, citation, disclaimer."},"400":{"description":"invalid_preset: PRESET needs Hilder 2017 MAP, lactate, pH, platelets, and pre-ECMO hospital days in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/preset"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PRESET (bulk)","operationId":"post_api_calc_preset","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_preset: PRESET needs Hilder 2017 MAP, lactate, pH, platelets, and pre-ECMO hospital days in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/preset"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"arterial_ph":"7.40","hospital_days_pre_ecmo":"1","lactate_mmol_l":"1.0","mean_arterial_pressure_mm_hg":"110","platelets_k_ul":"250"},{"arterial_ph":"7.40","hospital_days_pre_ecmo":"1","lactate_mmol_l":"1.0","mean_arterial_pressure_mm_hg":"110","platelets_k_ul":"250"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/hark":{"get":{"description":"Sum the four Sohal 2007 HARK items and return whether one or more answers are affirmative.\n\nWhen an agent needs the published HARK point total and Sohal 2007 ≥1 screen and must not invent a diagnosis of intimate partner violence or interview the patient.\n\nNot a medical device and not a diagnosis of intimate partner violence.\n\nmagent does not interview the patient.\n\nThe caller assigns each flag. magent does not interpret individual items.\n\nThis is Sohal 2007 HARK only (four yes/no flags; screen-positive at score ≥1). Not HITS 1-5 scoring. magent does not apply the AAS pregnancy item (HARK removed it). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"humiliation","description":"Within the last year, humiliated or emotionally abused in other ways by partner or ex-partner (HARK H; Sohal 2007). true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"afraid","description":"Within the last year, afraid of partner or ex-partner (HARK A; Sohal 2007). true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"rape","description":"Within the last year, raped or forced to have any kind of sexual activity by partner or ex-partner (HARK R; Sohal 2007). true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"kick","description":"Within the last year, kicked, hit, slapped or otherwise physically hurt by partner or ex-partner (HARK K; Sohal 2007). true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"HARK","operationId":"get_api_calc_hark","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, screen_positive, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hark"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HARK (bulk)","operationId":"post_api_calc_hark","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hark"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"afraid":"false","humiliation":"false","kick":"false","rape":"false"},{"afraid":"false","humiliation":"false","kick":"false","rape":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mdrd":{"get":{"description":"Compute IDMS-traceable 4-variable MDRD eGFR in mL/min/1.73m2 from standardized creatinine, adult age, sex, and caller-assigned Black as used in Levey 2006.\n\nWhen an agent must apply the published IDMS 4-variable MDRD equation rather than invent kidney function, including the Levey 2006 Black coefficient as assigned by the caller. magent does not assign race.\n\nIDMS-traceable 4-variable MDRD (Levey 2006). Not the 1999 conventional 186 equation. Not CKD-EPI 2021 (egfr).\n\nblack is caller-assigned as used in Levey 2006; magent does not assign race.\n\nAdults only (age 18-120). Not a pediatric equation.\n\nNot a treatment or dosing recommendation and not a medical device. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"creatinine_mg_dl","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l.","required":false,"schema":{"type":"number"},"example":1.1},{"in":"query","name":"creatinine_umol_l","description":"Serum creatinine in µmol/L. Converted as mg/dL = µmol/L / 88.42. IDMS-traceable standardized creatinine as in Levey 2006.","required":false,"schema":{"type":"number"},"example":97.262},{"in":"query","name":"age","description":"Age in years (18-120). MDRD is for adults.","required":true,"schema":{"type":"integer"},"example":65},{"in":"query","name":"sex","description":"Sex used by the published equation. female applies 0.742; male does not.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"black","description":"Caller-assigned Black as used in Levey 2006; magent does not assign race. true applies 1.212.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"IDMS MDRD eGFR","operationId":"get_api_calc_mdrd","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, creatinine_mg_dl, age_years, sex, black, egfr_ml_min_1_73m2, units, citation, disclaimer."},"400":{"description":"invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_mdrd: MDRD needs IDMS creatinine, adult age, sex, and caller-assigned black as used in Levey 2006. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mdrd"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"IDMS MDRD eGFR (bulk)","operationId":"post_api_calc_mdrd","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_mdrd: MDRD needs IDMS creatinine, adult age, sex, and caller-assigned black as used in Levey 2006. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mdrd"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"65","black":"false","creatinine_mg_dl":"1.1","sex":"female"},{"age":"65","black":"false","creatinine_mg_dl":"1.1","sex":"female"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/riete":{"get":{"description":"Sum the Ruiz-Giménez 2008 RIETE adverse factors for 3-month major bleeding after documented acute VTE and return low (0), intermediate (1–4), or high (>4).\n\nWhen an agent needs the published RIETE 2008 point total and class and must not invent a VTE diagnosis or a bleed-treatment or anticoagulation protocol.\n\nNot a medical device and not a VTE diagnosis or bleed-treatment protocol. magent does not examine the patient.\n\nBands are published 3-month major-bleed rates from Ruiz-Giménez 2008 (derivation 0.3%/2.6%/7.3%; validation 0.1%/2.8%/6.2%), not an anticoagulation protocol.\n\nmagent does not assay hemoglobin or compute creatinine from a lab. All six inputs are caller-assigned flags. Anemia in the paper is Hb <13 g/dL in men / <12 g/dL in women. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"recent_major_bleeding","description":"Recent major bleeding as assigned by the caller (Ruiz-Giménez 2008). true scores 2.0. magent does not grade bleeding.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"creatinine_gt_1_2","description":"Creatinine >1.2 mg/dL as assigned by the caller (Ruiz-Giménez 2008). true scores 1.5. magent does not compute creatinine from a lab.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"anemia","description":"Anemia as assigned by the caller (Ruiz-Giménez 2008: hemoglobin <13 g/dL in men or <12 g/dL in women). true scores 1.5. magent does not assay hemoglobin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cancer","description":"Cancer as assigned by the caller (Ruiz-Giménez 2008). true scores 1.0. magent does not diagnose cancer.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"clinically_overt_pe","description":"Clinically overt pulmonary embolism as assigned by the caller (Ruiz-Giménez 2008). true scores 1.0. magent does not diagnose PE.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"age_gt_75","description":"Age >75 years as assigned by the caller (Ruiz-Giménez 2008). true scores 1.0. magent does not assign age.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"RIETE","operationId":"get_api_calc_riete","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, riete_band, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/riete"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"RIETE (bulk)","operationId":"post_api_calc_riete","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/riete"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_gt_75":"false","anemia":"false","cancer":"false","clinically_overt_pe":"false","creatinine_gt_1_2":"false","recent_major_bleeding":"false"},{"age_gt_75":"false","anemia":"false","cancer":"false","clinically_overt_pe":"false","creatinine_gt_1_2":"false","recent_major_bleeding":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/cpes":{"get":{"description":"Sum the six Bangalore 2023 composite PE shock flags from caller-assigned booleans and return the 0–6 integer total. No named risk bands.\n\nWhen an agent already has intermediate-risk (normotensive) PE findings assigned as six yes/no flags and needs the published 0–6 total, not a shock diagnosis, not sPESI, not Bova, and not PESI.\n\nNot a medical device and not a shock diagnosis. Not a reperfusion or thrombolysis order.\n\nFor intermediate-risk (normotensive) PE as in Bangalore 2023. Not high-risk hypotensive PE. Not sPESI, not Bova, and not PESI.\n\nSix equally weighted caller-assigned flags. magent does not read echo or assays and does not take raw heart rate. Site troponin and BNP cutoffs were not standardized; this tool does not invent numeric biomarker thresholds.\n\nReturns the 0–6 integer score and max_score only. Bangalore 2023 reported prevalence of normotensive shock by integer score 0–6 and that a score of 6 predicted shock versus <6. This tool does not invent named risk bands. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"elevated_troponin","description":"Elevated troponin per local assay, as assigned by the caller (Bangalore 2023). true scores 1; false scores 0. Site cutoffs were not standardized; magent does not invent a numeric threshold or read the assay.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"elevated_bnp","description":"Elevated BNP, as assigned by the caller (Bangalore 2023). true scores 1; false scores 0. Site cutoffs were not standardized; magent does not invent a numeric threshold or read the assay.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"moderate_or_severe_rv_dysfunction","description":"Moderately or severely reduced RV function, as assigned by the caller (Bangalore 2023). Normal or mild reduction is false. true scores 1; false scores 0. magent does not read echo.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"saddle_pe","description":"Saddle PE or central thrombus burden, as assigned by the caller (Bangalore 2023). true scores 1; false scores 0. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"concomitant_dvt","description":"Concomitant DVT, as assigned by the caller (Bangalore 2023). true scores 1; false scores 0. magent does not diagnose DVT.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"tachycardia","description":"Tachycardia ≥100 beats/min as assigned by the caller (Bangalore 2023). true scores 1; false scores 0. magent does not take raw heart rate.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"CPES","operationId":"get_api_calc_cpes","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cpes"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CPES (bulk)","operationId":"post_api_calc_cpes","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cpes"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"concomitant_dvt":"false","elevated_bnp":"false","elevated_troponin":"false","moderate_or_severe_rv_dysfunction":"false","saddle_pe":"false","tachycardia":"false"},{"concomitant_dvt":"false","elevated_bnp":"false","elevated_troponin":"false","moderate_or_severe_rv_dysfunction":"false","saddle_pe":"false","tachycardia":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pediatric-asthma-score":{"get":{"description":"Sum five caller-assigned Qureshi 1998 Table 1 pediatric asthma-score domains (each integer 1-3) and return the published 5-15 total and mild/moderate/severe asthma_band.\n\nWhen an agent has already assigned Qureshi 1998 Table 1 1-3 points for respiratory rate, oxygen saturation, auscultation, retractions, and dyspnea and needs the 5-15 total and Table 1 asthma_band. magent does not count breaths, measure SpO2, auscultate, or diagnose asthma.\n\nNot a medical device and not an asthma diagnosis or a treatment or admission order.\n\nEach of the five domains is a caller-assigned integer 1-3 from Qureshi 1998 Table 1. Respiratory rate is that table's age-banded 1/2/3 column, not raw breaths/min and not age. magent does not count breaths, measure SpO2, auscultate, or grade work of breathing.\n\nQureshi 1998 Table 1 asthma-score bands: mild 5-7, moderate 8-11, severe 12-15. Peak expiratory flow percent predicted in that table is a parallel severity path; magent does not take PEF.\n\nNot PRAM. Not Liu 2004. Not Westley croup. Not Pediatric Appendicitis Score. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"respiratory_rate","description":"Caller-assigned Qureshi 1998 Table 1 respiratory-rate points (integer 1-3), not raw breaths/min and not age. Table 1 age bands for 1/2/3: 2-3 yr ≤34 / 35-39 / ≥40; 4-5 yr ≤30 / 31-35 / ≥36; 6-12 yr ≤26 / 27-30 / ≥31; >12 yr ≤23 / 24-27 / ≥28. That paper enrolled ages 2-18 and has no <2 yr column. magent does not count breaths.","required":true,"schema":{"type":"integer"},"example":1},{"in":"query","name":"oxygen_saturation","description":"Caller-assigned Qureshi 1998 Table 1 oxygen-saturation points (integer 1-3): 1 if >95% on room air; 2 if 90-95% on room air or >90% with supplemental oxygen; 3 if <90% on room air or supplemental oxygen as in Table 1. magent does not measure SpO2.","required":true,"schema":{"type":"integer"},"example":1},{"in":"query","name":"auscultation","description":"Caller-assigned Qureshi 1998 Table 1 auscultation (integer 1-3): 1 normal breathing or end-expiratory wheeze; 2 expiratory wheezing; 3 inspiratory and expiratory wheezing, diminished breath sounds, or both. magent does not auscultate.","required":true,"schema":{"type":"integer"},"example":1},{"in":"query","name":"retractions","description":"Caller-assigned Qureshi 1998 Table 1 retractions (integer 1-3): 1 none or intercostal; 2 intercostal and substernal; 3 intercostal, substernal, and supraclavicular. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":1},{"in":"query","name":"dyspnea","description":"Caller-assigned Qureshi 1998 Table 1 dyspnea (integer 1-3): 1 speaks in sentences or coos and babbles; 2 speaks in partial sentences or short cries; 3 speaks in single words, short phrases, or grunts. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":1}],"summary":"Pediatric asthma score","operationId":"get_api_calc_pediatric_asthma_score","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, asthma_band, respiratory_rate, oxygen_saturation, auscultation, retractions, dyspnea, components, citation, disclaimer."},"400":{"description":"invalid_pediatric_asthma_component: each Qureshi 1998 pediatric asthma-score domain must be an integer from 1 to 3. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pediatric-asthma-score"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Pediatric asthma score (bulk)","operationId":"post_api_calc_pediatric_asthma_score","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pediatric_asthma_component: each Qureshi 1998 pediatric asthma-score domain must be an integer from 1 to 3. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pediatric-asthma-score"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"auscultation":"1","dyspnea":"1","oxygen_saturation":"1","respiratory_rate":"1","retractions":"1"},{"auscultation":"1","dyspnea":"1","oxygen_saturation":"1","respiratory_rate":"1","retractions":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/corrected-calcium":{"get":{"description":"Compute albumin-corrected calcium as calcium_mg_dl + 0.8 * (4.0 - albumin_g_dl). Payne 1973 reports an adjustment of calcium - albumin + 4.0 (coefficient 1.0). This calculator uses the simplified form (0.8 mg/dL per g/dL, equivalent to 0.02 mmol/L per g/L). Simplified form: Desgagnés N, King JA, Kline GA, Seiden-Long I, Leung AA. Use of Albumin-Adjusted Calcium Measurements in Clinical Practice. JAMA Netw Open. 2025;8(1):e2455251. DOI 10.1001/jamanetworkopen.2024.55251.\n\nWhen an agent needs albumin-corrected calcium arithmetic with this simplified 0.8 coefficient and must not apply a guessed factor.\n\nNot a treatment recommendation and not an ionized-calcium substitute.\n\nUses albumin 4.0 g/dL as the reference albumin in the simplified 0.8-factor expression. Does not accept ionized calcium or alternative coefficients. Payne 1973 reports calcium - albumin + 4.0 (coefficient 1.0). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"calcium_mg_dl","description":"Total calcium in mg/dL (4-16). Provide this or calcium_mmol_l.","required":false,"schema":{"type":"number"},"example":"8.0"},{"in":"query","name":"calcium_mmol_l","description":"Total calcium in mmol/L. Converted as mg/dL = mmol/L * 4.0.","required":false,"schema":{"type":"number"},"example":"2.0"},{"in":"query","name":"albumin_g_dl","description":"Albumin in g/dL (1-6). Provide this or albumin_g_l.","required":false,"schema":{"type":"number"},"example":"3.0"},{"in":"query","name":"albumin_g_l","description":"Albumin in g/L. Converted as g/dL = g/L / 10.","required":false,"schema":{"type":"number"},"example":"30"}],"summary":"Albumin-corrected calcium (simplified Payne formula, 0.8 factor)","operationId":"get_api_calc_corrected_calcium","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, calcium_mg_dl, albumin_g_dl, corrected_calcium_mg_dl, citation, disclaimer."},"400":{"description":"invalid_calcium: calcium_mg_dl (4-16) or calcium_mmol_l (1-4) is required Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/corrected-calcium"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Albumin-corrected calcium (simplified Payne formula, 0.8 factor) (bulk)","operationId":"post_api_calc_corrected_calcium","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_calcium: calcium_mg_dl (4-16) or calcium_mmol_l (1-4) is required Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/corrected-calcium"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"albumin_g_dl":"3.0","calcium_mg_dl":"8.0"},{"albumin_g_dl":"3.0","calcium_mg_dl":"8.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pf-ratio":{"get":{"description":"Compute the PaO2/FiO2 ratio as arterial PO2 in mm Hg divided by inspired oxygen fraction.\n\nWhen an agent needs PaO2 divided by FiO2 and must not invent ARDS severity bands or the oxygenation index.\n\nNot a diagnosis. Magent does not apply ARDS severity cutoffs.\n\nThis is not the oxygenation index (FiO2 × MAP × 100 / PaO2).\n\nFiO2 is required as a fraction (0.21–1.0), not a percent, and is not defaulted to room air. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"pao2_mm_hg","description":"Arterial PO2 in mm Hg (20-700).","required":true,"schema":{"type":"number"},"example":"95"},{"in":"query","name":"fio2","description":"Inspired oxygen as a fraction (0.21-1.0), not a percent. Required.","required":true,"schema":{"type":"number"},"example":"0.21"}],"summary":"PaO2/FiO2 ratio","operationId":"get_api_calc_pf_ratio","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, pao2_mm_hg, fio2, pf_ratio, citation, disclaimer."},"400":{"description":"invalid_pao2: pao2_mm_hg must be a number from 20 to 700. Returned before settlement; you are not charged.; invalid_fio2: fio2 must be a fraction from 0.21 to 1.0. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pf-ratio"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PaO2/FiO2 ratio (bulk)","operationId":"post_api_calc_pf_ratio","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pao2: pao2_mm_hg must be a number from 20 to 700. Returned before settlement; you are not charged.; invalid_fio2: fio2 must be a fraction from 0.21 to 1.0. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pf-ratio"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"fio2":"0.21","pao2_mm_hg":"95"},{"fio2":"0.21","pao2_mm_hg":"95"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/uiss":{"get":{"description":"Apply the Zisman 2002 localized N0M0 three-group UISS algorithm to caller-assigned 1997 pathological T, Fuhrman grade, and ECOG PS and return low_risk, intermediate_risk, or high_risk. Does not compute a predicted 5-year disease-specific survival.\n\nWhen an agent already has surgically resected unilateral RCC that is N0M0, a 1997 pathological T, a Fuhrman 1982 grade, and an ECOG 0-4, and needs the published Zisman 2002 three-group box. magent does not assign TNM, read slides, or observe performance status. Not 2001 UISS I-V, not metastatic UISS, and not SSIGN.\n\nNot a medical device and not a diagnosis of renal cell carcinoma. magent does not assign TNM or read slides.\n\nZisman 2002 localized N0M0 three-group algorithm only (as reproduced in EAU/ESMO decision boxes of that paper). Not the 2001 five-group UISS I-V. Not metastatic UISS. N-positive or M-positive disease is out of scope.\n\nNot SSIGN. This tool does not implement the Mayo SSIGN score.\n\nt_stage is caller-assigned 1997 pathological T (t1-t4). fuhrman_grade and ecog are caller-assigned. magent does not grade nuclei or observe the patient.\n\nRequires surgically resected unilateral RCC with explicit n0_m0 true. This tool does not emit a predicted 5-year disease-specific survival; historical cohort percentages in Zisman 2002 are published cohort results, not a calculated field. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"t_stage","description":"1997 pathological T as assigned by the caller (Zisman 2002 localized UISS). t1, t2, t3, or t4. Caller maps T1a/T1b to t1. magent does not assign TNM or read slides.","required":true,"schema":{"type":"string","enum":["t1","t2","t3","t4"]},"example":"t1"},{"in":"query","name":"n0_m0","description":"Must be true: surgically resected unilateral RCC that is node-negative and metastasis-negative (Zisman 2002 localized N0M0 UISS). N-positive or M-positive disease is out of scope. Not metastatic UISS.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"fuhrman_grade","description":"Fuhrman 1982 nuclear grade 1-4 as assigned by the caller (same parsing as Fuhrman). Integer 1-4 only; reject 0, 5, 1.5, and roman I. magent does not read slides.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"ecog","description":"Oken 1982 ECOG performance status 0-4 as assigned by the caller. Grade 5 (dead) is not scored. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"UISS","operationId":"get_api_calc_uiss","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, t_stage, n0_m0, fuhrman_grade, ecog, uiss_group, components, citation, disclaimer."},"400":{"description":"invalid_uiss: t_stage must be t1, t2, t3, or t4 (1997 TNM); n0_m0 must be true (Zisman 2002 localized N0M0 UISS). Not for N-positive or M-positive disease. Returned before settlement; you are not charged.; invalid_fuhrman: fuhrman_grade must be 1, 2, 3, or 4 (Fuhrman 1982 nuclear grade). Returned before settlement; you are not charged.; invalid_ecog_ps: ecog must be an integer from 0 to 4 (Oken 1982). Grade 5 (dead) is not scored. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/uiss"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"UISS (bulk)","operationId":"post_api_calc_uiss","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_uiss: t_stage must be t1, t2, t3, or t4 (1997 TNM); n0_m0 must be true (Zisman 2002 localized N0M0 UISS). Not for N-positive or M-positive disease. Returned before settlement; you are not charged.; invalid_fuhrman: fuhrman_grade must be 1, 2, 3, or 4 (Fuhrman 1982 nuclear grade). Returned before settlement; you are not charged.; invalid_ecog_ps: ecog must be an integer from 0 to 4 (Oken 1982). Grade 5 (dead) is not scored. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/uiss"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ecog":"0","fuhrman_grade":"1","n0_m0":"true","t_stage":"t1"},{"ecog":"0","fuhrman_grade":"1","n0_m0":"true","t_stage":"t1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/bsa":{"get":{"description":"Agents must not invent BSA from model memory. This endpoint computes published Mosteller body surface area in m^2 from height and weight; pay per request with x402 USDC on Base.\n\nWhen an agent needs the cited Mosteller body-surface-area equation rather than a language-model guess, including for oncology dosing arithmetic. Pay per request with x402 USDC. Not a diagnosis or dosing recommendation.\n\nNot a medical device. Not a treatment recommendation and not a dosing recommendation. The formula does not choose a regimen or round a vial.\n\nHeight and weight must be provided in a consistent pair (cm/kg or in/lb). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"height_cm","description":"Height in centimeters. Provide height_cm or height_in.","required":false,"schema":{"type":"number"},"example":"170"},{"in":"query","name":"weight_kg","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"height_in","description":"Height in inches. Converted as cm = in * 2.54.","required":false,"schema":{"type":"number"},"example":"67"},{"in":"query","name":"weight_lb","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"schema":{"type":"number"},"example":"154"}],"summary":"Mosteller BSA","operationId":"get_api_calc_bsa","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, height_cm, weight_kg, bsa_m2, citation, disclaimer."},"400":{"description":"invalid_height: height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bsa"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Mosteller BSA (bulk)","operationId":"post_api_calc_bsa","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_height: height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bsa"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"height_cm":"170","weight_kg":"70"},{"height_cm":"170","weight_kg":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/dash":{"get":{"description":"Compute the Tosetto 2012 DASH score (abnormal D-dimer after stopping anticoagulation, age <50, male sex, hormone use at the initial VTE in women) and return the published recurrence band.\n\nWhen an agent needs the published Tosetto 2012 DASH arithmetic after unprovoked VTE and must not invent a duration-of-anticoagulation decision.\n\nNot a medical device. magent does not diagnose recurrent VTE or assay D-dimer.\n\nNot a duration-of-anticoagulation order and not a stop-or-continue anticoagulation protocol. Recurrence bands are published Tosetto 2012 groups, not treatment instructions.\n\nAge scores only when <50 years (Tosetto 2012 abstract). Age 50 does not score.\n\nHormone use at the initial VTE scores -2 in women only. Male with hormone_use=true is rejected.\n\nAbnormal D-dimer is after stopping anticoagulation as published. Percents are not returned in the JSON body. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Scores 1 when age is <50 (Tosetto 2012). Age 50 does not score.","required":true,"schema":{"type":"integer"},"example":"60"},{"in":"query","name":"sex","description":"female or male. Male scores 1. Hormone use applies only when female.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"abnormal_d_dimer","description":"Abnormal D-dimer after stopping anticoagulation (Tosetto 2012). true or false. 2 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hormone_use","description":"Hormone use at the initial VTE. Required. Scores -2 only when sex is female and true. Must be false when sex is male.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"DASH","operationId":"get_api_calc_dash","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, recurrence_band, age_years, sex, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_dash_hormone: hormone_use may be true only when sex is female (Tosetto 2012 DASH). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dash"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"DASH (bulk)","operationId":"post_api_calc_dash","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_dash_hormone: hormone_use may be true only when sex is female (Tosetto 2012 DASH). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dash"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"abnormal_d_dimer":"false","age":"60","hormone_use":"false","sex":"female"},{"abnormal_d_dimer":"false","age":"60","hormone_use":"false","sex":"female"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rest-lgs":{"get":{"description":"Sum Wolf 2024 REST-LGS major (+3) and minor (+1) caller-assigned flags and return the unlikely, possible, or likely LGS screening band.\n\nWhen an agent already has the eight REST-LGS items assigned as present or absent and needs the published Wolf 2024 point total and screening band, not a diagnosis of Lennox-Gastaut syndrome.\n\nNot a medical device. Not a diagnosis of Lennox-Gastaut syndrome. Screening only.\n\nmagent does not read EEG or charts. Each of the eight items is a caller-assigned true/false flag. There is no unknown or unavailable input; Wolf 2024 missing EEG rates are not modeled.\n\nScoring is Wolf 2024: each major criterion +3, each minor +1, then sum. The 2019 CRF 3-major plus 2–3-minor count threshold is not scored here. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"two_or_more_seizure_types","description":"Two or more seizure types (Wolf 2024 major, +3). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"seizure_onset_before_12","description":"Seizure onset at younger than 12 years of age (Wolf 2024 major, +3). Age 12 does not meet. true or false as assigned by the caller. magent does not take numeric age.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"slow_spike_wave","description":"History of slow spike-wave (SSW, <2.5 Hz) on EEG (Wolf 2024 major, +3). true or false as assigned by the caller. magent does not read EEG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cognitive_impairment_since_childhood","description":"Cognitive impairment since childhood (Wolf 2024 major, +3), which may include past or current learning difficulties, special education, autism, intellectual disabilities, or developmental delays. true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"persistent_seizures_despite_two_asms","description":"Persistent seizures despite a trial of two or more antiseizure medications (Wolf 2024 minor, +1). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"vns_keto_or_surgery","description":"History of vagal nerve stimulation, ketogenic diet therapy, or epilepsy surgery (Wolf 2024 minor, +1). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"helmet_or_head_face_injury","description":"Evidence of seizure-related helmet use or head/face injury (Wolf 2024 minor, +1). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"other_eeg_abnormalities","description":"Other EEG abnormalities: multifocal spikes, symptomatic generalized discharges, generalized periods of attenuation of background/electrodecrement, or paroxysmal fast activity (Wolf 2024 minor, +1). true or false as assigned by the caller. magent does not read EEG.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"REST-LGS","operationId":"get_api_calc_rest_lgs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, lgs_screen, major_count, minor_count, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rest-lgs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"REST-LGS (bulk)","operationId":"post_api_calc_rest_lgs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rest-lgs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"cognitive_impairment_since_childhood":"false","helmet_or_head_face_injury":"false","other_eeg_abnormalities":"false","persistent_seizures_despite_two_asms":"false","seizure_onset_before_12":"false","slow_spike_wave":"false","two_or_more_seizure_types":"false","vns_keto_or_surgery":"false"},{"cognitive_impairment_since_childhood":"false","helmet_or_head_face_injury":"false","other_eeg_abnormalities":"false","persistent_seizures_despite_two_asms":"false","seizure_onset_before_12":"false","slow_spike_wave":"false","two_or_more_seizure_types":"false","vns_keto_or_surgery":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/sirs":{"get":{"description":"Compute the Bone 1992 ACCP/SCCM SIRS criteria from temperature, heart rate, respiratory rate, and WBC, with optional PaCO2 and band percent.\n\nWhen an agent needs the published 1992 SIRS definition and must not substitute Sepsis-3, qSOFA, or SOFA, or treat the result as a diagnosis of sepsis.\n\nNot a diagnosis of sepsis, severe sepsis, or septic shock. magent does not require a suspected-infection flag.\n\nThis is Bone 1992 ACCP/SCCM SIRS only. It is not Sepsis-3, not qSOFA, and not SOFA.\n\nThresholds are strict inequalities as published: temperature >38 or <36 °C, heart rate >90, respiratory rate >20 or PaCO2 <32 mm Hg, WBC >12000 or <4000/µL or bands >10%.\n\nPaCO2 and band percent are optional. Omitted PaCO2 uses respiratory rate only; omitted bands uses WBC only. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"temperature_c","description":"Temperature in °C (30.0-45.0). >38 or <36 scores 1 (38.0 and 36.0 do not).","required":true,"schema":{"type":"number"},"example":"37.0"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats/min (integer 30-220). >90 scores 1 (90 does not).","required":true,"schema":{"type":"integer"},"example":"80"},{"in":"query","name":"respiratory_rate","description":"Respiratory rate in breaths/min (integer 4-80). >20 scores 1 for the respiratory criterion (20 does not). Optional paco2_mm_hg <32 also meets this criterion.","required":true,"schema":{"type":"integer"},"example":"16"},{"in":"query","name":"paco2_mm_hg","description":"Arterial PaCO2 in mm Hg (8-80) when provided. Omitted uses respiratory rate only. <32 scores the respiratory criterion (32 does not).","required":false,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"wbc_k_ul","description":"WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500. >12000 or <4000 per µL scores 1.","required":false,"schema":{"type":"number"},"example":"8.0"},{"in":"query","name":"wbc_ul","description":"WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000. >12000 or <4000 scores 1 (12000 and 4000 do not).","required":false,"schema":{"type":"number"},"example":"8000"},{"in":"query","name":"band_percent","description":"Immature bands as a percent of WBC (0-100) when provided. Omitted does not use bands. >10 scores the WBC criterion (10 does not).","required":false,"schema":{"type":"number"},"example":"5"}],"summary":"SIRS","operationId":"get_api_calc_sirs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, sirs_present, sirs_criteria_met, max_score, temperature_c, heart_rate_bpm, respiratory_rate, wbc_per_ul, components, citation, disclaimer."},"400":{"description":"invalid_temperature: temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_respiratory_rate: respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_paco2: paco2_mm_hg must be a number from 8 to 80. Returned before settlement; you are not charged.; invalid_band_percent: band_percent must be a number from 0 to 100 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sirs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SIRS (bulk)","operationId":"post_api_calc_sirs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_temperature: temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_respiratory_rate: respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_paco2: paco2_mm_hg must be a number from 8 to 80. Returned before settlement; you are not charged.; invalid_band_percent: band_percent must be a number from 0 to 100 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sirs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"heart_rate_bpm":"80","respiratory_rate":"16","temperature_c":"37.0","wbc_ul":"8000"},{"heart_rate_bpm":"80","respiratory_rate":"16","temperature_c":"37.0","wbc_ul":"8000"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/orai":{"get":{"description":"Sum Cadarette 2000 ORAI (age, weight, and current estrogen use) and return the Table 4 point total with select_for_dxa (score ≥9) or do_not_select.\n\nWhen an agent has caller-supplied age (years), weight, and current estrogen use and needs the published Cadarette 2000 ORAI point total and densitometry-selection band, not a DXA order, OSTA index, FRAX probability, or osteoporosis diagnosis.\n\nNot a medical device. Not a DXA order, densitometry prescription, or osteoporosis diagnosis. magent does not weigh the patient.\n\nCadarette 2000 ORAI only (age, weight, current estrogen). Not Koh 2001 OSTA and not FRAX.\n\nSelection tool for bone densitometry: women with a total score of 9 or greater would be selected. Not a T-score, fracture probability, or treatment threshold.\n\nDerived in women aged 45 years or older. Age 45–54 scores 0 (published band). Not for men. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 45-120). Cadarette 2000 ORAI Table 4: 45-54 scores 0; 55-64 scores 5; 65-74 scores 9; >=75 scores 15. Derivation starts at 45; not the adult 18-120 clamp.","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"weight_kg","description":"Body weight in kilograms (1-500). Provide weight_kg or weight_lb. Cadarette 2000 Table 4: <60 kg scores 9; 60-69 kg scores 3; >=70 kg scores 0. 60.0 and 69.0 score 3; 70.0 scores 0. magent does not weigh the patient.","required":false,"schema":{"type":"number"},"example":"65"},{"in":"query","name":"weight_lb","description":"Body weight in pounds (2-1100). Converted as kg = lb × 0.45359237, then Cadarette 2000 Table 4 kg bands apply. Provide weight_kg or weight_lb.","required":false,"schema":{"type":"number"},"example":"143"},{"in":"query","name":"current_estrogen","description":"Current estrogen use (Cadarette 2000 Table 4). true scores 0; false scores 2. true or false.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"ORAI","operationId":"get_api_calc_orai","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, orai_band, age, weight_kg, current_estrogen, age_score, weight_score, estrogen_score, components, citation, disclaimer."},"400":{"description":"invalid_orai_age: age must be an integer from 45 through 120 (Cadarette 2000 ORAI Table 4; derivation starts at 45). Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/orai"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ORAI (bulk)","operationId":"post_api_calc_orai","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_orai_age: age must be an integer from 45 through 120 (Cadarette 2000 ORAI Table 4; derivation starts at 45). Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/orai"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"70","current_estrogen":"true","weight_kg":"65"},{"age":"70","current_estrogen":"true","weight_kg":"65"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-proctalgia-fugax":{"get":{"description":"Apply the Rao 2016 Rome IV proctalgia fugax (F2c) diagnostic criteria and return whether the published proctalgia fugax box holds (rome_iv_proctalgia_fugax).\n\nWhen an agent already has the six caller-assigned Rao 2016 Rome IV proctalgia fugax flags and needs whether the published box holds. magent does not examine the rectum.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose proctalgia fugax.\n\nThe caller assigns the six flags. magent does not examine the rectum.\n\nThis tool is Rao 2016 Rome IV proctalgia fugax (F2c) only. Not levator ani syndrome (chronic or recurrent rectal pain lasting 30 minutes or longer with puborectalis tenderness). Not unspecified functional anorectal pain. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"recurrent_rectal_pain_unrelated_to_defecation","description":"Recurrent episodes of rectal pain unrelated to defecation, as assigned (Rao 2016 Rome IV proctalgia fugax F2c). true or false as assigned by the caller. magent does not examine the rectum.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"episodes_seconds_to_minutes_max_30_minutes","description":"Episodes last from seconds to minutes, with a maximum duration of 30 minutes, as assigned (Rao 2016 F2c). Distinguishes proctalgia fugax from levator ani syndrome (pain lasting 30 minutes or longer). true or false as assigned by the caller. magent does not examine the rectum.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"no_anorectal_pain_between_episodes","description":"Absence of anorectal pain between episodes, as assigned (Rao 2016). true or false as assigned by the caller. magent does not examine the rectum.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"other_causes_of_rectal_pain_excluded","description":"Other causes of rectal pain excluded as assigned: inflammatory bowel disease, intramuscular abscess, anal fissure, thrombosed hemorrhoids, prostatitis, coccygodynia, and major structural alterations of the pelvic floor (Rao 2016). true or false as assigned by the caller. magent does not examine the rectum.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"fulfilled_last_3_months","description":"Criteria fulfilled for the last 3 months, as assigned (Rao 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"onset_at_least_6_months","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Rao 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rao 2016 Rome IV proctalgia fugax","operationId":"get_api_calc_rome_iv_proctalgia_fugax","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, rome_iv_proctalgia_fugax, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_proctalgia_fugax: Rome IV proctalgia fugax needs the Rao 2016 anorectal proctalgia-fugax flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-proctalgia-fugax"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rao 2016 Rome IV proctalgia fugax (bulk)","operationId":"post_api_calc_rome_iv_proctalgia_fugax","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_proctalgia_fugax: Rome IV proctalgia fugax needs the Rao 2016 anorectal proctalgia-fugax flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-proctalgia-fugax"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"episodes_seconds_to_minutes_max_30_minutes":"true","fulfilled_last_3_months":"true","no_anorectal_pain_between_episodes":"true","onset_at_least_6_months":"true","other_causes_of_rectal_pain_excluded":"true","recurrent_rectal_pain_unrelated_to_defecation":"true"},{"episodes_seconds_to_minutes_max_30_minutes":"true","fulfilled_last_3_months":"true","no_anorectal_pain_between_episodes":"true","onset_at_least_6_months":"true","other_causes_of_rectal_pain_excluded":"true","recurrent_rectal_pain_unrelated_to_defecation":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/prague":{"get":{"description":"Format Sharma 2006 Prague C and M criteria as C{c}M{m} from caller-assigned circumferential (c_cm) and maximal (m_cm) extent of visualized Barrett mucosa in centimetres above the gastroesophageal junction.\n\nWhen an agent already has endoscopic C and M measurements in centimetres and needs the published Prague label. magent does not perform endoscopy or diagnose Barrett esophagus.\n\nNot a medical device.\n\nNot a Barrett esophagus diagnosis. Histology is required. magent does not perform endoscopy.\n\nThe caller assigns c_cm and m_cm. magent does not measure lesions or interpret endoscopy images.\n\nThis tool is Sharma 2006 Prague C and M extent only. Not Los Angeles oesophagitis grading (LA A-D). Not a histology diagnosis.\n\nC=0 is allowed (no circumferential Barrett; tongues only). M must be greater than or equal to C. Inputs are integers 0-20 cm. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"c_cm","description":"Caller-assigned circumferential extent of visualized Barrett mucosa in centimetres above the gastroesophageal junction (integer 0-20). C=0 is allowed (no circumferential Barrett; tongues only). magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"m_cm","description":"Caller-assigned maximal extent of visualized Barrett mucosa in centimetres above the gastroesophageal junction (integer 0-20). Must be greater than or equal to c_cm. magent does not perform endoscopy.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"Prague C & M","operationId":"get_api_calc_prague","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, prague, c_cm, m_cm, citation, disclaimer."},"400":{"description":"invalid_prague: c_cm and m_cm must be integers from 0 to 20 and m_cm must be greater than or equal to c_cm (Sharma 2006 Prague C and M). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/prague"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Prague C & M (bulk)","operationId":"post_api_calc_prague","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_prague: c_cm and m_cm must be integers from 0 to 20 and m_cm must be greater than or equal to c_cm (Sharma 2006 Prague C and M). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/prague"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"c_cm":"0","m_cm":"0"},{"c_cm":"0","m_cm":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/kings-college":{"get":{"description":"Apply the O'Grady 1989 King's College poor-prognosis criteria for fulminant hepatic failure, with separate acetaminophen and non-acetaminophen trees using prothrombin time in seconds.\n\nWhen an agent has caller-assigned labs and encephalopathy grade in fulminant hepatic failure and needs the 1989 King's College criteria, not later INR restatements or a transplant-allocation score.\n\nNot a medical device. magent does not examine the patient.\n\nNot a transplant listing, organ-allocation order, or UNOS/MELD substitute.\n\nUses prothrombin time in seconds as published in 1989. Does not accept, convert, or restate INR (no INR>6.5 / INR>3.5).\n\nThis is the O'Grady 1989 Gastroenterology paper only. Later reviews and age <10 restatements are not this tool. Age cutoffs are <11 or >40 as in the 1989 abstract.\n\nThe acetaminophen arterial pH <7.30 rule is independent of encephalopathy. The PT>100 s plus creatinine >300 umol/L plus grade III/IV package is the 1989 selection model. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"etiology","description":"acetaminophen or non_acetaminophen (O'Grady 1989). Selects the paracetamol or non-paracetamol poor-prognosis tree. Required on every request.","required":true,"schema":{"type":"string","enum":["acetaminophen","non_acetaminophen"]},"example":"acetaminophen"},{"in":"query","name":"arterial_ph","description":"Arterial pH (6.80-7.80). Acetaminophen criterion met when pH < 7.30, independent of encephalopathy. Required even on the non-acetaminophen tree; not scored there.","required":true,"schema":{"type":"number"},"example":"7.40"},{"in":"query","name":"pt_sec","description":"Prothrombin time in seconds (8-120) as published in 1989. INR is not accepted. Acetaminophen combo uses PT > 100; non-acetaminophen uses PT > 100 alone or PT > 50 as one of five factors.","required":true,"schema":{"type":"number"},"example":"20"},{"in":"query","name":"creatinine_umol_l","description":"Serum creatinine in umol/L (9-1768). Acetaminophen combo criterion met when > 300. Required even on the non-acetaminophen tree; not scored there.","required":true,"schema":{"type":"number"},"example":"80"},{"in":"query","name":"encephalopathy_grade","description":"Hepatic encephalopathy grade 0-4 as assigned by the caller (Conn 1977 / West Haven). Acetaminophen combo uses grade >= 3 (grade III/IV). Required even on the non-acetaminophen tree; not scored there. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"age_years","description":"Age in years (0-120). Non-acetaminophen factor met when age < 11 or age > 40 (1989 abstract, not a later <10 restatement). Required even on the acetaminophen tree; not scored there.","required":true,"schema":{"type":"integer"},"example":"30"},{"in":"query","name":"unfavorable_etiology","description":"Unfavorable etiology as assigned by the caller (paper: non-A non-B hepatitis or drug reaction). true or false. Non-acetaminophen any-3 factor. Required even on the acetaminophen tree; not scored there.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"jaundice_to_encephalopathy_days","description":"Days from jaundice to encephalopathy (integer 0-90). Non-acetaminophen factor met when > 7. Required even on the acetaminophen tree; not scored there.","required":true,"schema":{"type":"integer"},"example":"2"},{"in":"query","name":"bilirubin_umol_l","description":"Serum bilirubin in umol/L (2-684). Non-acetaminophen factor met when > 300. Required even on the acetaminophen tree; not scored there.","required":true,"schema":{"type":"number"},"example":"50"}],"summary":"King's College criteria","operationId":"get_api_calc_kings_college","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, criteria_met, etiology, criteria, citation, disclaimer."},"400":{"description":"invalid_kings_etiology: etiology must be acetaminophen or non_acetaminophen (O'Grady 1989). Returned before settlement; you are not charged.; invalid_arterial_ph: arterial_ph must be a number from 6.80 to 7.80. Returned before settlement; you are not charged.; invalid_prothrombin_time: pt_sec (8-120) is required, or pt_patient_sec (8-120) and pt_control_sec (8-20) are required. Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_west_haven_grade: grade must be an integer from 0 to 4 (Conn 1977). Returned before settlement; you are not charged.; invalid_kings_age: age_years must be a number from 0 to 120 (O'Grady 1989 includes children). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_jaundice_days: jaundice_to_encephalopathy_days must be an integer from 0 to 90. Returned before settlement; you are not charged.; invalid_bilirubin: bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/kings-college"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"King's College criteria (bulk)","operationId":"post_api_calc_kings_college","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_kings_etiology: etiology must be acetaminophen or non_acetaminophen (O'Grady 1989). Returned before settlement; you are not charged.; invalid_arterial_ph: arterial_ph must be a number from 6.80 to 7.80. Returned before settlement; you are not charged.; invalid_prothrombin_time: pt_sec (8-120) is required, or pt_patient_sec (8-120) and pt_control_sec (8-20) are required. Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_west_haven_grade: grade must be an integer from 0 to 4 (Conn 1977). Returned before settlement; you are not charged.; invalid_kings_age: age_years must be a number from 0 to 120 (O'Grady 1989 includes children). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_jaundice_days: jaundice_to_encephalopathy_days must be an integer from 0 to 90. Returned before settlement; you are not charged.; invalid_bilirubin: bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/kings-college"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_years":"30","arterial_ph":"7.40","bilirubin_umol_l":"50","creatinine_umol_l":"80","encephalopathy_grade":"1","etiology":"acetaminophen","jaundice_to_encephalopathy_days":"2","pt_sec":"20","unfavorable_etiology":"false"},{"age_years":"30","arterial_ph":"7.40","bilirubin_umol_l":"50","creatinine_umol_l":"80","encephalopathy_grade":"1","etiology":"acetaminophen","jaundice_to_encephalopathy_days":"2","pt_sec":"20","unfavorable_etiology":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/iss":{"get":{"description":"Compute the Baker 1974 Injury Severity Score as the sum of squares of the three highest caller-assigned AIS body-region grades, or 75 if any region is AIS 6.\n\nWhen an agent needs the published Baker 1974 ISS total and must not invent AIS grades or substitute NISS.\n\nNot a triage order, disposition, or trauma-activation decision.\n\nAIS grades are caller-assigned integers 0-6. magent does not assign AIS from an injury list or chart narrative.\n\nBaker 1974 ISS only: the three most severely injured body regions. Not NISS, which squares the three worst injuries regardless of region. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ais_head","description":"Caller-assigned AIS grade for the head or neck (integer 0-6). magent does not assign AIS from an injury list.","required":true,"schema":{"type":"integer"},"example":"3"},{"in":"query","name":"ais_face","description":"Caller-assigned AIS grade for the face (integer 0-6).","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"ais_chest","description":"Caller-assigned AIS grade for the chest (integer 0-6).","required":true,"schema":{"type":"integer"},"example":"2"},{"in":"query","name":"ais_abdomen","description":"Caller-assigned AIS grade for the abdomen or pelvic contents (integer 0-6).","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"ais_extremity","description":"Caller-assigned AIS grade for the extremities or pelvic girdle (integer 0-6).","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"ais_external","description":"Caller-assigned AIS grade for external (integer 0-6).","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"ISS","operationId":"get_api_calc_iss","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, ais_head, ais_face, ais_chest, ais_abdomen, ais_extremity, ais_external, used_ais, components, citation, disclaimer."},"400":{"description":"invalid_ais: ais_head, ais_face, ais_chest, ais_abdomen, ais_extremity, and ais_external must each be an integer from 0 to 6. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/iss"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ISS (bulk)","operationId":"post_api_calc_iss","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ais: ais_head, ais_face, ais_chest, ais_abdomen, ais_extremity, and ais_external must each be an integer from 0 to 6. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/iss"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ais_abdomen":"1","ais_chest":"2","ais_external":"0","ais_extremity":"0","ais_face":"0","ais_head":"3"},{"ais_abdomen":"1","ais_chest":"2","ais_external":"0","ais_extremity":"0","ais_face":"0","ais_head":"3"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/cirs-g":{"get":{"description":"Sum fourteen caller-assigned Miller 1992 CIRS-G organ-system integers (each 0-4) and return the published total (max 56), the count of categories endorsed (rating ≥1), and the count of categories rated ≥3.\n\nWhen an agent already has Miller 1992 0-4 integers for the fourteen CIRS-G organ systems and needs the published total and ≥3 category count. magent does not examine the patient, diagnose comorbidity, score Charlson, or apply G8.\n\nNot a medical device and not a diagnosis or treatment order.\n\nEach of the fourteen organ-system ratings is a caller-assigned integer 0-4 (0 no problem, 1 current mild or past significant, 2 moderate disability or first-line therapy, 3 severe or uncontrollable chronic, 4 extremely severe, immediate treatment, or end-organ failure). magent does not examine the patient.\n\nThis is Miller 1992 CIRS-G only (fourteen organ systems including psychiatric illness; max 56). It is not Charlson, not Linn 1968 CIRS, and not G8.\n\nMiller 1992 / the CIRS-G scoring sheet published total score, number of categories endorsed, and counts of categories at severity 3 and 4. This tool returns score, categories_endorsed, and categories_ge_3 (ratings 3 or 4). It does not invent a total-score class or a severity-index cutoff. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"heart","description":"Caller-assigned Miller 1992 CIRS-G heart (integer 0-4: 0 no problem, 1 current mild or past significant, 2 moderate disability or first-line therapy, 3 severe or uncontrollable chronic, 4 extremely severe, immediate treatment, or end-organ failure). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"vascular","description":"Caller-assigned Miller 1992 CIRS-G vascular (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"hematopoietic","description":"Caller-assigned Miller 1992 CIRS-G hematopoietic — blood, marrow, spleen, lymphatics (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"respiratory","description":"Caller-assigned Miller 1992 CIRS-G respiratory — lungs, bronchi, trachea below the larynx (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"eent","description":"Caller-assigned Miller 1992 CIRS-G EENT — eyes, ears, nose, throat, and larynx (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"upper_gi","description":"Caller-assigned Miller 1992 CIRS-G upper GI — esophagus, stomach, duodenum (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"lower_gi","description":"Caller-assigned Miller 1992 CIRS-G lower GI — intestines, hernias (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"liver","description":"Caller-assigned Miller 1992 CIRS-G liver — including biliary and pancreatic trees (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"renal","description":"Caller-assigned Miller 1992 CIRS-G renal — kidneys only (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"genitourinary","description":"Caller-assigned Miller 1992 CIRS-G genitourinary — ureters, bladder, urethra, prostate, genitals, uterus, ovaries (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"musculoskeletal","description":"Caller-assigned Miller 1992 CIRS-G musculoskeletal/integument — muscles, bone, and skin (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"neurologic","description":"Caller-assigned Miller 1992 CIRS-G neurologic — brain, spinal cord, and nerves (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"endocrine_metabolic","description":"Caller-assigned Miller 1992 CIRS-G endocrine/metabolic and breast (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"psychiatric","description":"Caller-assigned Miller 1992 CIRS-G psychiatric illness (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"CIRS-G","operationId":"get_api_calc_cirs_g","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, categories_endorsed, categories_ge_3, components, citation, disclaimer."},"400":{"description":"invalid_cirs_g_item: each CIRS-G organ-system rating must be an integer from 0 to 4 (Miller 1992). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cirs-g"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CIRS-G (bulk)","operationId":"post_api_calc_cirs_g","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_cirs_g_item: each CIRS-G organ-system rating must be an integer from 0 to 4 (Miller 1992). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cirs-g"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"eent":"0","endocrine_metabolic":"0","genitourinary":"0","heart":"0","hematopoietic":"0","liver":"0","lower_gi":"0","musculoskeletal":"0","neurologic":"0","psychiatric":"0","renal":"0","respiratory":"0","upper_gi":"0","vascular":"0"},{"eent":"0","endocrine_metabolic":"0","genitourinary":"0","heart":"0","hematopoietic":"0","liver":"0","lower_gi":"0","musculoskeletal":"0","neurologic":"0","psychiatric":"0","renal":"0","respiratory":"0","upper_gi":"0","vascular":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/dasi":{"get":{"description":"Sum the Hlatky 1989 Duke Activity Status Index Table I weights for 12 yes/no activities and return DASI and estimated peak VO2.\n\nWhen an agent has caller-assigned yes/no replies to the twelve Hlatky 1989 DASI activities and needs the published weighted sum and VO2peak regression, not an exercise test or a functional-capacity assignment.\n\nNot a medical device. magent does not observe the patient.\n\nNot a functional-capacity assignment, exercise-test replacement, or cardiopulmonary exercise prescription.\n\nYes/no replies are caller-assigned from the Hlatky 1989 Table I questionnaire. magent does not interview the patient or measure oxygen uptake.\n\nThis is the Hlatky 1989 questionnaire sum and VO2peak = 0.43 x DASI + 9.6 regression only. It does not convert VO2peak to METs and does not apply a later perioperative functional-capacity cutoff. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"self_care","description":"Can take care of self: eating, dressing, bathing, or using the toilet (Hlatky 1989 Table I). true or false. Yes adds 2.75.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"walk_indoors","description":"Can walk indoors, such as around the house (Hlatky 1989 Table I). true or false. Yes adds 1.75.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"walk_blocks","description":"Can walk a block or two on level ground (Hlatky 1989 Table I). true or false. Yes adds 2.75.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"climb_stairs","description":"Can climb a flight of stairs or walk up a hill (Hlatky 1989 Table I). true or false. Yes adds 5.50.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"run_short","description":"Can run a short distance (Hlatky 1989 Table I). true or false. Yes adds 8.00.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"light_housework","description":"Can do light work around the house like dusting or washing dishes (Hlatky 1989 Table I). true or false. Yes adds 2.70.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"moderate_housework","description":"Can do moderate work around the house like vacuuming, sweeping floors, or carrying in groceries (Hlatky 1989 Table I). true or false. Yes adds 3.50.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"heavy_housework","description":"Can do heavy work around the house like scrubbing floors, or lifting or moving heavy furniture (Hlatky 1989 Table I). true or false. Yes adds 8.00.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"yardwork","description":"Can do yardwork like raking leaves, weeding, or pushing a power mower (Hlatky 1989 Table I). true or false. Yes adds 4.50.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"sexual_relations","description":"Can have sexual relations (Hlatky 1989 Table I). true or false. Yes adds 5.25.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"moderate_recreation","description":"Can participate in moderate recreational activities like golf, bowling, dancing, doubles tennis, or throwing a baseball or football (Hlatky 1989 Table I). true or false. Yes adds 6.00.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"strenuous_sports","description":"Can participate in strenuous sports like swimming, singles tennis, football, basketball, or skiing (Hlatky 1989 Table I). true or false. Yes adds 7.50.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"DASI","operationId":"get_api_calc_dasi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, dasi, vo2peak_ml_kg_min, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dasi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"DASI (bulk)","operationId":"post_api_calc_dasi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dasi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"climb_stairs":"false","heavy_housework":"false","light_housework":"false","moderate_housework":"false","moderate_recreation":"false","run_short":"false","self_care":"false","sexual_relations":"false","strenuous_sports":"false","walk_blocks":"false","walk_indoors":"false","yardwork":"false"},{"climb_stairs":"false","heavy_housework":"false","light_housework":"false","moderate_housework":"false","moderate_recreation":"false","run_short":"false","self_care":"false","sexual_relations":"false","strenuous_sports":"false","walk_blocks":"false","walk_indoors":"false","yardwork":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/asas-axial-spa":{"get":{"description":"Apply the 2009 ASAS classification criteria for axial spondyloarthritis (Rudwaleit set 3a / figure 2): require chronic back pain ≥3 months with age at onset <45, then return whether the imaging arm (sacroiliitis plus ≥1 SpA feature) or the clinical arm (HLA-B27 plus ≥2 other SpA features) classifies axial SpA. Not a diagnosis.\n\nWhen an agent already has caller-assigned Rudwaleit 2009 entry, imaging, and SpA feature flags and needs the published axial SpA classification result for research, not a diagnosis, not peripheral ASAS 2011, and not modified New York AS-only.\n\nNot a medical device and not a diagnosis of axial spondyloarthritis or ankylosing spondylitis. Classification criteria for research.\n\nEntry (chronic_back_pain_ge_3_months true and age_at_onset_years 1–44) must be met or the request is HTTP 400 and is not returned as classified=false.\n\nMRI and radiographic sacroiliitis are caller-assigned. MRI means active (acute) inflammation highly suggestive of SpA-associated sacroiliitis. Radiographic means definite sacroiliitis according to modified New York (bilateral grade ≥2 or unilateral grade 3–4). magent does not read films.\n\nThis tool is ASAS 2009 axial SpA classification (set 3a) only. It is not the 2011 peripheral ASAS criteria and not modified New York AS-only classification.\n\nHLA-B27 is obligatory in the clinical arm and does not count toward the two other SpA features. magent does not assay HLA-B27 or CRP. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"chronic_back_pain_ge_3_months","description":"Must be true. Rudwaleit 2009 entry: chronic back pain ≥3 months. false is invalid and is not returned as classified=false. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"age_at_onset_years","description":"Age at onset of back pain in years, integer 1–44 (Rudwaleit 2009 entry: age at onset <45). 0 and ≥45 are invalid and are not classified. magent does not date the patient.","required":true,"schema":{"type":"integer"},"example":"28"},{"in":"query","name":"mri_sacroiliitis","description":"Active (acute) inflammation on MRI highly suggestive of SpA-associated sacroiliitis, as assigned by the caller (Rudwaleit 2009). Combined with radiographic_sacroiliitis by OR for sacroiliitis_on_imaging. true or false. magent does not read MRI.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"radiographic_sacroiliitis","description":"Definite radiographic sacroiliitis according to modified New York criteria (bilateral grade ≥2 or unilateral grade 3–4), as assigned by the caller (Rudwaleit 2009). true or false. magent does not read radiographs.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"inflammatory_back_pain","description":"Inflammatory back pain as assigned by the caller (Rudwaleit 2009 fig 2 / table 5). true or false. magent does not take a history or apply a nested IBP questionnaire.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"arthritis","description":"Past or present synovitis diagnosed by a physician, as assigned by the caller (Rudwaleit 2009). true or false. magent does not examine joints.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"enthesitis_heel","description":"Past or present spontaneous pain or tenderness at the insertion of the Achilles tendon or plantar fascia at the calcaneus, as assigned by the caller (Rudwaleit 2009). Heel enthesitis only. true or false. magent does not examine entheses.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"uveitis","description":"Past or present uveitis confirmed by an ophthalmologist, as assigned by the caller (Rudwaleit 2009). true or false. magent does not examine the eye.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"dactylitis","description":"Past or present dactylitis diagnosed by a physician, as assigned by the caller (Rudwaleit 2009). true or false. magent does not examine digits.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"psoriasis","description":"Past or present psoriasis diagnosed by a physician, as assigned by the caller (Rudwaleit 2009). true or false. magent does not examine skin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ibd","description":"Past or present Crohn's disease or ulcerative colitis diagnosed by a physician, as assigned by the caller (Rudwaleit 2009). true or false. magent does not diagnose IBD.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"nsaid_good_response","description":"Good response to NSAIDs as assigned by the caller (Rudwaleit 2009): 24–48 h after a full dose of NSAID the back pain is not present anymore or is much better. true or false. magent does not prescribe NSAIDs.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"family_history_spa","description":"Family history of SpA as assigned by the caller (Rudwaleit 2009): first-degree or second-degree relatives with ankylosing spondylitis, psoriasis, acute uveitis, reactive arthritis, or IBD. true or false. magent does not take a pedigree.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hla_b27","description":"HLA-B27 positive as assigned by the caller (Rudwaleit 2009). Obligatory for the clinical arm; does not count toward the two other SpA features. Counts toward spa_feature_count and the imaging arm. true or false. magent does not assay HLA-B27.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"elevated_crp","description":"CRP above the upper limit of normal in the presence of back pain after exclusion of other causes, as assigned by the caller (Rudwaleit 2009). true or false. magent does not assay CRP.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"ASAS axial SpA","operationId":"get_api_calc_asas_axial_spa","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, classified, imaging_arm, clinical_arm, spa_feature_count, other_spa_feature_count, sacroiliitis_on_imaging, citation, disclaimer."},"400":{"description":"invalid_asas: chronic_back_pain_ge_3_months must be true and age_at_onset_years an integer from 1 to 44 (Rudwaleit 2009 ASAS axial SpA entry: back pain ≥3 months, age at onset <45). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/asas-axial-spa"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ASAS axial SpA (bulk)","operationId":"post_api_calc_asas_axial_spa","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_asas: chronic_back_pain_ge_3_months must be true and age_at_onset_years an integer from 1 to 44 (Rudwaleit 2009 ASAS axial SpA entry: back pain ≥3 months, age at onset <45). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/asas-axial-spa"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_at_onset_years":"28","arthritis":"false","chronic_back_pain_ge_3_months":"true","dactylitis":"false","elevated_crp":"false","enthesitis_heel":"false","family_history_spa":"false","hla_b27":"false","ibd":"false","inflammatory_back_pain":"true","mri_sacroiliitis":"true","nsaid_good_response":"false","psoriasis":"false","radiographic_sacroiliitis":"false","uveitis":"false"},{"age_at_onset_years":"28","arthritis":"false","chronic_back_pain_ge_3_months":"true","dactylitis":"false","elevated_crp":"false","enthesitis_heel":"false","family_history_spa":"false","hla_b27":"false","ibd":"false","inflammatory_back_pain":"true","mri_sacroiliitis":"true","nsaid_good_response":"false","psoriasis":"false","radiographic_sacroiliitis":"false","uveitis":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pas-ra":{"get":{"description":"Compute the Wolfe 2005 Patient Activity Scale (PAS) from a caller-assigned HAQ disability index (0-3), pain VAS (0-10), and patient global VAS (0-10). Uses HAQ × 3.33, not HAQ-II. Returns the PAS total only.\n\nWhen an agent already has a caller-assigned HAQ (0-3, not HAQ-II), pain VAS, and patient global VAS and needs the published Wolfe 2005 PAS composite, not PAS-II, not DAS28, not CDAI, and not Samuel 2002 pediatric appendicitis PAS.\n\nNot a medical device and not a rheumatoid arthritis diagnosis or a treatment order.\n\nmagent does not administer the HAQ. haq, pain_vas, and patient_global_vas are caller-assigned. This tool uses HAQ 0-3, not HAQ-II.\n\nThis is Wolfe 2005 PAS (HAQ × 3.33), not PAS-II (HAQ-II). Not Samuel 2002 pediatric appendicitis PAS. Not DAS28. Not CDAI.\n\nWolfe 2005 does not lock remission, minimal, moderate, or severe cutoffs in this tool. magent returns the PAS total only. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"haq","description":"Caller-assigned HAQ disability index (Wolfe 2005 PAS). Number 0-3. Not HAQ-II. magent does not administer the HAQ.","required":true,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"pain_vas","description":"Caller-assigned pain visual analog scale (Wolfe 2005 PAS). Number 0-10. magent does not examine the patient.","required":true,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"patient_global_vas","description":"Caller-assigned patient global visual analog scale (Wolfe 2005 PAS). Number 0-10. magent does not examine the patient.","required":true,"schema":{"type":"number"},"example":"0"}],"summary":"PAS-RA","operationId":"get_api_calc_pas_ra","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, haq, pain_vas, patient_global_vas, pas, citation, disclaimer."},"400":{"description":"invalid_haq: haq must be a number from 0 to 3 (Wolfe 2005 HAQ 0-3). Returned before settlement; you are not charged.; invalid_pain_vas: pain_vas must be a number from 0 to 10 (Wolfe 2005 pain VAS). Returned before settlement; you are not charged.; invalid_patient_global: patient_global_vas must be a number from 0 to 10 (Wolfe 2005 patient global VAS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pas-ra"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PAS-RA (bulk)","operationId":"post_api_calc_pas_ra","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_haq: haq must be a number from 0 to 3 (Wolfe 2005 HAQ 0-3). Returned before settlement; you are not charged.; invalid_pain_vas: pain_vas must be a number from 0 to 10 (Wolfe 2005 pain VAS). Returned before settlement; you are not charged.; invalid_patient_global: patient_global_vas must be a number from 0 to 10 (Wolfe 2005 patient global VAS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pas-ra"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"haq":"0","pain_vas":"0","patient_global_vas":"0"},{"haq":"0","pain_vas":"0","patient_global_vas":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/du-bois":{"get":{"description":"Sum du Bois 2011 Table 4 points from age, 24-week respiratory hospitalization, FVC percent predicted, and 24-week change in FVC percent predicted (abbreviated four-predictor model).\n\nWhen an agent needs the published du Bois 2011 four-predictor IPF point total and must not invent a 1-year mortality percent, a GAP stage, or a transplant listing.\n\nNot a medical device and not a transplant listing protocol. Returns the published du Bois 2011 Table 4 point total only; Table 4 expected 1-year risk percents have gaps and are not interpolated.\n\nNot the Ley 2012 GAP index. Age and FVC bands follow du Bois 2011 Table 4, not GAP cutoffs.\n\nFVC percent predicted and 24-week FVC change are caller-supplied. magent does not perform spirometry or compute percent predicted from raw volumes.\n\nAbbreviated four-predictor clinical model omits DLCO and SGRQ by design (du Bois 2011). Respiratory hospitalization is a caller-assigned 24-week history flag. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120). du Bois 2011 Table 4: <60 scores 0; 60-69 scores 4; >=70 scores 8.","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"respiratory_hospitalization","description":"24-week history of respiratory hospitalization (true or false). du Bois 2011 Table 4: false scores 0; true scores 14.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"fvc_percent_predicted","description":"FVC percent predicted (10-150). du Bois 2011 Table 4: <50 scores 18; 51-65 scores 13; 66-79 scores 8; >80 scores 0. Exactly 50 or 80 is unpublished.","required":true,"schema":{"type":"number"},"example":"55"},{"in":"query","name":"fvc_change_24wk","description":"24-week change in FVC percent predicted, in percentage points (-50 to 50). du Bois 2011 Table 4: <= -10 scores 21; > -10 and < -4.9 scores 10; >= -4.9 scores 0.","required":true,"schema":{"type":"number"},"example":"-7"}],"summary":"du Bois IPF","operationId":"get_api_calc_du_bois","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, age_years, respiratory_hospitalization, fvc_percent_predicted, fvc_change_24wk, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_fvc_percent: fvc_percent_predicted must be a number from 10 to 150. Returned before settlement; you are not charged.; invalid_du_bois_fvc: fvc_percent_predicted must be <50, 51-65, 66-79, or >80 (du Bois 2011 Table 4; 50 and 80 are not published cells). Returned before settlement; you are not charged.; invalid_fvc_change: fvc_change_24wk must be a number from -50 to 50 (du Bois 2011 24-week change in % predicted FVC). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/du-bois"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"du Bois IPF (bulk)","operationId":"post_api_calc_du_bois","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_fvc_percent: fvc_percent_predicted must be a number from 10 to 150. Returned before settlement; you are not charged.; invalid_du_bois_fvc: fvc_percent_predicted must be <50, 51-65, 66-79, or >80 (du Bois 2011 Table 4; 50 and 80 are not published cells). Returned before settlement; you are not charged.; invalid_fvc_change: fvc_change_24wk must be a number from -50 to 50 (du Bois 2011 24-week change in % predicted FVC). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/du-bois"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"70","fvc_change_24wk":"-7","fvc_percent_predicted":"55","respiratory_hospitalization":"false"},{"age":"70","fvc_change_24wk":"-7","fvc_percent_predicted":"55","respiratory_hospitalization":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/hamilton-anxiety":{"get":{"description":"Sum fourteen caller-assigned Hamilton 1959 HAM-A items (each integer 0-4) and return the published 0-56 total. Does not apply later total-score severity bands.\n\nWhen an agent already has Hamilton 1959 0-4 integers for the fourteen items and needs the published total. magent does not interview the patient, diagnose anxiety, or apply later 17/24 cutoffs.\n\nNot a medical device and not an anxiety diagnosis or treatment order.\n\nEach of the fourteen items is a caller-assigned integer 0-4 (0 not present, 1 mild, 2 moderate, 3 severe, 4 very severe). magent does not interview the patient.\n\nThis is Hamilton 1959 HAM-A only (fourteen items; max 56). magent does not score GAD-7, PHQ-9, or Hamilton depression.\n\nHamilton 1959 published no total-score severity bands. This tool returns score and max_score only. It does not apply later 17/24 website or review cutoffs. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"anxious_mood","description":"Caller-assigned Hamilton 1959 anxious mood (integer 0-4: 0 not present, 1 mild, 2 moderate, 3 severe, 4 very severe): worries, anticipation of the worst, fearful anticipation, irritability. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"tension","description":"Caller-assigned Hamilton 1959 tension (integer 0-4): feelings of tension, fatigability, startle response, moved to tears easily, trembling, restlessness, inability to relax. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"fears","description":"Caller-assigned Hamilton 1959 fears (integer 0-4): of dark, of strangers, of being left alone, of animals, of traffic, of crowds. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"insomnia","description":"Caller-assigned Hamilton 1959 insomnia (integer 0-4): difficulty falling asleep, broken sleep, unsatisfying sleep and fatigue on waking, dreams, nightmares, night terrors. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"intellectual","description":"Caller-assigned Hamilton 1959 intellectual / cognitive (integer 0-4): difficulty in concentration, poor memory. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"depressed_mood","description":"Caller-assigned Hamilton 1959 depressed mood (integer 0-4): loss of interest, lack of pleasure in hobbies, depression, early waking, diurnal swing. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"somatic_muscular","description":"Caller-assigned Hamilton 1959 somatic (muscular) (integer 0-4): pains and aches, twitching, stiffness, myoclonic jerks, grinding of teeth, unsteady voice, increased muscular tone. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"somatic_sensory","description":"Caller-assigned Hamilton 1959 somatic (sensory) (integer 0-4): tinnitus, blurring of vision, hot and cold flushes, feelings of weakness, pricking sensation. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"cardiovascular","description":"Caller-assigned Hamilton 1959 cardiovascular symptoms (integer 0-4): tachycardia, palpitations, pain in chest, throbbing of vessels, fainting feelings, missing beat. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"respiratory","description":"Caller-assigned Hamilton 1959 respiratory symptoms (integer 0-4): pressure or constriction in chest, choking feelings, sighing, dyspnea. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"gastrointestinal","description":"Caller-assigned Hamilton 1959 gastro-intestinal symptoms (integer 0-4): difficulty in swallowing, wind, abdominal pain, burning sensations, abdominal fullness, nausea, vomiting, borborygmi, looseness of bowels, loss of weight, constipation. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"genitourinary","description":"Caller-assigned Hamilton 1959 genito-urinary symptoms (integer 0-4): frequency or urgency of micturition, amenorrhea, menorrhagia, development of frigidity, premature ejaculation, loss of libido, impotence. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"autonomic","description":"Caller-assigned Hamilton 1959 autonomic symptoms (integer 0-4): dry mouth, flushing, pallor, tendency to sweat, giddiness, tension headache, raising of hair. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"interview_behavior","description":"Caller-assigned Hamilton 1959 behaviour at interview (integer 0-4): fidgeting, restlessness or pacing, tremor of hands, furrowed brow, strained face, sighing or rapid respiration, facial pallor, swallowing. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"HAM-A","operationId":"get_api_calc_hamilton_anxiety","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_hamilton_anxiety: Each Hamilton 1959 anxiety item must be an integer 0–4 as published. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hamilton-anxiety"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HAM-A (bulk)","operationId":"post_api_calc_hamilton_anxiety","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_hamilton_anxiety: Each Hamilton 1959 anxiety item must be an integer 0–4 as published. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hamilton-anxiety"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"anxious_mood":"0","autonomic":"0","cardiovascular":"0","depressed_mood":"0","fears":"0","gastrointestinal":"0","genitourinary":"0","insomnia":"0","intellectual":"0","interview_behavior":"0","respiratory":"0","somatic_muscular":"0","somatic_sensory":"0","tension":"0"},{"anxious_mood":"0","autonomic":"0","cardiovascular":"0","depressed_mood":"0","fears":"0","gastrointestinal":"0","genitourinary":"0","insomnia":"0","intellectual":"0","interview_behavior":"0","respiratory":"0","somatic_muscular":"0","somatic_sensory":"0","tension":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/glasgow-imrie":{"get":{"description":"Sum the eight Blamey 1984 Glasgow-Imrie factors and return whether severe pancreatitis is predicted (three or more factors).\n\nWhen an agent already has the published cutoffs as flags and must not invent a Glasgow-Imrie total, substitute Ranson, or treat the result as a diagnosis.\n\nNot a medical device and not a diagnosis, ICU order, or treatment recommendation. Blamey 1984 predicts severe pancreatitis when three or more of eight factors are present; magent returns severe_predicted as that published threshold, not a named-patient prognosis.\n\nThis is the Blamey 1984 eight-factor Glasgow-Imrie system only. Transaminases (AST/ALT) were dropped because they did not predict severity. This is not Ranson 1974 (eleven signs).\n\nmagent does not convert units or parse raw labs; each cutoff is a caller-assigned boolean. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_gt_55","description":"Age >55 years (Blamey 1984). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"wbc_gt_15","description":"WBC >15 ×10^9/L. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"glucose_gt_10","description":"Glucose >10 mmol/L. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"urea_gt_16","description":"Urea >16 mmol/L. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pao2_lt_60","description":"Arterial PaO2 <60 mm Hg. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"calcium_lt_2","description":"Calcium <2.0 mmol/L. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"albumin_lt_32","description":"Albumin <32 g/L. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ldh_gt_600","description":"LDH >600 U/L. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Glasgow-Imrie","operationId":"get_api_calc_glasgow_imrie","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, severe_predicted, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/glasgow-imrie"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Glasgow-Imrie (bulk)","operationId":"post_api_calc_glasgow_imrie","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/glasgow-imrie"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_gt_55":"false","albumin_lt_32":"false","calcium_lt_2":"false","glucose_gt_10":"false","ldh_gt_600":"false","pao2_lt_60":"false","urea_gt_16":"false","wbc_gt_15":"false"},{"age_gt_55":"false","albumin_lt_32":"false","calcium_lt_2":"false","glucose_gt_10":"false","ldh_gt_600":"false","pao2_lt_60":"false","urea_gt_16":"false","wbc_gt_15":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/corrected-sodium":{"get":{"description":"Compute expected sodium in hyperglycemia using Katz 1.6 or Hillier 2.4. The formula argument is required. Hillier 2.4 is Hillier TA, Abbott RD, Barrett EJ. Hyponatremia: evaluating the correction factor for hyperglycemia. Am J Med. 1999;106(4):399-403. DOI 10.1016/S0002-9343(99)00055-8.\n\nWhen an agent must not apply a Katz or Hillier factor silently. Callers must choose formula=katz or formula=hillier.\n\nNot a treatment recommendation and not a diagnosis of hyponatremia.\n\nformula is required. magent does not pick Katz or Hillier.\n\nDoes not recommend fluid or insulin therapy. Arithmetic only for the chosen published factor. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sodium_mmol_l","description":"Measured serum sodium in mmol/L (110-160).","required":true,"schema":{"type":"number"},"example":"125"},{"in":"query","name":"glucose_mg_dl","description":"Plasma glucose in mg/dL (50-1000). Provide this or glucose_mmol_l.","required":false,"schema":{"type":"number"},"example":"400"},{"in":"query","name":"glucose_mmol_l","description":"Plasma glucose in mmol/L (2.8-55.5). Converted as mg/dL = mmol/L * 18.015.","required":false,"schema":{"type":"number"},"example":"20.0"},{"in":"query","name":"formula","description":"Correction factor. Required; magent does not pick one silently.","required":true,"schema":{"type":"string","enum":["katz","hillier"]},"example":"katz"}],"summary":"Corrected sodium","operationId":"get_api_calc_corrected_sodium","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, sodium_mmol_l, glucose_mg_dl, factor, corrected_sodium_mmol_l, citation, disclaimer."},"400":{"description":"invalid_sodium: sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.; invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_sodium_formula: formula must be katz or hillier Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/corrected-sodium"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Corrected sodium (bulk)","operationId":"post_api_calc_corrected_sodium","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_sodium: sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.; invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_sodium_formula: formula must be katz or hillier Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/corrected-sodium"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"formula":"katz","glucose_mg_dl":"400","sodium_mmol_l":"125"},{"formula":"katz","glucose_mg_dl":"400","sodium_mmol_l":"125"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pass":{"get":{"description":"Sum three caller-assigned Gorelick 2004 PASS item points and return the published 0-6 total.\n\nWhen an agent has already assigned published Gorelick 2004 points for wheezing, work of breathing, and prolongation of expiration and needs the 0-6 total. magent does not auscultate or diagnose asthma.\n\nNot a medical device and not an asthma diagnosis or a treatment or admission order.\n\nEach of the three items is a caller-assigned published point value from Gorelick 2004. magent does not auscultate or examine the patient.\n\nThree-item PASS selected in Gorelick 2004, max 6. Score only; magent does not emit mild/moderate/severe or GINA bands.\n\nGorelick 2004 enrolled ages 1-18 years; this tool does not take an age parameter and does not validate age.\n\nNot Chalut 2000 PRAM. Not hospital Pediatric Asthma Score (PAS) pathways. Not Westley 1978 croup. magent pas is Samuel 2002 pediatric appendicitis, a different score. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"wheezing","description":"Caller-assigned Gorelick 2004 PASS wheezing (integer 0, 1, or 2): 0 none or mild; 1 moderate; 2 severe wheezing or absent due to poor air exchange. magent does not auscultate.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"work_of_breathing","description":"Caller-assigned Gorelick 2004 PASS work of breathing (integer 0, 1, or 2): 0 none or mild accessory-muscle use or retractions; 1 moderate; 2 severe. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"prolongation_of_expiration","description":"Caller-assigned Gorelick 2004 PASS prolongation of expiration (integer 0, 1, or 2): 0 normal or mildly prolonged; 1 moderately prolonged; 2 severely prolonged. magent does not auscultate.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"PASS","operationId":"get_api_calc_pass","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_pass_item: wheezing, work_of_breathing, and prolongation_of_expiration must each be an integer 0, 1, or 2 (Gorelick 2004 PASS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pass"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PASS (bulk)","operationId":"post_api_calc_pass","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pass_item: wheezing, work_of_breathing, and prolongation_of_expiration must each be an integer 0, 1, or 2 (Gorelick 2004 PASS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pass"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"prolongation_of_expiration":"0","wheezing":"0","work_of_breathing":"0"},{"prolongation_of_expiration":"0","wheezing":"0","work_of_breathing":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/asthma-api":{"get":{"description":"Apply Castro-Rodriguez 2000 Table 1 and return stringent and loose Asthma Predictive Index flags from caller-assigned early-wheeze class and five major/minor criteria.\n\nWhen an agent has caller-assigned early-wheeze frequency (none, any, or frequent) and the published major and minor criteria for a young child with recurrent wheezing and needs the Castro-Rodriguez 2000 Asthma Predictive Index, not mAPI and not an asthma diagnosis.\n\nNot a medical device. Not a diagnosis of asthma. magent does not examine the child.\n\nThis tool is the Castro-Rodriguez 2000 original Asthma Predictive Index (stringent and loose) only. It is not the modified Asthma Predictive Index (mAPI).\n\nThe caller assigns parental MD asthma, MD eczema, MD allergic rhinitis, wheezing apart from colds, and circulating eosinophils >4% of WBC. magent does not take an eosinophil percent and does not interpret a CBC.\n\nDerivation was in the Tucson Children's Respiratory Study among children with recurrent wheezing in the first 3 years. magent does not take numeric age.\n\nstringent_positive and loose_positive are published risk-index flags, not an asthma diagnosis or a treatment or inhaler order. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"wheeze","description":"Early-wheeze class from Castro-Rodriguez 2000. none = not an early wheezer; any = early wheezer (chest ever sounded wheezy in the first 3 years); frequent = early frequent wheezer (parent frequency scale > 3). Loose index requires any or frequent. Stringent index requires frequent.","required":true,"schema":{"type":"string","enum":["none","any","frequent"]},"example":"none"},{"in":"query","name":"parental_md_asthma","description":"Parental physician-diagnosed asthma as assigned by the caller. true or false. Major criterion (Castro-Rodriguez 2000 Table 1). magent does not take a family history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"md_eczema","description":"Physician-diagnosed eczema as assigned by the caller. true or false. Major criterion (Castro-Rodriguez 2000 Table 1). magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"md_allergic_rhinitis","description":"Physician-diagnosed allergic rhinitis as assigned by the caller. true or false. Minor criterion (Castro-Rodriguez 2000 Table 1). magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"wheezing_apart_from_colds","description":"Wheezing apart from colds as assigned by the caller. true or false. Minor criterion (Castro-Rodriguez 2000 Table 1). magent does not auscultate.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"eosinophilia_gt_4pct","description":"Circulating eosinophils >4% of WBC as assigned by the caller (Castro-Rodriguez 2000 Table 1). true or false. Minor criterion. magent does not take an eosinophil percent and does not interpret a CBC.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Asthma Predictive Index","operationId":"get_api_calc_asthma_api","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, stringent_positive, loose_positive, risk_factors_met, major_count, minor_count, wheeze, criteria, citation, disclaimer."},"400":{"description":"invalid_api_wheeze: wheeze must be none, any, or frequent (Castro-Rodriguez 2000 early wheezer vs early frequent wheezer). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/asthma-api"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Asthma Predictive Index (bulk)","operationId":"post_api_calc_asthma_api","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_api_wheeze: wheeze must be none, any, or frequent (Castro-Rodriguez 2000 early wheezer vs early frequent wheezer). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/asthma-api"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"eosinophilia_gt_4pct":"false","md_allergic_rhinitis":"false","md_eczema":"false","parental_md_asthma":"false","wheeze":"none","wheezing_apart_from_colds":"false"},{"eosinophilia_gt_4pct":"false","md_allergic_rhinitis":"false","md_eczema":"false","parental_md_asthma":"false","wheeze":"none","wheezing_apart_from_colds":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rhig":{"get":{"description":"Compute ACOG Practice Bulletin 181 RhD immune globulin vial count from caller-assigned fetal-cell percent and maternal blood volume using AABB Technical Manual rounding of FMH/30.\n\nWhen an agent needs ACOG PB 181 vial arithmetic from a caller-assigned Kleihauer–Betke percent and maternal blood volume and must not invent a brand order, read a slide, or skip the AABB extra vial.\n\nNot a prescription or brand order. magent does not name a product, route, or timing.\n\nmagent does not interpret Kleihauer–Betke slides. fetal_cells_percent is the percent assigned by the caller.\n\nmaternal_blood_volume_ml is caller-assigned. magent does not compute Nadler estimated blood volume.\n\nSociety-policy AABB rounding of whole-blood FMH / 30 only. magent does not convert a red-cell volume path or a flow-cytometry method. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"fetal_cells_percent","description":"Caller-assigned Kleihauer–Betke fetal-cell percent (0-5). magent does not interpret slides.","required":true,"schema":{"type":"number"},"example":"0.4"},{"in":"query","name":"maternal_blood_volume_ml","description":"Caller-assigned maternal blood volume in mL (3000-10000). magent does not compute Nadler EBV.","required":true,"schema":{"type":"number"},"example":"5000"}],"summary":"RhIG vials","operationId":"get_api_calc_rhig","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, fetal_cells_percent, maternal_blood_volume_ml, fmh_ml, raw, vials, vial_micrograms, citation, disclaimer."},"400":{"description":"invalid_rhig: RhIG vial arithmetic must match ACOG Practice Bulletin 181 fetal-cell percent and maternal blood volume from that bulletin. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rhig"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"RhIG vials (bulk)","operationId":"post_api_calc_rhig","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rhig: RhIG vial arithmetic must match ACOG Practice Bulletin 181 fetal-cell percent and maternal blood volume from that bulletin. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rhig"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"fetal_cells_percent":"0.4","maternal_blood_volume_ml":"5000"},{"fetal_cells_percent":"0.4","maternal_blood_volume_ml":"5000"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-child-aerophagia":{"get":{"description":"Apply the Hyams 2016 Rome IV H1d child/adolescent aerophagia diagnostic criteria and return whether the published aerophagia box holds (rome_iv_child_aerophagia).\n\nWhen an agent already has the five caller-assigned Hyams 2016 Rome IV H1d aerophagia flags and needs whether the published child aerophagia box holds. magent does not examine the patient.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose child aerophagia.\n\nThe caller assigns the five flags. Distention includes increases during the day in that one flag. Belching or increased flatus is one flag. magent does not examine the patient.\n\nThis tool is Hyams 2016 Rome IV H1d child/adolescent aerophagia only. All three symptom criteria are required. Not adult belching disorders (impedance). Not infant regurgitation. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"excessive_air_swallowing","description":"Excessive air swallowing, as assigned (Hyams 2016 Rome IV H1d). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"abdominal_distention_intraluminal_air_increases_during_day","description":"Abdominal distention due to intraluminal air that increases during the day, as assigned (Hyams 2016 Rome IV H1d). Distention and increases-during-the-day are one flag. true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"repetitive_belching_and_or_increased_flatus","description":"Repetitive belching and/or increased flatus, as assigned (Hyams 2016 Rome IV H1d). Belching or increased flatus is one caller-assigned flag. true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"not_explained_by_another_condition","description":"After appropriate evaluation, the symptoms cannot be fully explained by another medical condition, as assigned (Hyams 2016 Rome IV H1d). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"fulfilled_at_least_2_months","description":"Criteria fulfilled for at least 2 months, as assigned (Hyams 2016 Rome IV H1d). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV child aerophagia","operationId":"get_api_calc_rome_iv_child_aerophagia","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, rome_iv_child_aerophagia, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_child_aerophagia: Rome IV child aerophagia needs the Hyams 2016 child/adolescent H1d flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-child-aerophagia"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV child aerophagia (bulk)","operationId":"post_api_calc_rome_iv_child_aerophagia","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_child_aerophagia: Rome IV child aerophagia needs the Hyams 2016 child/adolescent H1d flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-child-aerophagia"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"abdominal_distention_intraluminal_air_increases_during_day":"true","excessive_air_swallowing":"true","fulfilled_at_least_2_months":"true","not_explained_by_another_condition":"true","repetitive_belching_and_or_increased_flatus":"true"},{"abdominal_distention_intraluminal_air_increases_during_day":"true","excessive_air_swallowing":"true","fulfilled_at_least_2_months":"true","not_explained_by_another_condition":"true","repetitive_belching_and_or_increased_flatus":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mekhail":{"get":{"description":"Sum the Mekhail 2005 Motzer-extension factors (four Motzer 1999 factors that remained independent, plus prior radiotherapy and ≥2 metastatic sites) and return favorable (0–1), intermediate (2), or poor (≥3). Mekhail dropped Motzer’s no-prior-nephrectomy item.\n\nWhen an agent needs the published Mekhail 2005 Motzer-extension point total and risk group and must not invent an RCC diagnosis or treatment recommendation, must not use Motzer 1999 bands or Motzer 2002 time-to-treatment, and must not assign KPS, assay LDH, hemoglobin, or calcium, image metastases, or review radiotherapy history.\n\nNot a medical device and not an RCC diagnosis or treatment recommendation. magent does not examine the patient.\n\nNot Motzer 1999. Bands are Mekhail 2005: favorable 0 or 1, intermediate 2, poor more than 2 (≥3). Do not apply Motzer 1999 0 / 1–2 / ≥3.\n\nNot Motzer 2002. This tool does not include time from diagnosis to treatment. Mekhail dropped Motzer’s no-prior-nephrectomy item.\n\nNot IMDC (Heng 2009). This tool does not include neutrophils or platelets.\n\nmagent does not assay LDH, hemoglobin, or calcium, apply ULN/LLN, observe Karnofsky performance status, image metastases, or review radiotherapy history. All six inputs are caller-assigned flags. metastatic_sites_ge_2 is the paper’s 0–1 vs 2–3 site-count surrogate for individual hepatic, lung, and retroperitoneal nodal sites. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"kps_lt_80","description":"Karnofsky performance status <80% as assigned by the caller (Mekhail 2005; Motzer 1999 factor that remained independent). true scores 1. magent does not observe KPS.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ldh_gt_1_5_uln","description":"Serum LDH >1.5 × institutional ULN as assigned by the caller (Mekhail 2005; Motzer 1999 factor that remained independent). true scores 1. magent does not assay LDH or apply ULN.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hemoglobin_lt_lln","description":"Hemoglobin below the institutional lower limit of normal as assigned by the caller (Mekhail 2005; Motzer 1999 factor that remained independent). true scores 1. magent does not assay hemoglobin or apply LLN.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"corrected_calcium_gt_10","description":"Corrected calcium >10 mg/dL as assigned by the caller (Mekhail 2005; Motzer 1999 paper threshold, not institutional ULN). true scores 1. magent does not assay calcium.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"prior_radiotherapy","description":"Prior radiotherapy as assigned by the caller (Mekhail 2005). true scores 1. magent does not review radiotherapy history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"metastatic_sites_ge_2","description":"Two or more metastatic sites as assigned by the caller (Mekhail 2005: number of sites 0–1 vs 2–3 as surrogate for individual hepatic, lung, and retroperitoneal nodal sites). true scores 1. magent does not image metastases.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Mekhail","operationId":"get_api_calc_mekhail","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, mekhail_band, components, citation, disclaimer."},"400":{"description":"invalid_mekhail: Mekhail Motzer-extension inputs must match Mekhail 2005 Motzer factors, prior radiotherapy, and metastatic-site count from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mekhail"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Mekhail (bulk)","operationId":"post_api_calc_mekhail","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_mekhail: Mekhail Motzer-extension inputs must match Mekhail 2005 Motzer factors, prior radiotherapy, and metastatic-site count from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mekhail"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"corrected_calcium_gt_10":"false","hemoglobin_lt_lln":"false","kps_lt_80":"false","ldh_gt_1_5_uln":"false","metastatic_sites_ge_2":"false","prior_radiotherapy":"false"},{"corrected_calcium_gt_10":"false","hemoglobin_lt_lln":"false","kps_lt_80":"false","ldh_gt_1_5_uln":"false","metastatic_sites_ge_2":"false","prior_radiotherapy":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/resp":{"get":{"description":"Sum Schmidt 2014 Table 3 RESP points from caller-assigned pre-ECMO predictors and return class I–V with published hospital survival percents.\n\nWhen an agent needs the published RESP point total and class survival percent and must not invent an ECMO cannulation order or a continuous logit.\n\nNot a medical device and not an ECMO initiation, cannulation, or continuation order. magent does not assign ECMO and does not examine the patient.\n\nOne Table 3 acute respiratory diagnosis group only. Do not add a second diagnosis. Flags are caller-assigned (immunocompromised includes malignancy, solid organ transplant, HIV, or cirrhosis as assigned).\n\nPaCO2 uses the published ≥75 mm Hg cutoff (the paper also states ≥10 kPa). magent accepts mm Hg only and does not convert kPa.\n\nHospital survival percents are the five published risk-class figures (I 92%, II 76%, III 57%, IV 33%, V 18%). This tool does not compute a continuous logit. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_years","description":"Age in years, integer 18-120, as assigned before ECMO (Schmidt 2014 Table 3). 18-49 → 0; 50-59 → -2; ≥60 → -3.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"immunocompromised","description":"Immunocompromised status as assigned by the caller (Schmidt 2014: malignancy, solid organ transplant, HIV, or cirrhosis). true or false. true scores -2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"mechanical_ventilation_before_ecmo","description":"Duration of mechanical ventilation before ECMO as one token (Schmidt 2014 Table 3). lt_48h → +3; h48_to_7d → +1; gt_7d → 0. magent does not subtract timestamps.","required":true,"schema":{"type":"string","enum":["lt_48h","h48_to_7d","gt_7d"]},"example":"lt_48h"},{"in":"query","name":"diagnosis","description":"One acute respiratory diagnosis group (Schmidt 2014 Table 3). viral_pneumonia → +3; bacterial_pneumonia → +3; asthma → +11; trauma_burn → +3; aspiration_pneumonitis → +5; other_acute_respiratory → +1; nonrespiratory_or_chronic_respiratory → 0. Select one token. magent does not diagnose.","required":true,"schema":{"type":"string","enum":["viral_pneumonia","bacterial_pneumonia","asthma","trauma_burn","aspiration_pneumonitis","other_acute_respiratory","nonrespiratory_or_chronic_respiratory"]},"example":"viral_pneumonia"},{"in":"query","name":"cns_dysfunction","description":"Central nervous system dysfunction as assigned by the caller (Schmidt 2014: neurotrauma, stroke, encephalopathy, cerebral embolism, or seizure). true or false. true scores -7. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"acute_nonpulmonary_infection","description":"Acute associated (nonpulmonary) infection as assigned by the caller (Schmidt 2014: bacteremia, pneumonia diagnosed >48 h before ECMO, or infected burns). true or false. true scores -3.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"neuromuscular_blockade_before_ecmo","description":"Neuromuscular blockade agents before ECMO as assigned by the caller (Schmidt 2014 Table 3). true or false. true scores +1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"nitric_oxide_before_ecmo","description":"Nitric oxide use before ECMO as assigned by the caller (Schmidt 2014 Table 3). true or false. true scores -1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bicarbonate_infusion_before_ecmo","description":"Bicarbonate infusion before ECMO as assigned by the caller (Schmidt 2014 Table 3). true or false. true scores -2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cardiac_arrest_before_ecmo","description":"Cardiac arrest before ECMO as assigned by the caller (Schmidt 2014 Table 3). true or false. true scores -2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"paco2_mm_hg","description":"Arterial PaCO2 in mm Hg (8-200) as assigned before ECMO. ≥75 scores -1 (Schmidt 2014 Table 3; the paper also states ≥10 kPa). magent does not convert kPa and does not read an ABG.","required":true,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"peak_inspiratory_pressure_cm_h2o","description":"Peak inspiratory pressure in cm H2O (5-80) as assigned before ECMO. ≥42 scores -1 (Schmidt 2014 Table 3). magent does not read a ventilator.","required":true,"schema":{"type":"number"},"example":"30"}],"summary":"RESP","operationId":"get_api_calc_resp","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, min_score, max_score, resp_class, hospital_survival_percent, age_years, diagnosis, mechanical_ventilation_before_ecmo, paco2_mm_hg, peak_inspiratory_pressure_cm_h2o, components, citation, disclaimer."},"400":{"description":"invalid_resp: RESP needs Schmidt 2014 pre-ECMO respiratory-failure predictors in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/resp"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"RESP (bulk)","operationId":"post_api_calc_resp","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_resp: RESP needs Schmidt 2014 pre-ECMO respiratory-failure predictors in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/resp"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"acute_nonpulmonary_infection":"false","age_years":"40","bicarbonate_infusion_before_ecmo":"false","cardiac_arrest_before_ecmo":"false","cns_dysfunction":"false","diagnosis":"viral_pneumonia","immunocompromised":"false","mechanical_ventilation_before_ecmo":"lt_48h","neuromuscular_blockade_before_ecmo":"false","nitric_oxide_before_ecmo":"false","paco2_mm_hg":"40","peak_inspiratory_pressure_cm_h2o":"30"},{"acute_nonpulmonary_infection":"false","age_years":"40","bicarbonate_infusion_before_ecmo":"false","cardiac_arrest_before_ecmo":"false","cns_dysfunction":"false","diagnosis":"viral_pneumonia","immunocompromised":"false","mechanical_ventilation_before_ecmo":"lt_48h","neuromuscular_blockade_before_ecmo":"false","nitric_oxide_before_ecmo":"false","paco2_mm_hg":"40","peak_inspiratory_pressure_cm_h2o":"30"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-oic":{"get":{"description":"Apply the Mearin 2016 Rome IV C6 opioid-induced constipation criteria and return symptom_count (0-6) and whether the published C6 box holds (rome_iv_oic).\n\nWhen an agent already has the eight caller-assigned Rome IV C6 flags as in Mearin 2016 and needs whether the published opioid-induced constipation box holds. magent does not examine the patient or prescribe opioids.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose opioid-induced constipation.\n\nThe caller assigns the eight flags. magent does not examine the patient.\n\nThis tool is adult Rome IV C6 opioid-induced constipation only. Not functional constipation C2 (rome-iv-fc is a different tool), not Rome IV IBS, and not child. magent does not prescribe opioids. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"new_or_worsening_constipation_on_opioid_change","description":"New or worsening constipation when initiating, changing, or increasing opioid therapy, as assigned (Mearin 2016 C6). true or false as assigned by the caller. magent does not take a history or prescribe opioids.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"straining_gt_25_percent","description":"Straining during more than 25% of defecations (one of six C6 symptom items; at least two required). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"lumpy_or_hard_stools_gt_25_percent","description":"Lumpy or hard stools (Bristol stool form types 1-2) more than 25% of defecations (one of six C6 symptom items; at least two required). true or false as assigned by the caller. magent does not inspect stool.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"incomplete_evacuation_gt_25_percent","description":"Sensation of incomplete evacuation more than 25% of defecations (one of six C6 symptom items; at least two required). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"anorectal_obstruction_gt_25_percent","description":"Sensation of anorectal obstruction/blockage more than 25% of defecations (one of six C6 symptom items; at least two required). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"manual_maneuvers_gt_25_percent","description":"Manual maneuvers to facilitate more than 25% of defecations (one of six C6 symptom items; at least two required). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"fewer_than_3_sbm_per_week","description":"Fewer than three spontaneous bowel movements per week (one of six C6 symptom items; at least two required). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"loose_stools_rare_without_laxatives","description":"Loose stools are rarely present without the use of laxatives, as assigned (Mearin 2016 C6). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV OIC","operationId":"get_api_calc_rome_iv_oic","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, symptom_count, rome_iv_oic, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-oic"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV OIC (bulk)","operationId":"post_api_calc_rome_iv_oic","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-oic"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"anorectal_obstruction_gt_25_percent":"false","fewer_than_3_sbm_per_week":"true","incomplete_evacuation_gt_25_percent":"false","loose_stools_rare_without_laxatives":"true","lumpy_or_hard_stools_gt_25_percent":"false","manual_maneuvers_gt_25_percent":"false","new_or_worsening_constipation_on_opioid_change":"true","straining_gt_25_percent":"true"},{"anorectal_obstruction_gt_25_percent":"false","fewer_than_3_sbm_per_week":"true","incomplete_evacuation_gt_25_percent":"false","loose_stools_rare_without_laxatives":"true","lumpy_or_hard_stools_gt_25_percent":"false","manual_maneuvers_gt_25_percent":"false","new_or_worsening_constipation_on_opioid_change":"true","straining_gt_25_percent":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pecarn-cspine":{"get":{"description":"Apply the Leonard 2024 PECARN cervical-spine imaging prediction rule and return high (consider CT), intermediate (consider x-rays), or low (consider clinical clearance) from eight caller-assigned findings after pediatric blunt trauma. No age split.\n\nWhen an agent has caller-assigned findings after blunt trauma in a child and needs the Leonard 2024 PECARN C-spine imaging rule, not NEXUS, not Canadian C-spine, not PECARN head (pecarn-head), and not PECARN IAI (pecarn-iai).\n\nNot a medical device. Not a diagnosis. magent does not examine the patient.\n\nThis tool is the Leonard 2024 PECARN C-spine prediction rule only. It is not NEXUS, not the Canadian C-spine rule, not PECARN head CT (pecarn-head), and not PECARN IAI (pecarn-iai).\n\nOne tree with no age split (unlike PECARN head). Age is not a parameter. The caller assigns all eight flags. magent does not take a GCS integer or AVPU letter.\n\nHigh-risk (any of GCS 3-8 or AVPU U; abnormal airway, breathing, or circulation; focal neurologic deficit) considers CT. Else any CART non-negligible factor considers x-rays. Else consider clinical clearance. High-risk beats intermediate.\n\nSubstantial head or torso injury is caller-assigned (paper: injuries warranting inpatient observation or surgical intervention; examples skull fracture, pneumothorax, solid-organ injury, T/L/S spine fracture, pelvic fracture). magent does not interpret imaging. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"gcs_3_to_8_or_avpu_u","description":"GCS 3-8 or AVPU = U as assigned by the caller (Leonard 2024 high-risk; paper: factors associated with >10% CSI). true or false. High-risk; consider CT when any high-risk factor is true. This is not the intermediate GCS 9-14 / AVPU V or P / other AMS flag. magent does not take a GCS integer or AVPU letter.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"abnormal_airway_breathing_or_circulation","description":"Abnormal airway, breathing, or circulation as assigned by the caller (Leonard 2024 high-risk). true or false. High-risk; consider CT when any high-risk factor is true. magent does not examine airway, breathing, or circulation.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"focal_neurologic_deficit","description":"Focal neurologic deficit (paresthesia, numbness, or weakness) as assigned by the caller (Leonard 2024 high-risk). true or false. High-risk; consider CT when any high-risk factor is true. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"neck_pain","description":"Self-reported neck pain as assigned by the caller (Leonard 2024 CART non-negligible / intermediate). true or false. Consider x-rays when any intermediate factor is true and no high-risk factor is true. magent does not take a pain score.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"altered_mental_status_gcs_9_to_14","description":"Altered mental status as GCS 9-14, AVPU V or P, or other AMS (not the high-risk U / GCS 3-8 flag) as assigned by the caller (Leonard 2024 CART non-negligible / intermediate). true or false. magent does not take a GCS integer or AVPU letter.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"substantial_head_injury","description":"Substantial head injury as assigned by the caller (Leonard 2024 CART non-negligible / intermediate). Paper: injuries warranting inpatient observation or surgical intervention (example: skull fracture). true or false. Caller assigns the boolean; magent does not interpret imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"substantial_torso_injury","description":"Substantial torso injury as assigned by the caller (Leonard 2024 CART non-negligible / intermediate). Paper: injuries warranting inpatient observation or surgical intervention (examples: pneumothorax; solid-organ injury; T/L/S spine fracture; pelvic fracture). true or false. Caller assigns the boolean; magent does not interpret imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"midline_neck_tenderness","description":"Midline neck tenderness as assigned by the caller (Leonard 2024 CART non-negligible / intermediate). true or false. magent does not palpate the neck.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"PECARN pediatric C-spine","operationId":"get_api_calc_pecarn_cspine","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, risk_tier, consider_ct, consider_xray, consider_clinical_clearance, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pecarn-cspine"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PECARN pediatric C-spine (bulk)","operationId":"post_api_calc_pecarn_cspine","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pecarn-cspine"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"abnormal_airway_breathing_or_circulation":"false","altered_mental_status_gcs_9_to_14":"false","focal_neurologic_deficit":"false","gcs_3_to_8_or_avpu_u":"false","midline_neck_tenderness":"false","neck_pain":"false","substantial_head_injury":"false","substantial_torso_injury":"false"},{"abnormal_airway_breathing_or_circulation":"false","altered_mental_status_gcs_9_to_14":"false","focal_neurologic_deficit":"false","gcs_3_to_8_or_avpu_u":"false","midline_neck_tenderness":"false","neck_pain":"false","substantial_head_injury":"false","substantial_torso_injury":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/scoff":{"get":{"description":"Sum the five Morgan 1999 SCOFF items and return whether two or more answers are affirmative.\n\nWhen an agent needs the published SCOFF point total and Morgan 1999 ≥2 screen and must not invent a diagnosis or interview the patient.\n\nNot a medical device and not a diagnosis of an eating disorder.\n\nmagent does not interview the patient.\n\nThe caller assigns each flag. magent does not interpret individual items.\n\nThis is Morgan 1999 SCOFF only (screen-positive at two or more affirmative answers). magent does not apply later variants. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"make_yourself_sick","description":"Do you make yourself Sick because you feel uncomfortably full? (Morgan 1999). true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"lost_control_over_eating","description":"Do you worry you have lost Control over how much you eat? (Morgan 1999). true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"lost_more_than_one_stone_3_months","description":"Have you recently lost more than One stone (14 lb) in a 3-month period? (Morgan 1999). true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"believe_fat_when_others_say_thin","description":"Do you believe yourself to be Fat when others say you are too thin? (Morgan 1999). true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"food_dominates_life","description":"Would you say that Food dominates your life? (Morgan 1999). true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"SCOFF","operationId":"get_api_calc_scoff","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, screen_positive, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/scoff"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SCOFF (bulk)","operationId":"post_api_calc_scoff","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/scoff"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"believe_fat_when_others_say_thin":"false","food_dominates_life":"false","lost_control_over_eating":"false","lost_more_than_one_stone_3_months":"false","make_yourself_sick":"false"},{"believe_fat_when_others_say_thin":"false","food_dominates_life":"false","lost_control_over_eating":"false","lost_more_than_one_stone_3_months":"false","make_yourself_sick":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/sledai-2k":{"get":{"description":"Sum Gladman 2002 SLEDAI-2K weights from 24 caller-assigned descriptors present in the last 10 days and return the integer score (max 105). Not a diagnosis.\n\nWhen an agent already has the 24 Gladman 2002 SLEDAI-2K descriptors assigned for the last 10 days and needs that paper's weighted total. magent does not examine the patient, diagnose SLE, score SLICC damage, or apply SELENA-SLEDAI flare rules.\n\nNot a medical device and not a diagnosis of systemic lupus erythematosus or a treatment order.\n\nEach of the 24 descriptors is caller-assigned for the last 10 days. magent does not examine the patient, assay urine or serology, or read imaging.\n\nSLEDAI-2K vs original SLEDAI: proteinuria scores if >0.5 g/24 h (not the original >3.5 g/24 h only). Rash, alopecia, and mucosal ulcers score if new or persistent (not new only).\n\nDoes not implement SLICC/ACR damage. Does not implement SELENA-SLEDAI flare rules. Does not invent mild, moderate, or severe bands.\n\nThis is the Gladman 2002 SLEDAI-2K weighted integer only (max 105). Not a classification of SLE. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"seizure","description":"Seizure in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K). Recent onset. Exclude metabolic, infectious, or drug cause. true scores 8. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"psychosis","description":"Psychosis in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): altered ability to function in normal activity due to severe disturbance in the perception of reality. Exclude uremia and drug causes. true scores 8. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"organic_brain_syndrome","description":"Organic brain syndrome in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): altered mental function with impaired orientation, memory, or other intellectual function, rapid onset and fluctuating features. Exclude metabolic, infectious, or drug causes. true scores 8. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"visual_disturbance","description":"Visual disturbance in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): retinal changes of SLE (cytoid bodies, retinal hemorrhages, serous exudate or hemorrhages in the choroid, or optic neuritis). Exclude hypertension, infection, or drug causes. true scores 8. magent does not examine the fundus.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cranial_nerve_disorder","description":"Cranial nerve disorder in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): new onset of sensory or motor neuropathy involving cranial nerves. true scores 8. magent does not examine cranial nerves.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"lupus_headache","description":"Lupus headache in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): severe persistent headache; may be migrainous, but must be nonresponsive to narcotic analgesia. true scores 8. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cva","description":"Cerebrovascular accident in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): new onset of CVA(s). Exclude arteriosclerosis. true scores 8. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"vasculitis","description":"Vasculitis in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): ulceration, gangrene, tender finger nodules, periungual infarction, splinter hemorrhages, or biopsy or angiogram proof of vasculitis. true scores 8. magent does not examine skin or read a biopsy.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"arthritis","description":"Arthritis in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): more than 2 joints with pain and signs of inflammation (tenderness, swelling, or effusion). true scores 4. magent does not examine joints.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"myositis","description":"Myositis in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): proximal muscle aching/weakness with elevated creatine phosphokinase/aldolase, EMG changes, or a biopsy showing myositis. true scores 4. magent does not assay muscle enzymes.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"urinary_casts","description":"Urinary casts in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): heme-granular or red blood cell casts. true scores 4. magent does not assay urine.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hematuria","description":"Hematuria in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): >5 red blood cells/high power field. Exclude stone, infection, or other cause. true scores 4. magent does not assay urine.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"proteinuria","description":"Proteinuria in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): >0.5 g/24 h (not original SLEDAI >3.5 g/24 h only). true scores 4. magent does not assay urine.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pyuria","description":"Pyuria in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): >5 white blood cells/high power field. Exclude infection. true scores 4. magent does not assay urine.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"rash","description":"Rash in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): inflammatory type rash. Scores if new or persistent (not original SLEDAI new only). true scores 2. magent does not examine skin.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"alopecia","description":"Alopecia in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): abnormal, patchy or diffuse loss of hair. Scores if new or persistent (not original SLEDAI new only). true scores 2. magent does not examine the scalp.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"mucosal_ulcers","description":"Mucosal ulcers in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): oral or nasal ulcerations. Scores if new or persistent (not original SLEDAI new only). true scores 2. magent does not examine mucosa.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pleurisy","description":"Pleurisy in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): pleuritic chest pain with pleural rub or effusion, or pleural thickening. true scores 2. magent does not examine the chest.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pericarditis","description":"Pericarditis in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): pericardial pain with at least one of rub, effusion, or electrocardiogram or echocardiogram confirmation. true scores 2. magent does not examine the heart.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"low_complement","description":"Low complement in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): CH50, C3, or C4 below the lower limit of normal for the testing laboratory. true scores 2. magent does not assay complement.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"increased_dna_binding","description":"Increased DNA binding in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): DNA binding by Farr assay above the normal range for the testing laboratory. true scores 2. magent does not assay anti-dsDNA.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"fever","description":"Fever in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): >38°C. Exclude infectious cause. true scores 1. magent does not measure temperature.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"thrombocytopenia","description":"Thrombocytopenia in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): <100,000 platelets/mm³. Exclude drug causes. true scores 1. magent does not assay platelets.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"leukopenia","description":"Leukopenia in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): <3,000 white blood cells/mm³. Exclude drug causes. true scores 1. magent does not assay blood counts.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"SLEDAI-2K","operationId":"get_api_calc_sledai_2k","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_sledai: SLEDAI-2K needs the twenty-four Gladman 2002 descriptors as true or false (last 10 days). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sledai-2k"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SLEDAI-2K (bulk)","operationId":"post_api_calc_sledai_2k","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_sledai: SLEDAI-2K needs the twenty-four Gladman 2002 descriptors as true or false (last 10 days). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sledai-2k"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"alopecia":"false","arthritis":"true","cranial_nerve_disorder":"false","cva":"false","fever":"false","hematuria":"false","increased_dna_binding":"false","leukopenia":"false","low_complement":"false","lupus_headache":"false","mucosal_ulcers":"false","myositis":"false","organic_brain_syndrome":"false","pericarditis":"false","pleurisy":"false","proteinuria":"false","psychosis":"false","pyuria":"false","rash":"true","seizure":"false","thrombocytopenia":"false","urinary_casts":"false","vasculitis":"false","visual_disturbance":"false"},{"alopecia":"false","arthritis":"true","cranial_nerve_disorder":"false","cva":"false","fever":"false","hematuria":"false","increased_dna_binding":"false","leukopenia":"false","low_complement":"false","lupus_headache":"false","mucosal_ulcers":"false","myositis":"false","organic_brain_syndrome":"false","pericarditis":"false","pleurisy":"false","proteinuria":"false","psychosis":"false","pyuria":"false","rash":"true","seizure":"false","thrombocytopenia":"false","urinary_casts":"false","vasculitis":"false","visual_disturbance":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/alsfrs-r":{"get":{"description":"Sum twelve caller-assigned Cedarbaum 1999 ALSFRS-R items (each integer 0-4, including three respiratory) and return the published 0-48 total. Does not apply later total-score severity bands or percent of maximum.\n\nWhen an agent already has Cedarbaum 1999 integers 0-4 for the twelve ALSFRS-R items and needs the published total. magent does not examine the patient, diagnose ALS, score original 10-item ALSFRS, score Karnofsky or ECOG, or apply later percent-of-max or staging cutoffs.\n\nNot a medical device and not an ALS diagnosis or treatment order.\n\nEach of the twelve items is a caller-assigned integer 0-4. magent does not examine the patient.\n\nThis is Cedarbaum 1999 ALSFRS-R only (twelve items including dyspnea, orthopnea, and respiratory_insufficiency; max 48). magent does not score original 10-item ALSFRS, Karnofsky, or ECOG.\n\ncutting_food is one 0-4 slot. Patients without gastrostomy and patients with gastrostomy share that slot; the caller assigns 0-4 from whichever Cedarbaum 1999 Table 1 column applies. magent does not branch on gastrostomy.\n\nCedarbaum 1999 published no total-score severity bands. This tool returns score and max_score only. It does not apply later percent-of-max, mild/moderate/severe, or staging website or review cutoffs. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"speech","description":"Caller-assigned Cedarbaum 1999 speech (integer 0-4): 4 normal speech processes; 3 detectable speech disturbance; 2 intelligible with repeating; 1 speech combined with nonvocal communication; 0 loss of useful speech. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"salivation","description":"Caller-assigned Cedarbaum 1999 salivation (integer 0-4): 4 normal; 3 slight but definite excess of saliva in mouth, may have nighttime drooling; 2 moderately excessive saliva, may have minimal drooling; 1 marked excess of saliva with some drooling; 0 marked drooling, requires constant tissue or handkerchief. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"swallowing","description":"Caller-assigned Cedarbaum 1999 swallowing (integer 0-4): 4 normal eating habits; 3 early eating problems, occasional choking; 2 dietary consistency changes; 1 needs supplemental tube feeding; 0 NPO (exclusively parenteral or enteral feeding). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"handwriting","description":"Caller-assigned Cedarbaum 1999 handwriting (integer 0-4): 4 normal; 3 slow or sloppy, all words are legible; 2 not all words are legible; 1 able to grip pen but unable to write; 0 unable to grip pen. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"cutting_food","description":"Caller-assigned Cedarbaum 1999 cutting food and handling utensils (integer 0-4). Patients without gastrostomy and patients with gastrostomy share this single 0-4 slot; the caller assigns 0-4 from whichever Table 1 column applies. Without gastrostomy: 4 normal; 3 somewhat slow and clumsy, but no help needed; 2 can cut most foods, although slow and clumsy, some help needed; 1 food must be cut by someone, but can still feed slowly; 0 needs to be fed. With gastrostomy: 4 normal; 3 clumsy but able to perform all manipulations independently; 2 some help needed with closures and fasteners; 1 provides minimal assistance to caregiver; 0 unable to perform any aspect of task. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"dressing_hygiene","description":"Caller-assigned Cedarbaum 1999 dressing and hygiene (integer 0-4): 4 normal function; 3 independent and complete self-care with effort or decreased efficiency; 2 intermittent assistance or substitute methods; 1 needs attendant for self-care; 0 total dependence. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"turning_in_bed","description":"Caller-assigned Cedarbaum 1999 turning in bed and adjusting bed clothes (integer 0-4): 4 normal; 3 somewhat slow and clumsy, but no help needed; 2 can turn alone or adjust sheets, but with great difficulty; 1 can initiate, but not turn or adjust sheets alone; 0 helpless. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"walking","description":"Caller-assigned Cedarbaum 1999 walking (integer 0-4): 4 normal; 3 early ambulation difficulties; 2 walks with assistance; 1 nonambulatory functional movement only; 0 no purposeful leg movement. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"climbing_stairs","description":"Caller-assigned Cedarbaum 1999 climbing stairs (integer 0-4): 4 normal; 3 slow; 2 mild unsteadiness or fatigue; 1 needs assistance; 0 cannot do. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"dyspnea","description":"Caller-assigned Cedarbaum 1999 dyspnea (integer 0-4): 4 none; 3 occurs when walking; 2 occurs with one or more of eating, bathing, dressing (ADL); 1 occurs at rest, difficulty breathing when either sitting or lying; 0 significant difficulty, considering using mechanical respiratory support. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"orthopnea","description":"Caller-assigned Cedarbaum 1999 orthopnea (integer 0-4): 4 none; 3 some difficulty sleeping at night due to shortness of breath, does not routinely use more than two pillows; 2 needs extra pillows in order to sleep (more than two); 1 can only sleep sitting up; 0 unable to sleep. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"respiratory_insufficiency","description":"Caller-assigned Cedarbaum 1999 respiratory insufficiency (integer 0-4): 4 none; 3 intermittent use of NIPPV; 2 continuous use of NIPPV during the night; 1 continuous use of NIPPV during the night and day; 0 invasive mechanical ventilation by intubation or tracheostomy. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"ALSFRS-R","operationId":"get_api_calc_alsfrs_r","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_alsfrs: ALSFRS-R needs the twelve Cedarbaum 1999 items each as an integer 0-4. Returned before settlement; you are not charged.; invalid_alsfrs_item: each ALSFRS-R item must be an integer from 0 to 4 (Cedarbaum 1999). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/alsfrs-r"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ALSFRS-R (bulk)","operationId":"post_api_calc_alsfrs_r","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_alsfrs: ALSFRS-R needs the twelve Cedarbaum 1999 items each as an integer 0-4. Returned before settlement; you are not charged.; invalid_alsfrs_item: each ALSFRS-R item must be an integer from 0 to 4 (Cedarbaum 1999). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/alsfrs-r"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"climbing_stairs":"0","cutting_food":"0","dressing_hygiene":"0","dyspnea":"0","handwriting":"0","orthopnea":"0","respiratory_insufficiency":"0","salivation":"0","speech":"0","swallowing":"0","turning_in_bed":"0","walking":"0"},{"climbing_stairs":"0","cutting_food":"0","dressing_hygiene":"0","dyspnea":"0","handwriting":"0","orthopnea":"0","respiratory_insufficiency":"0","salivation":"0","speech":"0","swallowing":"0","turning_in_bed":"0","walking":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/lrinec":{"get":{"description":"Sum the Wong 2004 LRINEC laboratory table and return whether the total is at or above the published cutoff of 6.\n\nWhen an agent needs the published Wong 2004 laboratory score and must not invent a necrotizing-fasciitis diagnosis or an operative decision.\n\nNot a diagnosis of necrotizing fasciitis and not an operative decision.\n\nA score below the cutoff of 6 does not exclude disease; Wong later noted that about 10% of patients with score <6 still had necrotizing fasciitis.\n\nWong 2004 laboratory score only. magent does not add a separate high band at 8. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"crp_mg_l","description":"C-reactive protein in mg/L (0-500). ≥150 scores 4; otherwise 0.","required":true,"schema":{"type":"number"},"example":"20"},{"in":"query","name":"wbc_k_ul","description":"WBC in 10^3/mm^3 (same as k/µL or 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500. <15 scores 0; 15-25 scores 1; >25 scores 2.","required":false,"schema":{"type":"number"},"example":"8"},{"in":"query","name":"wbc_ul","description":"WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000. Converted as k/µL = cells/µL / 1000.","required":false,"schema":{"type":"number"},"example":"8000"},{"in":"query","name":"hemoglobin_g_dl","description":"Hemoglobin in g/dL (3-22). >13.5 scores 0; 11-13.5 scores 1; <11 scores 2.","required":true,"schema":{"type":"number"},"example":"14"},{"in":"query","name":"sodium_mmol_l","description":"Serum sodium in mmol/L (110-160). <135 scores 2; otherwise 0.","required":true,"schema":{"type":"number"},"example":"140"},{"in":"query","name":"creatinine_mg_dl","description":"Creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l. Converted as µmol/L = mg/dL × 88.42. >141 µmol/L scores 2.","required":false,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"creatinine_umol_l","description":"Creatinine in µmol/L (9-1768). Provide this or creatinine_mg_dl. >141 scores 2.","required":false,"schema":{"type":"number"},"example":"88.42"},{"in":"query","name":"glucose_mg_dl","description":"Plasma glucose in mg/dL (50-1000). Provide this or glucose_mmol_l, not both. Converted as mmol/L = mg/dL / 18.0182. >10 mmol/L scores 1.","required":false,"schema":{"type":"number"},"example":"90"},{"in":"query","name":"glucose_mmol_l","description":"Plasma glucose in mmol/L (2.8-55.5). Provide this or glucose_mg_dl, not both. >10 scores 1.","required":false,"schema":{"type":"number"},"example":"5.0"}],"summary":"LRINEC","operationId":"get_api_calc_lrinec","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, at_or_above_cutoff, crp_mg_l, wbc_k_ul, hemoglobin_g_dl, sodium_mmol_l, creatinine_umol_l, glucose_mmol_l, components, citation, disclaimer."},"400":{"description":"invalid_crp: crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_sodium: sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/lrinec"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"LRINEC (bulk)","operationId":"post_api_calc_lrinec","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_crp: crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_sodium: sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/lrinec"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"creatinine_mg_dl":"1.0","crp_mg_l":"20","glucose_mg_dl":"90","hemoglobin_g_dl":"14","sodium_mmol_l":"140","wbc_k_ul":"8"},{"creatinine_mg_dl":"1.0","crp_mg_l":"20","glucose_mg_dl":"90","hemoglobin_g_dl":"14","sodium_mmol_l":"140","wbc_k_ul":"8"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/cpp":{"get":{"description":"Compute cerebral perfusion pressure as MAP minus ICP in mm Hg and flag whether CPP is at least 70 mm Hg per Rosner 1995.\n\nWhen an agent has caller-supplied MAP and ICP in mm Hg and needs the published CPP identity and the Rosner 1995 minimum-CPP-of-70 flag, not a monitor reading or a treatment order.\n\nNot a medical device. Not a treatment protocol.\n\nmap_mm_hg and icp_mm_hg are caller-supplied. magent does not measure MAP or ICP and is not an invasive monitor.\n\ncpp_ge_70 is the Rosner 1995 protocol minimum CPP of at least 70 mm Hg. It is not a later target.\n\nCPP may be negative when ICP exceeds MAP. That is not a validation error. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"map_mm_hg","description":"Mean arterial pressure in mm Hg (30-180). Caller-supplied; magent does not measure MAP.","required":true,"schema":{"type":"number"},"example":"90"},{"in":"query","name":"icp_mm_hg","description":"Intracranial pressure in mm Hg (0-100). Caller-supplied; magent does not measure ICP. ICP may exceed MAP.","required":true,"schema":{"type":"number"},"example":"10"}],"summary":"CPP","operationId":"get_api_calc_cpp","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, map_mm_hg, icp_mm_hg, cpp_mm_hg, cpp_ge_70, citation, disclaimer."},"400":{"description":"invalid_map_mm_hg: map_mm_hg must be a number from 30 to 180. Returned before settlement; you are not charged.; invalid_icp_mm_hg: icp_mm_hg must be a number from 0 to 100 (Rosner 1995 CPP). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cpp"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CPP (bulk)","operationId":"post_api_calc_cpp","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_map_mm_hg: map_mm_hg must be a number from 30 to 180. Returned before settlement; you are not charged.; invalid_icp_mm_hg: icp_mm_hg must be a number from 0 to 100 (Rosner 1995 CPP). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cpp"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"icp_mm_hg":"10","map_mm_hg":"90"},{"icp_mm_hg":"10","map_mm_hg":"90"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rmi":{"get":{"description":"Compute the Jacobs 1990 risk of malignancy index as ultrasound score × menopausal score × CA125 (U/ml), then whether that product exceeds the published cutoff of 200.\n\nWhen an agent has a caller-assigned ultrasound score (0, 1, or 3), postmenopausal flag, and CA125 in U/ml and needs the published Jacobs 1990 RMI and >200 cutoff, not a diagnosis of ovarian cancer and not later RMI-2 or RMI-3.\n\nNot a medical device. magent does not diagnose ovarian cancer.\n\nJacobs 1990 RMI (RMI-I) only. Not later RMI-2 or RMI-3.\n\nCaller assigns ultrasound_score (0 if no features, 1 if one of the five findings, 3 if two or more) and postmenopausal (more than one year since final period, or age >50 after hysterectomy). magent does not read ultrasound or date menses.\n\nPublished cutoff is RMI > 200 (exactly 200 does not exceed). magent does not invent probability tiers. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ca125_u_ml","description":"Serum CA125 in U/ml (0-50000). Enters the product unrounded. Jacobs 1990 uses U/ml. magent does not assay CA125.","required":true,"schema":{"type":"number"},"example":50},{"in":"query","name":"ultrasound_score","description":"Caller-assigned Jacobs 1990 ultrasound score: 0 if no features, 1 if one feature, 3 if two or more of multilocular cyst, solid areas, bilateral lesions, ascites, or intra-abdominal metastases. Never 2. magent does not read ultrasound.","required":true,"schema":{"type":"integer","enum":[0,1,3]},"example":3},{"in":"query","name":"postmenopausal","description":"true if postmenopausal (M=3), false if premenopausal (M=1). Jacobs 1990: more than one year since final period, or age >50 after hysterectomy. Caller sets the flag; magent does not date menses.","required":true,"schema":{"type":"boolean"},"example":true}],"summary":"RMI","operationId":"get_api_calc_rmi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, ca125_u_ml, ultrasound_score, postmenopausal, rmi, exceeds_200, citation, disclaimer."},"400":{"description":"invalid_ca125: ca125_u_ml must be a number from 0 to 50000. Returned before settlement; you are not charged.; invalid_ultrasound_score: ultrasound_score must be 0, 1, or 3 (Jacobs 1990; never 2). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_rmi: RMI needs CA125 (U/ml), ultrasound_score 0, 1, or 3, and postmenopausal as used in Jacobs 1990. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rmi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"RMI (bulk)","operationId":"post_api_calc_rmi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ca125: ca125_u_ml must be a number from 0 to 50000. Returned before settlement; you are not charged.; invalid_ultrasound_score: ultrasound_score must be 0, 1, or 3 (Jacobs 1990; never 2). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_rmi: RMI needs CA125 (U/ml), ultrasound_score 0, 1, or 3, and postmenopausal as used in Jacobs 1990. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rmi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ca125_u_ml":"50","postmenopausal":"true","ultrasound_score":"3"},{"ca125_u_ml":"50","postmenopausal":"true","ultrasound_score":"3"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/cha2ds2-va":{"get":{"description":"Compute the ESC 2024 CHA2DS2-VA stroke-risk score from age and discrete clinical flags, without a sex category.\n\nWhen an agent needs the 2024 ESC CHA2DS2-VA total (VASc without sex) and must not invent points from a chart narrative.\n\nNot a medical device and not an anticoagulation order or treatment recommendation.\n\nNot CHA2DS2-VASc. This tool drops the sex category (max 8, not 9) per ESC 2024.\n\nFlags are caller-supplied booleans. magent does not infer CHF, stroke, or vascular disease from text.\n\nDoes not report annual stroke percentages. OAC none / consider / recommended follows ESC 2024 score bands only. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). ≥75 scores 2; 65-74 scores 1.","required":true,"schema":{"type":"integer"},"example":"78"},{"in":"query","name":"chf","description":"Congestive heart failure or LV dysfunction. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypertension","description":"Hypertension history. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"diabetes","description":"Diabetes mellitus. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"stroke_tia","description":"Prior stroke, TIA, or arterial thromboembolism. true or false (2 points).","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"vascular_disease","description":"Prior MI, peripheral artery disease, or aortic plaque. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"CHA2DS2-VA","operationId":"get_api_calc_cha2ds2_va","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, oac, category, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cha2ds2-va"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CHA2DS2-VA (bulk)","operationId":"post_api_calc_cha2ds2_va","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cha2ds2-va"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"78","chf":"false","diabetes":"false","hypertension":"false","stroke_tia":"false","vascular_disease":"false"},{"age":"78","chf":"false","diabetes":"false","hypertension":"false","stroke_tia":"false","vascular_disease":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/abg":{"get":{"description":"Apply the Berend 2014 physiological stepwise assessment: pH acidemia or alkalemia, Table 1 primary metabolic versus respiratory process, anion gap, optional albumin-corrected gap, and printed delta-delta.\n\nWhen an agent has arterial pH, PaCO2, bicarbonate, sodium, and chloride and needs Berend 2014 stepwise labels and numeric intermediates.\n\nNot a medical device and not a diagnosis. magent does not assay arterial blood gas, assign a cause, or replace clinical context.\n\nNot a ventilator setting, oxygen prescription, or bicarbonate dose.\n\nExpected PaCO2 in metabolic acidosis is the Table 1 Winters secondary response (1.5×HCO3+8±2), not a treatment target. Standalone Winters is the related winters tool.\n\nAnion gap uses Na−Cl−HCO3. High versus normal uses Berend's example upper reference of 12 mmol/L; the paper states the laboratory range is analyzer-specific.\n\nAlbumin correction uses Figure 1 (2.5 mmol/L per 1 g/dL decrease). Berend does not print a reference albumin; this tool uses 4.0 g/dL as the decrement baseline and does not reverse-correct hyperalbuminemia.\n\nDelta-delta is returned only when the anion gap is high. Both ketoacidosis (1:1) and lactic (0.6) printed equations are returned; magent does not pick one from lactate.\n\nDoes not compute A-a difference, osmolal gap, or urinary anion gap. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ph","description":"Arterial pH (6.80-7.80). Acidemia if pH<7.38; alkalemia if pH>7.42 (Berend 2014 Table 1).","required":true,"schema":{"type":"number"},"example":7.28},{"in":"query","name":"paco2_mm_hg","description":"Arterial PaCO2 in mm Hg (8-120). Respiratory acidosis if pH<7.38 and PaCO2>42; respiratory alkalosis if pH>7.42 and PaCO2<38.","required":true,"schema":{"type":"number"},"example":39},{"in":"query","name":"bicarbonate_mmol_l","description":"Plasma bicarbonate in mmol/L (2-55). Metabolic acidosis if pH<7.38 and HCO3<22; metabolic alkalosis if pH>7.42 and HCO3>26.","required":true,"schema":{"type":"number"},"example":18},{"in":"query","name":"sodium_mmol_l","description":"Serum sodium in mmol/L (110-160). Used for anion gap Na-Cl-HCO3.","required":true,"schema":{"type":"number"},"example":135},{"in":"query","name":"chloride_mmol_l","description":"Serum chloride in mmol/L (70-130). Used for anion gap Na-Cl-HCO3.","required":true,"schema":{"type":"number"},"example":115},{"in":"query","name":"albumin_g_dl","description":"Serum albumin in g/dL (1-6). When supplied and below 4.0 g/dL, anion gap is increased by 2.5 mmol/L per 1 g/dL decrease (Figure 1). Omitted skips the correction.","required":false,"schema":{"type":"number"},"example":4.0},{"in":"query","name":"lactate_mmol_l","description":"Serum lactate in mmol/L (0-30) when supplied. Echoed only; magent does not pick keto vs lactic delta-delta from lactate. Both printed equations are returned when the anion gap is high.","required":false,"schema":{"type":"number"},"example":2.0}],"summary":"Acid-base assessment (Berend)","operationId":"get_api_calc_abg","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, ph, paco2_mm_hg, bicarbonate_mmol_l, sodium_mmol_l, chloride_mmol_l, anion_gap_mmol_l, anion_gap_class, ph_status, primary_process, disorders, expected_paco2_mm_hg, expected_paco2_low_mm_hg, expected_paco2_high_mm_hg, secondary_response, hco3_change_per_10_mm_hg, respiratory_secondary, albumin_g_dl, albumin_corrected_anion_gap_mmol_l, lactate_mmol_l, delta_ag_mmol_l, delta_hco3_mmol_l, delta_delta_ketoacidosis_mmol_l, delta_delta_lactic_mmol_l, mixed_metabolic_ketoacidosis, mixed_metabolic_lactic, criteria, citation, disclaimer."},"400":{"description":"invalid_abg: ABG acid-base inputs must match Berend 2014 pH, PaCO2, bicarbonate, sodium, chloride, albumin, and lactate as published. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/abg"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Acid-base assessment (Berend) (bulk)","operationId":"post_api_calc_abg","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_abg: ABG acid-base inputs must match Berend 2014 pH, PaCO2, bicarbonate, sodium, chloride, albumin, and lactate as published. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/abg"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bicarbonate_mmol_l":"18","chloride_mmol_l":"115","paco2_mm_hg":"39","ph":"7.28","sodium_mmol_l":"135"},{"bicarbonate_mmol_l":"18","chloride_mmol_l":"115","paco2_mm_hg":"39","ph":"7.28","sodium_mmol_l":"135"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/abic":{"get":{"description":"Compute the Dominguez 2008 ABIC score from age, bilirubin, creatinine, and INR for prognostic stratification of alcoholic hepatitis.\n\nWhen an agent needs the published Dominguez 2008 ABIC arithmetic and must not invent a diagnosis of alcoholic hepatitis or a steroid or transplant order.\n\nNot a medical device. magent does not diagnose alcoholic hepatitis.\n\nNot a steroid or transplant order.\n\nDominguez 2008 ABIC only. This is not Maddrey DF, GAHS, or Lille. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120).","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"bilirubin_mg_dl","description":"Total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l, not both.","required":false,"schema":{"type":"number"},"example":"10"},{"in":"query","name":"bilirubin_umol_l","description":"Total bilirubin in µmol/L (2-684). Converted as mg/dL = µmol/L / 17.1.","required":false,"schema":{"type":"number"},"example":"171"},{"in":"query","name":"creatinine_mg_dl","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l, not both.","required":false,"schema":{"type":"number"},"example":"1"},{"in":"query","name":"creatinine_umol_l","description":"Serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42.","required":false,"schema":{"type":"number"},"example":"88.42"},{"in":"query","name":"inr","description":"International normalized ratio (0.8-10).","required":true,"schema":{"type":"number"},"example":"1.5"}],"summary":"ABIC","operationId":"get_api_calc_abic","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age, bilirubin_mg_dl, creatinine_mg_dl, inr, abic_score, abic_band, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_bilirubin: bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_inr: inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/abic"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ABIC (bulk)","operationId":"post_api_calc_abic","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_bilirubin: bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_inr: inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/abic"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","bilirubin_mg_dl":"10","creatinine_mg_dl":"1","inr":"1.5"},{"age":"50","bilirubin_mg_dl":"10","creatinine_mg_dl":"1","inr":"1.5"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mews":{"get":{"description":"Compute the Subbe 2001 modified Early Warning Score from systolic BP, heart rate, respiratory rate, temperature, and caller-assigned AVPU.\n\nWhen an agent needs the published Subbe 2001 MEWS total and must not substitute NEWS2 or treat the score as an ICU-admission order.\n\nNot a medical device and not an ICU-admission, HDU, or monitoring order. magent does not examine the patient.\n\nThis is Subbe 2001 modified Early Warning Score (Table 1) only. It is not NEWS, NEWS2, or other later early-warning modifications.\n\nAVPU is caller-assigned (alert, voice, pain, or unresponsive). magent does not compute GCS here.\n\nTemperature is in °C as published. magent does not convert Fahrenheit.\n\nscore_ge_5 follows the paper's association of scores of 5 or more with increased risk of death, ICU, or HDU. It is not a NEWS2 band. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"systolic_mm_hg","description":"Systolic blood pressure in mm Hg (integer 0-300). Subbe 2001: ≤70 → 3, 71-80 → 2, 81-100 → 1, 101-199 → 0, ≥200 → 2.","required":true,"schema":{"type":"integer"},"example":"120"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats/min (integer 30-220). Subbe 2001: ≤40 → 2, 41-50 → 1, 51-100 → 0, 101-110 → 1, 111-129 → 2, ≥130 → 3.","required":true,"schema":{"type":"integer"},"example":"80"},{"in":"query","name":"respiratory_rate","description":"Respiratory rate in breaths/min (integer 0-80). Subbe 2001: <9 → 2, 9-14 → 0, 15-20 → 1, 21-29 → 2, ≥30 → 3.","required":true,"schema":{"type":"integer"},"example":"12"},{"in":"query","name":"temperature_c","description":"Temperature in °C (30.0-45.0). Subbe 2001: <35 → 2, 35-38.4 → 0, ≥38.5 → 2. magent does not convert Fahrenheit.","required":true,"schema":{"type":"number"},"example":"37.0"},{"in":"query","name":"avpu","description":"Caller-assigned AVPU (alert, voice, pain, or unresponsive). Subbe 2001: alert → 0, voice → 1, pain → 2, unresponsive → 3. magent does not compute GCS here.","required":true,"schema":{"type":"string","enum":["alert","voice","pain","unresponsive"]},"example":"alert"}],"summary":"MEWS","operationId":"get_api_calc_mews","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, score_ge_5, systolic_mm_hg, heart_rate_bpm, respiratory_rate, temperature_c, avpu, components, citation, disclaimer."},"400":{"description":"invalid_rts_systolic: systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_rts_respiratory_rate: respiratory_rate must be an integer from 0 to 80. Returned before settlement; you are not charged.; invalid_temperature: temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.; invalid_mews_avpu: avpu must be alert, voice, pain, or unresponsive (Subbe 2001). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mews"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"MEWS (bulk)","operationId":"post_api_calc_mews","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rts_systolic: systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_rts_respiratory_rate: respiratory_rate must be an integer from 0 to 80. Returned before settlement; you are not charged.; invalid_temperature: temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.; invalid_mews_avpu: avpu must be alert, voice, pain, or unresponsive (Subbe 2001). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mews"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"avpu":"alert","heart_rate_bpm":"80","respiratory_rate":"12","systolic_mm_hg":"120","temperature_c":"37.0"},{"avpu":"alert","heart_rate_bpm":"80","respiratory_rate":"12","systolic_mm_hg":"120","temperature_c":"37.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mdq":{"get":{"description":"Sum thirteen caller-assigned Hirschfeld 2000 MDQ yes/no lifetime manic/hypomanic items and return the published symptom count (max 13) and that paper's positive-screen rule.\n\nWhen an agent has already assigned the thirteen Hirschfeld 2000 symptom flags plus same-period clustering and moderate/serious problem and needs that paper's score and positive-screen rule, not a bipolar diagnosis and not Hirschfeld 2003 general-population cutoff tweaks.\n\nNot a medical device and not a bipolar diagnosis or treatment order.\n\nmagent does not interview the patient. Each flag is caller-assigned yes/no.\n\nThis is Hirschfeld 2000 MDQ only: thirteen symptom items (yes = 1, max 13) and a positive screen at score ≥7 AND same_period AND moderate_or_serious_problem (that paper: sensitivity 0.73 and specificity 0.90 in a psychiatric outpatient sample). magent does not apply Hirschfeld 2003 general-population cutoff tweaks.\n\nNot PHQ-9, not QIDS, and not MDI. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"felt_hyper","description":"Hirschfeld 2000 MDQ item 1: a period of time not the usual self when felt so good or so hyper that other people thought they were not the normal self, or so hyper that they got into trouble. true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"irritable","description":"Hirschfeld 2000 MDQ item 2: so irritable that they shouted at people or started fights or arguments. true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"more_self_confident","description":"Hirschfeld 2000 MDQ item 3: felt much more self-confident than usual. true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"less_sleep","description":"Hirschfeld 2000 MDQ item 4: got much less sleep than usual and found they didn't really miss it. true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"more_talkative","description":"Hirschfeld 2000 MDQ item 5: much more talkative or spoke much faster than usual. true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"racing_thoughts","description":"Hirschfeld 2000 MDQ item 6: thoughts raced through their head or they couldn't slow their mind down. true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"easily_distracted","description":"Hirschfeld 2000 MDQ item 7: so easily distracted by things around them that they had trouble concentrating or staying on track. true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"more_energy","description":"Hirschfeld 2000 MDQ item 8: much more energy than usual. true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"more_active","description":"Hirschfeld 2000 MDQ item 9: much more active or did many more things than usual. true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"more_social","description":"Hirschfeld 2000 MDQ item 10: much more social or outgoing than usual (for example, telephoned friends in the middle of the night). true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"more_interested_in_sex","description":"Hirschfeld 2000 MDQ item 11: much more interested in sex than usual. true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"unusual_risky","description":"Hirschfeld 2000 MDQ item 12: did things that were unusual for them or that other people might have thought were excessive, foolish, or risky. true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"spending_trouble","description":"Hirschfeld 2000 MDQ item 13: spending money got them or their family into trouble. true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"same_period","description":"Hirschfeld 2000 question 2: several of the endorsed symptom items happened during the same period of time. true or false as assigned by the caller. Required for the published positive-screen rule. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"moderate_or_serious_problem","description":"Hirschfeld 2000 question 3 published positive-screen threshold: the symptoms caused a moderate or serious problem (not no problem or a minor problem). true or false as assigned by the caller. magent does not interpret the four-level item. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"MDQ","operationId":"get_api_calc_mdq","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, same_period, moderate_or_serious_problem, positive_screen, components, citation, disclaimer."},"400":{"description":"invalid_mdq: Mood Disorder Questionnaire inputs must match Hirschfeld 2000 thirteen symptom items and published screening rule from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mdq"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"MDQ (bulk)","operationId":"post_api_calc_mdq","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_mdq: Mood Disorder Questionnaire inputs must match Hirschfeld 2000 thirteen symptom items and published screening rule from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mdq"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"easily_distracted":"false","felt_hyper":"false","irritable":"false","less_sleep":"false","moderate_or_serious_problem":"false","more_active":"false","more_energy":"false","more_interested_in_sex":"false","more_self_confident":"false","more_social":"false","more_talkative":"false","racing_thoughts":"false","same_period":"false","spending_trouble":"false","unusual_risky":"false"},{"easily_distracted":"false","felt_hyper":"false","irritable":"false","less_sleep":"false","moderate_or_serious_problem":"false","more_active":"false","more_energy":"false","more_interested_in_sex":"false","more_self_confident":"false","more_social":"false","more_talkative":"false","racing_thoughts":"false","same_period":"false","spending_trouble":"false","unusual_risky":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/cstat":{"get":{"description":"Compute static respiratory-system compliance in mL/cm H2O as tidal volume divided by plateau pressure minus PEEP, as used in the ARDS Network 2000 methods.\n\nWhen an agent already has measured tidal volume, plateau pressure, and PEEP and must not read a ventilator, invent ARDS severity bands from Cstat, or copy Murray 1988 0–4 compliance points onto this identity.\n\nNot a medical device. Not a ventilator order or ARDS diagnosis. magent does not read the ventilator.\n\nDoes not invent ARDS severity bands from Cstat. Murray 1988 compliance 0–4 points are a different tool (murray).\n\nRejects plateau pressure less than or equal to PEEP (nonpositive driving pressure).\n\nCaller supplies measured VT, Pplat, and PEEP. Does not infer volumes or pressures from mode, flow, or set tidal volume. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"tidal_volume_ml","description":"Expired tidal volume in mL (50-2000, magent clamp). Caller supplies the measured term. magent does not read the ventilator.","required":true,"schema":{"type":"number"},"example":"500"},{"in":"query","name":"pplat_cm_h2o","description":"End-inspiratory plateau pressure in cm H2O (5-80, magent clamp). Must be greater than PEEP. magent does not read the ventilator.","required":true,"schema":{"type":"number"},"example":"20"},{"in":"query","name":"peep_cm_h2o","description":"Positive end-expiratory pressure in cm H2O (0-40, magent clamp). Must be less than plateau pressure. magent does not read the ventilator.","required":true,"schema":{"type":"number"},"example":"5"}],"summary":"Static respiratory-system compliance","operationId":"get_api_calc_cstat","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, tidal_volume_ml, pplat_cm_h2o, peep_cm_h2o, driving_pressure_cm_h2o, cstat_ml_cm_h2o, citation, disclaimer."},"400":{"description":"invalid_cstat: Static compliance needs tidal_volume_ml, pplat_cm_h2o greater than peep_cm_h2o, as used in the ARDS Network 2000 methods. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cstat"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Static respiratory-system compliance (bulk)","operationId":"post_api_calc_cstat","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_cstat: Static compliance needs tidal_volume_ml, pplat_cm_h2o greater than peep_cm_h2o, as used in the ARDS Network 2000 methods. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cstat"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"peep_cm_h2o":"5","pplat_cm_h2o":"20","tidal_volume_ml":"500"},{"peep_cm_h2o":"5","pplat_cm_h2o":"20","tidal_volume_ml":"500"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rope":{"get":{"description":"Compute the Kent 2013 Risk of Paradoxical Embolism (ROPE) index from Table 4 age decades and five caller-assigned vascular and infarct flags.\n\nWhen an agent needs the published Kent 2013 Table 4 ROPE total and must not invent a PFO diagnosis, a closure indication, or a PASCAL classification.\n\nNot a medical device. Not a PFO or cryptogenic-stroke diagnosis.\n\nNot a closure or device-indication order. This is Kent 2013 ROPE, not PASCAL.\n\nThe five vascular and infarct flags are caller-assigned. magent does not read imaging or a smoking history. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Kent 2013 Table 4: 18-29 scores 5; 30-39 scores 4; 40-49 scores 3; 50-59 scores 2; 60-69 scores 1; 70 or older scores 0.","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"no_hypertension","description":"Absence of hypertension (Kent 2013). Caller-assigned. true scores 1; false scores 0.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"no_diabetes","description":"Absence of diabetes (Kent 2013). Caller-assigned. true scores 1; false scores 0.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"no_prior_stroke_tia","description":"Absence of prior stroke or TIA (Kent 2013). Caller-assigned. true scores 1; false scores 0.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"nonsmoker","description":"Nonsmoker (Kent 2013). Caller-assigned. magent does not read a smoking history. true scores 1; false scores 0.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cortical_infarct","description":"Cortical infarct on imaging (Kent 2013). Caller-assigned. magent does not read imaging. true scores 1; false scores 0.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"ROPE","operationId":"get_api_calc_rope","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, rope_stratum, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rope"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ROPE (bulk)","operationId":"post_api_calc_rope","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rope"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"70","cortical_infarct":"false","no_diabetes":"false","no_hypertension":"false","no_prior_stroke_tia":"false","nonsmoker":"false"},{"age":"70","cortical_infarct":"false","no_diabetes":"false","no_hypertension":"false","no_prior_stroke_tia":"false","nonsmoker":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/cedocs":{"get":{"description":"Compute the Weiss 2014 CEDOCS reduced-model score from caller-supplied critical-care patients, longest admitted-patient hours since admission, waiting-room count, ED patients, ED beds, and annual ED visits.\n\nWhen an agent has the published snapshot counts, hours, and annual visits for a community ED and needs the Weiss 2014 reduced-model CEDOCS score, not a diversion or ambulance-bypass order.\n\nNot a medical device. Not a diversion or ambulance-bypass order.\n\nmagent does not count patients, beds, or wait times. Caller supplies the published numeric inputs.\n\nWeiss 2014 reduced model for community EDs. Academic NEDOCS is a different tool.\n\nThe paper's outcome scale is 0-100. magent does not clamp the linear combination, does not double the score onto a 0-200 range, and does not invent 20/60/100 named class bands.\n\nPediatric-only EDs were not this model. Not a diagnosis of crowding-related harm. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"critical_care_patients","description":"Critical-care patients in the ED (integer 0-20). Weiss 2014 reduced-model A. magent does not count patients.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"admit_time_hours","description":"Hours the longest-waiting admitted patient has been in the ED since admission (0-120). Weiss 2014 reduced-model B. Not time since registration. magent does not measure wait times.","required":true,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"waiting_room_patients","description":"Patients in the waiting room (integer 0-200). Weiss 2014 reduced-model C. magent does not count waiting-room patients.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"ed_patients","description":"Total patients in the ED (integer 0-200). Weiss 2014 occupancy numerator (beds plus doubled-up or hallway). magent does not count patients.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"ed_beds","description":"Number of ED beds (integer 1-300). Weiss 2014 occupancy denominator. magent does not count beds.","required":true,"schema":{"type":"integer"},"example":"20"},{"in":"query","name":"ed_visits_per_year","description":"ED visits per year (integer 1000-200000). Weiss 2014 reduced-model E with restricted cubic spline knots at 18811, 43012, 49466, and 67273. The paper's spline worked example uses 46000. magent does not count visits.","required":true,"schema":{"type":"integer"},"example":"46000"}],"summary":"CEDOCS","operationId":"get_api_calc_cedocs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, critical_care_patients, admit_time_hours, waiting_room_patients, ed_patients, ed_beds, ed_visits_per_year, occupancy, cedocs_score, citation, disclaimer."},"400":{"description":"invalid_cedocs: CEDOCS needs Weiss 2014 community ED occupancy, wait, and annual-visit inputs in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cedocs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CEDOCS (bulk)","operationId":"post_api_calc_cedocs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_cedocs: CEDOCS needs Weiss 2014 community ED occupancy, wait, and annual-visit inputs in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cedocs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"admit_time_hours":"0","critical_care_patients":"0","ed_beds":"20","ed_patients":"0","ed_visits_per_year":"46000","waiting_room_patients":"0"},{"admit_time_hours":"0","critical_care_patients":"0","ed_beds":"20","ed_patients":"0","ed_visits_per_year":"46000","waiting_room_patients":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/osiris":{"get":{"description":"Compute the Sedrine 2002 Osteoporosis Index of Risk (OSIRIS) as (-0.2 × age) + (0.2 × weight_kg) + 2 if current HRT/estrogen use + (-2) if prior low-impact fracture, rounded to 1 decimal, then the published low, intermediate, or high band.\n\nWhen an agent has age, weight, current HRT/estrogen use, and prior low-impact fracture history and needs the published Sedrine 2002 OSIRIS index and band, not FRAX, not a DXA order, and not a diagnosis of osteoporosis.\n\nNot a medical device. Not a diagnosis of osteoporosis. magent does not examine the patient.\n\nNot FRAX and not a DXA order. magent returns the Sedrine 2002 OSIRIS index and published band only.\n\nSedrine 2002 derivation was postmenopausal Western European women. That is a limitation, not a race input. magent does not restrict sex or ethnicity at input. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Sedrine 2002 OSIRIS uses age as a whole number of years.","required":true,"schema":{"type":"integer"},"example":"55"},{"in":"query","name":"weight_kg","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"weight_lb","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"schema":{"type":"number"},"example":"154.3236"},{"in":"query","name":"current_hrt","description":"Current HRT/estrogen use (Sedrine 2002). true adds +2; false adds 0. true or false.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"prior_low_impact_fracture","description":"Prior low-impact fracture (Sedrine 2002). true adds -2; false adds 0. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"OSIRIS","operationId":"get_api_calc_osiris","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age, weight_kg, current_hrt, prior_low_impact_fracture, osiris_index, risk, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/osiris"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"OSIRIS (bulk)","operationId":"post_api_calc_osiris","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/osiris"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"55","current_hrt":"true","prior_low_impact_fracture":"false","weight_kg":"70"},{"age":"55","current_hrt":"true","prior_low_impact_fracture":"false","weight_kg":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/hat":{"get":{"description":"Compute the Lou 2008 HAT (Hemorrhage After Thrombolysis) score for symptomatic intracranial hemorrhage after stroke thrombolysis from diabetes or baseline glucose >200 mg/dL, pretreatment NIHSS, and easily visible hypodensity on initial CT.\n\nWhen an agent has caller-assigned diabetes, baseline glucose, NIHSS, and CT hypodensity and needs the published HAT total and collective symptomatic ICH percents, without inventing NIHSS, CT findings, an equals-1/3 hypodensity band, or unofficial percents.\n\nNot a medical device and not a tPA withhold, thrombolysis, or treatment decision.\n\nDerived in intravenous thrombolysis (Lou 2008). It is not a recommendation for or against alteplase.\n\nThe caller assigns diabetes mellitus, baseline glucose, NIHSS (0-42), and easily visible hypodensity on initial CT. magent does not examine the patient, assign NIHSS, or read CT.\n\nHistory of diabetes mellitus OR baseline glucose >200 mg/dL scores 1 (not additive if both). 200.0 mg/dL does not score; 201 does. Glucose is scored in mg/dL; mmol/L converts as mg/dL = mmol/L × 18.\n\nPretreatment NIHSS <15 scores 0; 15-20 scores 1; >20 scores 2.\n\nHypodensity is none (0), less_than_third (<1/3 MCA, 1), or greater_than_third (>1/3 MCA, 2). There is no published equals-1/3 category.\n\nCollective symptomatic ICH percents are 2% (0), 5% (1), 10% (2), 15% (3), 44% (>3). Scores 4 and 5 both return 44. magent does not invent other percents. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"diabetes","description":"History of diabetes mellitus (Lou 2008). true scores 1 on the diabetes-or-glucose item; not additive with glucose >200 mg/dL.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"glucose_mmol_l","description":"Baseline glucose in mmol/L (2.8-55.5). Provide this or glucose_mg_dl, not both. Converted as mg/dL = mmol/L × 18. Scores 1 on the diabetes-or-glucose item if >200 mg/dL after conversion (200.0 does not).","required":false,"schema":{"type":"number"},"example":"6.0"},{"in":"query","name":"glucose_mg_dl","description":"Baseline glucose in mg/dL (50-1000). Provide this or glucose_mmol_l, not both. >200 scores 1 on the diabetes-or-glucose item if diabetes is false; 200.0 does not (Lou 2008).","required":false,"schema":{"type":"number"},"example":"108"},{"in":"query","name":"nihss","description":"Caller-assigned pretreatment NIH Stroke Scale total (integer 0-42). <15 scores 0; 15-20 scores 1; >20 scores 2 (Lou 2008). magent does not compute NIHSS or examine the patient.","required":true,"schema":{"type":"integer"},"example":"10"},{"in":"query","name":"hypodensity","description":"Easily visible hypodensity on initial CT as assigned by the caller (Lou 2008). none scores 0; less_than_third (<1/3 MCA) scores 1; greater_than_third (>1/3 MCA) scores 2. No published equals-1/3 category. magent does not read the CT.","required":true,"schema":{"type":"string","enum":["none","less_than_third","greater_than_third"]},"example":"none"}],"summary":"HAT","operationId":"get_api_calc_hat","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, sich_percent, diabetes, glucose_mg_dl, nihss, hypodensity, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_nihss: nihss must be an integer from 0 to 42. Returned before settlement; you are not charged.; invalid_hat_hypodensity: hypodensity must be none, less_than_third, or greater_than_third (Lou 2008). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hat"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HAT (bulk)","operationId":"post_api_calc_hat","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_nihss: nihss must be an integer from 0 to 42. Returned before settlement; you are not charged.; invalid_hat_hypodensity: hypodensity must be none, less_than_third, or greater_than_third (Lou 2008). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hat"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"diabetes":"false","glucose_mmol_l":"6.0","hypodensity":"none","nihss":"10"},{"diabetes":"false","glucose_mmol_l":"6.0","hypodensity":"none","nihss":"10"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pfib-c":{"get":{"description":"Compute the Lefere 2025 pFIB-c logistic probability of significant (≥F2) liver fibrosis in pediatric MASLD from sex, hypertension, ALT, a caller-assigned weight Z-score, HOMA-IR, and caller-assigned Black ethnicity.\n\nWhen an agent already has pediatric MASLD sex (boy or girl), hypertension, ALT in U/L, a caller-assigned CDC or WHO weight Z-score, HOMA-IR, and caller-assigned Black ethnicity as Lefere 2025 used the term, and needs the published Table 2 probability and derivation-cohort rule-out cutoff 0.226, not pFIB-6, FIB-4, APRI, or the NAFLD fibrosis score.\n\nNot a medical device and not a diagnosis. Not a liver-biopsy substitute or a treatment order.\n\nblack_ethnicity is caller-assigned Black ethnicity as used in Lefere 2025. magent does not assign race or ethnicity.\n\nweight_z_score is a caller-assigned CDC or WHO weight-for-age Z-score. magent does not compute LMS tables from height, weight, age, or sex.\n\nHOMA-IR is caller-assigned. magent does not compute HOMA-IR from glucose and insulin.\n\nThe 0.226 cutoff is the Lefere 2025 derivation-cohort rule-out for significant (≥F2) fibrosis (high NPV). magent does not invent other probability bands. This is pFIB-c only, not the ordinal pFIB-6 score. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sex","description":"Sex as Lefere 2025 Table 2 (boy or girl). boy adds 1.194 (sex_boy=1); girl adds 0. Paper terms.","required":true,"schema":{"type":"string","enum":["boy","girl"]},"example":"girl"},{"in":"query","name":"hypertension","description":"Hypertension as assigned by the caller (true or false). Lefere 2025 Table 2: true adds 1.636.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"alt_u_l","description":"Alanine aminotransferase in U/L (5-500). Lefere 2025 Table 2: +0.019 per U/L. magent does not convert other ALT units.","required":true,"schema":{"type":"number"},"example":30},{"in":"query","name":"weight_z_score","description":"Caller-assigned CDC or WHO weight-for-age Z-score (-5 to 8). Lefere 2025 Table 2: +0.633 per unit. magent does not compute LMS tables from height, weight, age, or sex.","required":true,"schema":{"type":"number"},"example":1.0},{"in":"query","name":"homa_ir","description":"Caller-assigned HOMA-IR (0-50). Lefere 2025 Table 2: +0.079 per unit. magent does not compute HOMA-IR from glucose and insulin.","required":true,"schema":{"type":"number"},"example":2.0},{"in":"query","name":"black_ethnicity","description":"Caller-assigned Black ethnicity as used in Lefere 2025 (true or false). Table 2: true adds -2.453. magent does not assign race or ethnicity.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"pFIB-c","operationId":"get_api_calc_pfib_c","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, sex, hypertension, alt_u_l, weight_z_score, homa_ir, black_ethnicity, x, probability, below_rule_out_cutoff, citation, disclaimer."},"400":{"description":"invalid_pfib_c: pFIB-c inputs must match Lefere 2025 sex, caller-assigned Black ethnicity, hypertension, ALT, caller-assigned weight Z-score, and HOMA-IR. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pfib-c"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"pFIB-c (bulk)","operationId":"post_api_calc_pfib_c","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pfib_c: pFIB-c inputs must match Lefere 2025 sex, caller-assigned Black ethnicity, hypertension, ALT, caller-assigned weight Z-score, and HOMA-IR. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pfib-c"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"alt_u_l":"30","black_ethnicity":"false","homa_ir":"2.0","hypertension":"false","sex":"girl","weight_z_score":"1.0"},{"alt_u_l":"30","black_ethnicity":"false","homa_ir":"2.0","hypertension":"false","sex":"girl","weight_z_score":"1.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/capd":{"get":{"description":"Sum eight caller-assigned Traube 2014 CAPD integers (0-4; eye_contact, purposeful_actions, awareness, and communication reverse-scored in that paper so never contributes 4) and return the 0-32 total and whether it meets this paper's screen-positive cut point (score ≥9).\n\nWhen an agent has already assigned Traube 2014 CAPD 0-4 integers for all eight items (after that paper's reverse key for eye contact, purposeful actions, awareness, and communication) and needs the published total and ≥9 screen, not a psychiatric diagnosis or CAM-ICU.\n\nNot a medical device and not a psychiatric diagnosis.\n\nmagent does not examine the child. Each of the eight items is a caller-assigned integer 0-4 from Traube 2014 (never/rarely/sometimes/often/always after that paper's reverse key). magent does not interpret the items.\n\nThis is Traube 2014 CAPD only. Items eye_contact, purposeful_actions, awareness, and communication (items 1-4) are reverse-scored in that paper so never contributes 4 and always contributes 0; the caller assigns the published 0-4 after that reverse key. Total 0-32.\n\nTraube 2014 published a screen-positive cut point of ≥9 (screen_positive is true iff score ≥9). magent does not invent additional developmental-delay cutoffs and does not treat a score as a psychiatric diagnosis. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"eye_contact","description":"Caller-assigned Traube 2014 CAPD item 1 (integer 0-4). Reverse-scored in that paper: does the child make eye contact with the caregiver. 0 is always (never-delirium pole after reverse scoring); 4 is never (never contributes 4). magent does not examine the child.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"purposeful_actions","description":"Caller-assigned Traube 2014 CAPD item 2 (integer 0-4). Reverse-scored in that paper: are the child's actions purposeful. 0 is always (never-delirium pole after reverse scoring); 4 is never (never contributes 4). magent does not examine the child.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"awareness","description":"Caller-assigned Traube 2014 CAPD item 3 (integer 0-4). Reverse-scored in that paper: is the child aware of his/her surroundings. 0 is always (never-delirium pole after reverse scoring); 4 is never (never contributes 4). magent does not examine the child.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"communication","description":"Caller-assigned Traube 2014 CAPD item 4 (integer 0-4). Reverse-scored in that paper: does the child communicate needs and wants. 0 is always (never-delirium pole after reverse scoring); 4 is never (never contributes 4). magent does not examine the child.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"restless","description":"Caller-assigned Traube 2014 CAPD item 5 (integer 0-4): is the child restless. Adds as published (0 never, never-delirium pole, through 4 always). magent does not examine the child.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"inconsolable","description":"Caller-assigned Traube 2014 CAPD item 6 (integer 0-4): is the child inconsolable. Adds as published (0 never, never-delirium pole, through 4 always). magent does not examine the child.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"underactive","description":"Caller-assigned Traube 2014 CAPD item 7 (integer 0-4): is the child underactive — very little movement while awake. Adds as published (0 never, never-delirium pole, through 4 always). magent does not examine the child.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"delayed_response","description":"Caller-assigned Traube 2014 CAPD item 8 (integer 0-4): does it take the child a long time to respond to interactions. Adds as published (0 never, never-delirium pole, through 4 always). magent does not examine the child.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"CAPD","operationId":"get_api_calc_capd","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, screen_positive, components, citation, disclaimer."},"400":{"description":"invalid_capd: CAPD inputs must be the eight caller-assigned 0-4 Cornell items from Traube 2014. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/capd"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CAPD (bulk)","operationId":"post_api_calc_capd","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_capd: CAPD inputs must be the eight caller-assigned 0-4 Cornell items from Traube 2014. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/capd"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"awareness":"0","communication":"0","delayed_response":"0","eye_contact":"0","inconsolable":"0","purposeful_actions":"0","restless":"0","underactive":"0"},{"awareness":"0","communication":"0","delayed_response":"0","eye_contact":"0","inconsolable":"0","purposeful_actions":"0","restless":"0","underactive":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/epds":{"get":{"description":"Sum ten caller-assigned Cox 1987 EPDS integers (0-3 over the past 7 days; laugh, enjoyment, and anxious reverse-scored in that paper so 0 is the least symptomatic published pole) and return the 0-30 total and whether it meets this paper's 12/13 threshold (score ≥13).\n\nWhen an agent has already assigned Cox 1987 EPDS 0-3 integers for all ten items (after that paper's reverse key for items 1, 2, and 4) and needs the published total and 12/13 threshold, not a depression interview, PHQ-9, QIDS, or MDI.\n\nNot a medical device and not a depression diagnosis or treatment order.\n\nmagent does not administer a depression interview. Each of the ten items is a caller-assigned integer 0-3 (0 least symptomatic published pole through 3 most, past 7 days). magent does not interpret the items.\n\nThis is Cox 1987 EPDS only. Items laugh, enjoyment, and anxious (items 1, 2, and 4) are reverse-scored in that paper; the caller assigns the published 0-3 after that reverse key. Total 0-30. magent does not score PHQ-9, QIDS, or MDI.\n\nCox 1987 published a threshold of 12/13 (at_or_above_cutoff is true iff score ≥13). magent does not apply later ≥10 community cuts or a cut of score >13 only, and it does not treat a score as a depression diagnosis. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"laugh","description":"Caller-assigned Cox 1987 EPDS item 1 (integer 0-3). Reverse-scored in that paper: ability to laugh and see the funny side of things over the past 7 days. 0 is the least symptomatic published pole after reverse scoring; 3 is the most. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"enjoyment","description":"Caller-assigned Cox 1987 EPDS item 2 (integer 0-3). Reverse-scored in that paper: looking forward with enjoyment to things over the past 7 days. 0 is the least symptomatic published pole after reverse scoring; 3 is the most. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"self_blame","description":"Caller-assigned Cox 1987 EPDS item 3 (integer 0-3): blamed self unnecessarily when things went wrong over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"anxious","description":"Caller-assigned Cox 1987 EPDS item 4 (integer 0-3). Reverse-scored in that paper: anxious or worried for no good reason over the past 7 days. 0 is the least symptomatic published pole after reverse scoring; 3 is the most. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"scared","description":"Caller-assigned Cox 1987 EPDS item 5 (integer 0-3): scared or panicky for no very good reason over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"coping","description":"Caller-assigned Cox 1987 EPDS item 6 (integer 0-3): things getting on top of the respondent over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"sleep","description":"Caller-assigned Cox 1987 EPDS item 7 (integer 0-3): unhappiness with difficulty sleeping over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"sad","description":"Caller-assigned Cox 1987 EPDS item 8 (integer 0-3): felt sad or miserable over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"crying","description":"Caller-assigned Cox 1987 EPDS item 9 (integer 0-3): crying from unhappiness over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"self_harm","description":"Caller-assigned Cox 1987 EPDS item 10 (integer 0-3): thoughts of harming oneself over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"EPDS","operationId":"get_api_calc_epds","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, at_or_above_cutoff, components, citation, disclaimer."},"400":{"description":"invalid_epds: Each Edinburgh Postnatal Depression Scale item must be an integer in the Cox 1987 published 0-3 range. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/epds"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"EPDS (bulk)","operationId":"post_api_calc_epds","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_epds: Each Edinburgh Postnatal Depression Scale item must be an integer in the Cox 1987 published 0-3 range. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/epds"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"anxious":"0","coping":"0","crying":"0","enjoyment":"0","laugh":"0","sad":"0","scared":"0","self_blame":"0","self_harm":"0","sleep":"0"},{"anxious":"0","coping":"0","crying":"0","enjoyment":"0","laugh":"0","sad":"0","scared":"0","self_blame":"0","self_harm":"0","sleep":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/aua-si":{"get":{"description":"Sum seven caller-assigned Barry 1992 AUA-SI items (each integer 0-5) and return the published 0-35 total. Does not apply later total-score severity bands and does not score the IPSS quality-of-life item.\n\nWhen an agent already has Barry 1992 0-5 integers for the seven AUA-SI items and needs the published total. magent does not take a voiding history, diagnose BPH, order treatment, or apply later 0-7/8-19/20-35 cuts.\n\nNot a medical device and not a BPH treatment order.\n\nEach of the seven items is a caller-assigned integer 0-5. magent does not take a voiding history.\n\nThis is Barry 1992 AUA-SI only (seven items; max 35). magent does not score the later IPSS 8th quality-of-life item.\n\nBarry 1992 published no total-score severity bands. This tool returns score and max_score only. It does not apply later AUA-guideline 0-7/8-19/20-35 mild/moderate/severe cuts. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"incomplete_emptying","description":"Caller-assigned Barry 1992 incomplete emptying (integer 0-5: 0 not at all, 1 less than 1 time in 5, 2 less than half the time, 3 about half the time, 4 more than half the time, 5 almost always): sensation of not emptying the bladder completely after finishing urination. magent does not take a voiding history.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"frequency","description":"Caller-assigned Barry 1992 frequency (integer 0-5: 0 not at all to 5 almost always): urinating again less than two hours after finishing. magent does not take a voiding history.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"intermittency","description":"Caller-assigned Barry 1992 intermittency (integer 0-5: 0 not at all to 5 almost always): stopping and starting again several times when urinating. magent does not take a voiding history.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"urgency","description":"Caller-assigned Barry 1992 urgency (integer 0-5: 0 not at all to 5 almost always): difficulty postponing urination. magent does not take a voiding history.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"weak_stream","description":"Caller-assigned Barry 1992 weak urinary stream (integer 0-5: 0 not at all to 5 almost always). magent does not take a voiding history.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"straining","description":"Caller-assigned Barry 1992 hesitancy/straining (integer 0-5: 0 not at all to 5 almost always): push or strain to begin urination. magent does not take a voiding history.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"nocturia","description":"Caller-assigned Barry 1992 nocturia (integer 0-5: 0 none, 1 one time, 2 two times, 3 three times, 4 four times, 5 five or more times): times typically getting up to urinate from bedtime until morning. magent does not take a voiding history.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"AUA-SI","operationId":"get_api_calc_aua_si","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_aua_si: AUA symptom index items must be integers in the Barry 1992 published 0-5 range. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/aua-si"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"AUA-SI (bulk)","operationId":"post_api_calc_aua_si","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_aua_si: AUA symptom index items must be integers in the Barry 1992 published 0-5 range. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/aua-si"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"frequency":"0","incomplete_emptying":"0","intermittency":"0","nocturia":"0","straining":"0","urgency":"0","weak_stream":"0"},{"frequency":"0","incomplete_emptying":"0","intermittency":"0","nocturia":"0","straining":"0","urgency":"0","weak_stream":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/painad":{"get":{"description":"Sum five caller-assigned Warden 2003 PAINAD integers (0-2) and return the published total (max 10).\n\nWhen an agent has already assigned Warden 2003 0-2 integers for breathing, negative vocalization, facial expression, body language, and consolability and needs the published total, not a pain diagnosis, analgesic order, or later intensity cutoff.\n\nNot a medical device and not a pain diagnosis or analgesic order.\n\nEach of the five items is a caller-assigned integer 0, 1, or 2 from Warden 2003. magent does not observe the patient.\n\nTotal is 0-10. magent does not add intensity cutoffs that are not in Warden 2003. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"breathing","description":"Caller-assigned Warden 2003 PAINAD breathing independent of vocalization (integer 0-2): 0 normal; 1 occasional labored breathing or short period of hyperventilation; 2 noisy labored breathing, long period of hyperventilation, or Cheyne-Stokes respirations. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"negative_vocalization","description":"Caller-assigned Warden 2003 PAINAD negative vocalization (integer 0-2): 0 none; 1 occasional moan or groan, or low-level speech with a negative or disapproving quality; 2 repeated troubled calling out, loud moaning or groaning, or crying. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"facial_expression","description":"Caller-assigned Warden 2003 PAINAD facial expression (integer 0-2): 0 smiling or inexpressive; 1 sad, frightened, or frown; 2 facial grimacing. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"body_language","description":"Caller-assigned Warden 2003 PAINAD body language (integer 0-2): 0 relaxed; 1 tense, distressed pacing, or fidgeting; 2 rigid, fists clenched, knees pulled up, pulling or pushing away, or striking out. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"consolability","description":"Caller-assigned Warden 2003 PAINAD consolability (integer 0-2): 0 no need to console; 1 distracted or reassured by voice or touch; 2 unable to console, distract, or reassure. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"PAINAD","operationId":"get_api_calc_painad","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_painad: each PAINAD item must be an integer 0, 1, or 2 (Warden 2003). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/painad"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PAINAD (bulk)","operationId":"post_api_calc_painad","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_painad: each PAINAD item must be an integer 0, 1, or 2 (Warden 2003). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/painad"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"body_language":"0","breathing":"0","consolability":"0","facial_expression":"0","negative_vocalization":"0"},{"body_language":"0","breathing":"0","consolability":"0","facial_expression":"0","negative_vocalization":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pucai":{"get":{"description":"Sum six caller-assigned Turner 2007 PUCAI item points and return the published total (max 85) with activity band.\n\nWhen an agent has already assigned Turner 2007 published point values for the six PUCAI items and needs the total and published activity band, not a diagnosis, adult Mayo score, or treatment order.\n\nNot a medical device and not a diagnosis of ulcerative colitis or a treatment order.\n\nEach of the six items is a caller-assigned published point value from Turner 2007. magent does not examine the child.\n\nPediatric ulcerative colitis activity index (PUCAI). No age parameter. Not the adult Mayo score or UCDAI.\n\nActivity bands follow Turner 2007: <10 remission, 10-34 mild (10 and 34 are mild), 35-64 moderate (35 and 64 are moderate), ≥65 severe (65 is severe). magent does not add unofficial adult cutoffs. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"abdominal_pain","description":"Caller-assigned Turner 2007 PUCAI abdominal pain points (integer 0, 5, or 10): 0 no pain; 5 pain can be ignored; 10 pain cannot be ignored. magent does not examine the child.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"rectal_bleeding","description":"Caller-assigned Turner 2007 PUCAI rectal bleeding points (integer 0, 10, 20, or 30): 0 none; 10 small amount only, in less than 50% of stools; 20 small amount with most stools; 30 large amount (>50% of the stool content). magent does not examine the child.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"stool_consistency_of_most","description":"Caller-assigned Turner 2007 PUCAI stool consistency of most stools points (integer 0, 5, or 10): 0 formed; 5 partially formed; 10 completely unformed. magent does not examine the child.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"stools_per_24h","description":"Caller-assigned Turner 2007 PUCAI number of stools per 24 hours points (integer 0, 5, 10, or 15): 0 for 0-2 stools; 5 for 3-5; 10 for 6-8; 15 for >8. magent does not examine the child.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"nocturnal_stools","description":"Caller-assigned Turner 2007 PUCAI nocturnal stools points (integer 0 or 10): 0 no; 10 yes (any episode causing wakening). magent does not examine the child.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"activity_level","description":"Caller-assigned Turner 2007 PUCAI activity level points (integer 0, 5, or 10): 0 no limitation of activity; 5 occasional limitation of activity; 10 severe restricted activity. magent does not examine the child.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"PUCAI","operationId":"get_api_calc_pucai","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, activity_band, abdominal_pain, rectal_bleeding, stool_consistency_of_most, stools_per_24h, nocturnal_stools, activity_level, components, citation, disclaimer."},"400":{"description":"invalid_pucai: each PUCAI item must be a published point value from Turner 2007. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pucai"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PUCAI (bulk)","operationId":"post_api_calc_pucai","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pucai: each PUCAI item must be a published point value from Turner 2007. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pucai"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"abdominal_pain":"0","activity_level":"0","nocturnal_stools":"0","rectal_bleeding":"0","stool_consistency_of_most":"0","stools_per_24h":"0"},{"abdominal_pain":"0","activity_level":"0","nocturnal_stools":"0","rectal_bleeding":"0","stool_consistency_of_most":"0","stools_per_24h":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ottawa-knee":{"get":{"description":"Apply the Stiell 1995 Ottawa knee rule and return whether a knee x-ray series is indicated from age and caller-assigned bone tenderness, flexion, and weight-bearing findings.\n\nWhen an agent has caller-assigned findings after blunt knee injury and needs the published knee-series radiography rule, not the Ottawa ankle or Pittsburgh knee rule.\n\nNot a diagnosis of fracture. magent does not examine the knee.\n\nThis tool is the Ottawa knee rule only. It is not the Ottawa ankle or foot rule and not the Pittsburgh knee rule.\n\nIsolated patellar tenderness is caller-applied. magent does not infer isolation from other flags.\n\nInability to bear weight means both immediately after injury and in the emergency department (four steps). One alone is not enough.\n\nAdult derivation as published (age 18-120). Age 55 or older meets the age criterion; 54 does not. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Age ≥55 meets this criterion; 54 does not.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"fibular_head_tenderness","description":"Bone tenderness at the head of the fibula. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"isolated_patellar_tenderness","description":"Isolated patellar tenderness as assigned by the caller. true or false. magent does not infer isolation from other flags.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"flexion_less_than_90","description":"Inability to flex the knee to 90 degrees. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"unable_to_bear_weight_immediately","description":"Unable to bear weight immediately after injury (four steps). true or false. Counts only when also unable in the emergency department.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"unable_to_bear_weight_in_ed","description":"Unable to bear weight in the emergency department (four steps). true or false. Counts only when also unable immediately after injury.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Ottawa knee rule","operationId":"get_api_calc_ottawa_knee","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, xray_indicated, age_years, criteria, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ottawa-knee"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Ottawa knee rule (bulk)","operationId":"post_api_calc_ottawa_knee","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ottawa-knee"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","fibular_head_tenderness":"false","flexion_less_than_90":"false","isolated_patellar_tenderness":"false","unable_to_bear_weight_immediately":"false","unable_to_bear_weight_in_ed":"false"},{"age":"40","fibular_head_tenderness":"false","flexion_less_than_90":"false","isolated_patellar_tenderness":"false","unable_to_bear_weight_immediately":"false","unable_to_bear_weight_in_ed":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/utah-covid":{"get":{"description":"Sum the Webb 2022 Table 6 simplified clinical prediction score from the printed age-decade lookup, caller-assigned community of color, and comorbidity and dyspnea flags, and return whether the total is at or above the Table 7 Youden threshold of 6.\n\nWhen an agent already has age, sex, caller-assigned community of color, dyspnea, and the Table 6 comorbidity flags and needs the published point total for 14-day hospitalization and 28-day mortality risk stratification, not a treatment-allocation order.\n\nNot a medical device.\n\nNot a diagnosis or treatment-allocation order. magent does not prescribe therapy or decide hospitalization. Table 7 Youden ≥6 is a published discrimination threshold, not later Utah Crisis Standards of Care allocation cutoffs.\n\ncommunity_of_color is caller-assigned from the paper's community of color / non-white race or Hispanic/Latinx ethnicity. magent does not assign race or ethnicity.\n\nDerivation used consecutive adults with positive SARS-CoV-2 PCR in ambulatory and emergency settings (mean age 40). Table 6 still prints 0-10 and 11-20 decades; magent encodes that lookup and does not examine the patient.\n\nObesity is the Methods BMI ≥30 flag (Table 6 label BMI>30). Severe immunocompromise follows Table 6 footnote 2; Methods also list additional immunosuppressive therapies. magent does not adjudicate those diagnoses. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in whole years (0-120). Webb 2022 Table 6 decade lookup: 0-10=0.5, 11-20=1, 21-30=1.5, 31-40=2, 41-50=2.5, 51-60=3, 61-70=3.5, 71-80=4, 81-90=4.5, 91-100=5, >100=5.5. Not floor(age/10)×0.5.","required":true,"schema":{"type":"integer"},"example":35},{"in":"query","name":"sex","description":"Sex as recorded. Male scores 1 (Webb 2022 Table 6). female or male.","required":true,"schema":{"type":"string"},"example":"female"},{"in":"query","name":"community_of_color","description":"Caller-assigned: the paper's community of color (self-identifies as non-white race or Hispanic/Latinx ethnicity). 2 points if true. magent does not assign race or ethnicity. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"diabetes","description":"Diabetes mellitus (Webb 2022 Table 6 high-risk comorbidity). 2 points if true. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"severe_immunocompromise","description":"Severe immunocompromise as Table 6 footnote 2: solid organ or bone marrow transplant, AIDS, active chemotherapy, or inherited immunodeficiency. 2 points if true. Caller-assigned; magent does not adjudicate. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"obesity","description":"Obesity as BMI ≥30 kg/m² (Webb 2022 Methods; Table 6 label BMI>30). 2 points if true. Caller-assigned true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"dyspnea","description":"Dyspnea at the time of testing (Webb 2022 Table 6 symptom). 1 point if true. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"hypertension","description":"Hypertension (Webb 2022 Table 6). 1 point if true. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"coronary_artery_disease","description":"Coronary artery disease (Webb 2022 Table 6). 1 point if true. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"cardiac_arrhythmia","description":"Cardiac arrhythmia (Webb 2022 Table 6). 1 point if true. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"congestive_heart_failure","description":"Congestive heart failure (Webb 2022 Table 6). 1 point if true. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"chronic_kidney_disease","description":"Chronic kidney disease (Webb 2022 Table 6). 1 point if true. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"chronic_pulmonary_disease","description":"Chronic pulmonary disease (Webb 2022 Table 6). 1 point if true. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"chronic_liver_disease","description":"Chronic liver disease (Webb 2022 Table 6). 1 point if true. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"cerebrovascular_disease","description":"Cerebrovascular disease (Webb 2022 Table 6). 1 point if true. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"chronic_neurologic_disease","description":"Chronic neurologic disease (Webb 2022 Table 6). 1 point if true. true or false.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"Utah COVID score","operationId":"get_api_calc_utah_covid","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, cutpoint, score_ge_6, age, sex, components, citation, disclaimer."},"400":{"description":"invalid_utah_covid: Utah COVID score inputs must match Webb 2022 Table 6 age, sex, caller-assigned community of color, dyspnea, and comorbidity flags. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/utah-covid"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Utah COVID score (bulk)","operationId":"post_api_calc_utah_covid","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_utah_covid: Utah COVID score inputs must match Webb 2022 Table 6 age, sex, caller-assigned community of color, dyspnea, and comorbidity flags. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/utah-covid"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"35","cardiac_arrhythmia":"false","cerebrovascular_disease":"false","chronic_kidney_disease":"false","chronic_liver_disease":"false","chronic_neurologic_disease":"false","chronic_pulmonary_disease":"false","community_of_color":"false","congestive_heart_failure":"false","coronary_artery_disease":"false","diabetes":"false","dyspnea":"false","hypertension":"false","obesity":"false","severe_immunocompromise":"false","sex":"female"},{"age":"35","cardiac_arrhythmia":"false","cerebrovascular_disease":"false","chronic_kidney_disease":"false","chronic_liver_disease":"false","chronic_neurologic_disease":"false","chronic_pulmonary_disease":"false","community_of_color":"false","congestive_heart_failure":"false","coronary_artery_disease":"false","diabetes":"false","dyspnea":"false","hypertension":"false","obesity":"false","severe_immunocompromise":"false","sex":"female"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/asrs":{"get":{"description":"Count Kessler 2005 clinically significant ASRS v1.1 Part A items (six caller-assigned 0-4 frequencies) and return whether four or more are in the published range.\n\nWhen an agent has already assigned Kessler 2005 0-4 integers for each of the six ASRS v1.1 Part A items and needs the published 4-of-6 screen, not an ADHD diagnosis or the 18-item ASRS.\n\nNot a medical device and not an ADHD diagnosis or treatment order.\n\nEach of the six Part A items is a caller-assigned integer 0-4 (0 never, 1 rarely, 2 sometimes, 3 often, 4 very often). magent does not interpret the items and does not interview the patient.\n\nThis is Kessler 2005 ASRS v1.1 6-item screener (Part A) only. magent does not score the 18-item ASRS or later 0-24 sum cutoffs.\n\nwrap_up, organization, and remembering are clinically significant at sometimes or more (≥2). avoid_delay, fidget, and motor are clinically significant at often or more (≥3) (Kessler 2005 Table 1 footnotes). Screen-positive at ≥4 of 6 (Table 4 highest stratum). It is a screen, not a diagnosis. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"wrap_up","description":"Caller-assigned Kessler 2005 ASRS v1.1 Part A item 1 (integer 0-4): how often do you have trouble wrapping up the fine details of a project, once the challenging parts have been done? (0 never, 1 rarely, 2 sometimes, 3 often, 4 very often). Clinically significant at sometimes or more. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"organization","description":"Caller-assigned Kessler 2005 ASRS v1.1 Part A item 2 (integer 0-4): how often do you have difficulty getting things in order when you have to do a task that requires organization? Clinically significant at sometimes or more. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"remembering","description":"Caller-assigned Kessler 2005 ASRS v1.1 Part A item 3 (integer 0-4): how often do you have problems remembering appointments or obligations? Clinically significant at sometimes or more. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"avoid_delay","description":"Caller-assigned Kessler 2005 ASRS v1.1 Part A item 4 (integer 0-4): when you have a task that requires a lot of thought, how often do you avoid or delay getting started? Clinically significant at often or more. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"fidget","description":"Caller-assigned Kessler 2005 ASRS v1.1 Part A item 5 (integer 0-4): how often do you fidget or squirm with your hands or your feet when you have to sit down for a long time? Clinically significant at often or more. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"motor","description":"Caller-assigned Kessler 2005 ASRS v1.1 Part A item 6 (integer 0-4): how often do you feel overly active and compelled to do things, like you were driven by a motor? Clinically significant at often or more. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"ASRS","operationId":"get_api_calc_asrs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, screen_positive, components, citation, disclaimer."},"400":{"description":"invalid_asrs: Each ASRS v1.1 Part A item must be an integer 0–4 (Kessler 2005 never to very often). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/asrs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ASRS (bulk)","operationId":"post_api_calc_asrs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_asrs: Each ASRS v1.1 Part A item must be an integer 0–4 (Kessler 2005 never to very often). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/asrs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"avoid_delay":"0","fidget":"0","motor":"0","organization":"0","remembering":"0","wrap_up":"0"},{"avoid_delay":"0","fidget":"0","motor":"0","organization":"0","remembering":"0","wrap_up":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ascvd-pce":{"get":{"description":"Compute the Goff 2013 pooled-cohort 10-year hard ASCVD percent (first hard CHD or stroke) for adults aged 40-79 from Table A sex- and cohort-specific coefficients.\n\nWhen an agent already has those Goff 2013 predictors for a person aged 40-79 without prior ASCVD and needs that paper's 10-year hard ASCVD percent. Caller assigns cohort as white or african_american. Not a diagnosis, statin order, PREVENT 2024, Framingham CHD, or SCORE2.\n\nNot a medical device. Not a diagnosis of cardiovascular disease. Not a statin order, antihypertensive order, or treatment recommendation.\n\n10-year hard ASCVD (first hard CHD or stroke) only. Age 40-79. Not PREVENT 2024. Not Framingham CHD. Not SCORE2.\n\ncohort is caller-assigned as white or african_american using the paper's terms. magent does not assign race or ethnicity. Recommendation 2 (use the White equations for other groups) is not applied as a silent swap; other cohort strings are rejected.\n\nTreated versus untreated systolic BP uses the matching Table A coefficient. Caller assigns age, sex, cohort, lipids, blood pressure, antihypertensive, smoking, and diabetes. magent does not assay lipids and does not measure blood pressure. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 40-79). Goff 2013 Table A 10-year hard ASCVD is for ages 40-79. magent does not take a date of birth.","required":true,"schema":{"type":"integer"},"example":55},{"in":"query","name":"sex","description":"Sex used by the sex-specific Table A coefficients (female or male). Not cohort.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"cohort","description":"Caller-assigned cohort as used in Goff 2013 Table A: white or african_american (paper terms). Not param race. magent does not assign race or ethnicity. Recommendation 2 (use the White equations for other groups) is not applied as a silent swap; other strings are rejected.","required":true,"schema":{"type":"string","enum":["white","african_american"]},"example":"white"},{"in":"query","name":"total_cholesterol_mg_dl","description":"Total cholesterol in mg/dL (50-800). Enters as ln(total cholesterol). magent does not assay lipids.","required":true,"schema":{"type":"number"},"example":213},{"in":"query","name":"hdl_mg_dl","description":"HDL cholesterol in mg/dL (5-150). Enters as ln(HDL-C). magent does not assay lipids.","required":true,"schema":{"type":"number"},"example":50},{"in":"query","name":"sbp_mm_hg","description":"Systolic blood pressure in mm Hg (50-250). Enters as ln(SBP) with the treated or untreated Table A coefficient according to antihypertensive. magent does not measure blood pressure.","required":true,"schema":{"type":"number"},"example":120},{"in":"query","name":"antihypertensive","description":"Current antihypertensive treatment as assigned by the caller (true or false). true uses the Table A treated-SBP coefficient (and age × treated SBP when that cell is not N/A). false uses untreated SBP. Not both.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"smoker","description":"Current cigarette smoking as assigned by the caller (true or false). Adds the Table A smoker term and ln(age) × smoker when that cell is not N/A. magent does not take a smoking history.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"diabetes","description":"Diabetes as assigned by the caller (true or false). Adds the Table A diabetes term. magent does not assay glucose.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"2013 PCE 10-year ASCVD","operationId":"get_api_calc_ascvd_pce","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age, sex, cohort, total_cholesterol_mg_dl, hdl_mg_dl, sbp_mm_hg, antihypertensive, smoker, diabetes, individual_sum, ten_year_ascvd_percent, citation, disclaimer."},"400":{"description":"invalid_ascvd_pce: 2013 PCE inputs must match Goff 2013 age 40-79, sex, white or african_american cohort, lipids, treated or untreated SBP, smoking, and diabetes. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ascvd-pce"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"2013 PCE 10-year ASCVD (bulk)","operationId":"post_api_calc_ascvd_pce","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ascvd_pce: 2013 PCE inputs must match Goff 2013 age 40-79, sex, white or african_american cohort, lipids, treated or untreated SBP, smoking, and diabetes. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ascvd-pce"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"55","antihypertensive":"false","cohort":"white","diabetes":"false","hdl_mg_dl":"50","sbp_mm_hg":"120","sex":"female","smoker":"false","total_cholesterol_mg_dl":"213"},{"age":"55","antihypertensive":"false","cohort":"white","diabetes":"false","hdl_mg_dl":"50","sbp_mm_hg":"120","sex":"female","smoker":"false","total_cholesterol_mg_dl":"213"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mcdonald-2017":{"get":{"description":"Apply Thompson 2018 / 2017 McDonald criteria for typical clinically isolated syndrome and return whether mcdonald_ms holds from caller-assigned typical CIS, no better explanation, attacks, lesions, DIS, MRI DIT, and CSF-specific oligoclonal bands.\n\nWhen an agent already has typical CIS versus not, whether a better explanation exists, ≥2-attack and ≥2-lesion flags, and caller-assigned 2017 DIS, MRI DIT, and CSF-specific OCB, and needs the published relapsing/CIS combination. magent does not read MRI or assay CSF.\n\nNot a medical device and not a diagnosis of multiple sclerosis.\n\nRelapsing / typical CIS pathway only. Does not implement the 2017 primary progressive MS (PPMS) row.\n\nNot the 2010 McDonald criteria (symptomatic lesions were excluded from DIS and DIT then; 2017 counts symptomatic and cortical lesions).\n\nNot MAGNIMS 2016 as a second system.\n\nmagent does not read MRI and does not assay CSF. DIS, MRI DIT, and CSF-specific oligoclonal bands are caller-assigned.\n\nRemain vigilant for NMOSD (neuromyelitis optica spectrum disorder) and other better explanations; no_better_explanation is caller-assigned. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"typical_cis","description":"Typical clinically isolated syndrome as assigned by the caller (Thompson 2018 panel 1). If false, mcdonald_ms is false; this tool does not diagnose MS from atypical presentations. true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"no_better_explanation","description":"No better explanation for the presentation as assigned by the caller (Thompson 2018). If false, mcdonald_ms is false. Remain vigilant for NMOSD. true or false. magent does not assign a better explanation.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"two_or_more_attacks","description":"≥2 clinical attacks as assigned by the caller. true means two or more attacks; false means this is the first/CIS attack. true or false. magent does not date attacks.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"two_or_more_lesions","description":"Objective clinical evidence of ≥2 lesions as assigned by the caller. true means ≥2 lesions; false means 1 lesion. true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"dis","description":"Dissemination in space as assigned by the caller (2017: ≥1 T2-hyperintense lesion characteristic of MS in ≥2 of 4 areas: periventricular, cortical or juxtacortical, infratentorial, spinal cord; symptomatic lesions count; cortical lesions count). true or false. magent does not read MRI.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"dit_mri","description":"MRI dissemination in time as assigned by the caller (simultaneous Gd-enhancing and non-enhancing lesions, or a new T2 or Gd-enhancing lesion on follow-up vs baseline). true or false. magent does not read MRI.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"csf_specific_ocb","description":"CSF-specific oligoclonal bands as assigned by the caller (2017 DIT substitute when DIS is fulfilled). true or false. magent does not assay CSF.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"McDonald 2017","operationId":"get_api_calc_mcdonald_2017","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, mcdonald_ms, typical_cis, no_better_explanation, two_or_more_attacks, two_or_more_lesions, dis, dit_mri, csf_specific_ocb, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mcdonald-2017"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"McDonald 2017 (bulk)","operationId":"post_api_calc_mcdonald_2017","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mcdonald-2017"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"csf_specific_ocb":"false","dis":"false","dit_mri":"false","no_better_explanation":"true","two_or_more_attacks":"true","two_or_more_lesions":"true","typical_cis":"true"},{"csf_specific_ocb":"false","dis":"false","dit_mri":"false","no_better_explanation":"true","two_or_more_attacks":"true","two_or_more_lesions":"true","typical_cis":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/cdai-ra":{"get":{"description":"Sum caller-assigned 28-joint swollen and tender counts and 0–10 cm patient and evaluator globals and return the Aletaha 2005 Clinical Disease Activity Index. Does not add CRP and does not return activity-state cutoffs.\n\nWhen an agent already has caller-assigned 28-joint swollen and tender counts and 0–10 cm patient and evaluator globals and needs the published CDAI sum (SJC+TJC+PGA+EGA), not SDAI, not Crohn's CDAI, and not later unofficial activity-state cutoffs.\n\nNot a medical device and not a rheumatoid arthritis diagnosis or a treatment order.\n\nmagent does not count joints. sjc28, tjc28, pga, and ega are caller-assigned. PGA and EGA are centimetres on a 0–10 VAS as published.\n\nCDAI is SJC28 + TJC28 + PGA + EGA. It does not include CRP. Not SDAI. Not Crohn's CDAI.\n\nAletaha 2005 Arthritis Res Ther (ar1740) validates the sum against DAS28, SDAI, and HAQ. It does not publish activity-state cutoffs. magent returns score and max_score only. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sjc28","description":"Caller-assigned swollen joint count on the 28-joint set (Aletaha 2005 CDAI). Integer 0-28. magent does not count joints.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"tjc28","description":"Caller-assigned tender joint count on the 28-joint set (Aletaha 2005 CDAI). Integer 0-28. magent does not count joints.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"pga","description":"Caller-assigned patient global assessment on a 0-10 cm VAS (Aletaha 2005 CDAI). Number 0-10. magent does not examine the patient.","required":true,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"ega","description":"Caller-assigned evaluator global assessment on a 0-10 cm VAS (Aletaha 2005 CDAI). Number 0-10. magent does not examine the patient.","required":true,"schema":{"type":"number"},"example":"0"}],"summary":"CDAI-RA","operationId":"get_api_calc_cdai_ra","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, sjc28, tjc28, pga, ega, components, citation, disclaimer."},"400":{"description":"invalid_cdai_ra: sjc28 and tjc28 must be integers 0–28; pga and ega numbers 0–10 cm (Aletaha 2005 CDAI = SJC + TJC + PGA + EGA). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cdai-ra"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CDAI-RA (bulk)","operationId":"post_api_calc_cdai_ra","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_cdai_ra: sjc28 and tjc28 must be integers 0–28; pga and ega numbers 0–10 cm (Aletaha 2005 CDAI = SJC + TJC + PGA + EGA). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cdai-ra"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ega":"0","pga":"0","sjc28":"0","tjc28":"0"},{"ega":"0","pga":"0","sjc28":"0","tjc28":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/aap-tsb":{"get":{"description":"Return the AAP 2022 Kemper KAS 10 intensive phototherapy threshold from Supplemental Table 1 (no extra neurotoxicity risk factors other than gestational age) or Supplemental Table 2 (any additional listed factor), with TSB minus that threshold and whether TSB is at or above it.\n\nWhen an agent already has completed gestational age ≥35 weeks, age in hours, TSB, and caller-assigned extra neurotoxicity risk factors and needs the published hour-specific phototherapy threshold. magent does not assay TSB or order phototherapy. Gestational age <38 weeks is already in the GA-specific curve; use Table 2 only when an additional listed factor is assigned.\n\nNot a medical device and not a phototherapy or exchange-transfusion order. magent does not assay TSB.\n\nPublished for newborn infants 35 or more weeks of gestation only (Kemper 2022). Ages under 1 hour and after 336 hours are rejected.\n\nUse total serum bilirubin. Do not subtract direct-reacting or conjugated bilirubin.\n\nNeurotoxicity risk factors other than gestational age are caller-assigned (isoimmune hemolytic disease, G6PD deficiency or other hemolytic conditions, sepsis, albumin <3.0 g/dL, significant clinical instability in the previous 24 hours). magent does not determine those factors or assign race or ethnicity.\n\nThis tool is Supplemental Tables 1 and 2 only. It is not Bhutani 1999 percentile zones and is not an exchange-transfusion threshold. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"gestational_age_weeks","description":"Completed gestational age in weeks, integer 35-45. Table 1 uses distinct curves for 35, 36, 37, 38, 39, and ≥40. Table 2 groups ≥38 together. magent does not convert days.","required":true,"schema":{"type":"integer"},"example":40},{"in":"query","name":"age_hours","description":"Chronologic age in hours (1-336). Supplemental Tables 1 and 2 are tabulated hourly; ages between adjacent hours are linearly interpolated. Hour 0 is not tabulated. magent does not convert days.","required":true,"schema":{"type":"number"},"example":48},{"in":"query","name":"tsb_mg_dl","description":"Total serum bilirubin in mg/dL (0-40). Use TSB; do not subtract direct-reacting or conjugated bilirubin. magent does not assay TSB.","required":true,"schema":{"type":"number"},"example":17},{"in":"query","name":"isoimmune_hemolytic_disease","description":"Caller-assigned isoimmune hemolytic disease (positive direct antiglobulin test) from Kemper 2022 Table 2. true or false. magent does not interpret DAT.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"g6pd_deficiency","description":"Caller-assigned glucose-6-phosphate dehydrogenase (G6PD) deficiency from Kemper 2022 Table 2. true or false. magent does not assay G6PD.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"other_hemolytic_condition","description":"Caller-assigned other hemolytic condition (Kemper 2022 Table 2, same neurotoxicity-risk row as isoimmune disease and G6PD deficiency). true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"sepsis","description":"Caller-assigned sepsis or suspected sepsis from Kemper 2022 Table 2. true or false. magent does not diagnose sepsis.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"albumin_lt_3","description":"Caller-assigned albumin <3.0 g/dL from Kemper 2022 Table 2. true or false. magent does not assay albumin.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"clinical_instability_24h","description":"Caller-assigned significant clinical instability in the previous 24 hours from Kemper 2022 Table 2. true or false. magent does not examine the infant.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"AAP 2022 phototherapy threshold (Kemper)","operationId":"get_api_calc_aap_tsb","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, gestational_age_weeks, gestational_age_group, age_hours, tsb_mg_dl, isoimmune_hemolytic_disease, g6pd_deficiency, other_hemolytic_condition, sepsis, albumin_lt_3, clinical_instability_24h, any_neurotoxicity_risk_factor, supplemental_table, phototherapy_threshold_mg_dl, tsb_minus_threshold, above_phototherapy_threshold, components, citation, disclaimer."},"400":{"description":"invalid_aap_tsb: AAP 2022 phototherapy-threshold inputs must match gestational age, age in hours, total serum bilirubin, and caller-assigned neurotoxicity risk factors. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/aap-tsb"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"AAP 2022 phototherapy threshold (Kemper) (bulk)","operationId":"post_api_calc_aap_tsb","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_aap_tsb: AAP 2022 phototherapy-threshold inputs must match gestational age, age in hours, total serum bilirubin, and caller-assigned neurotoxicity risk factors. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/aap-tsb"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_hours":"48","albumin_lt_3":"false","clinical_instability_24h":"false","g6pd_deficiency":"false","gestational_age_weeks":"40","isoimmune_hemolytic_disease":"false","other_hemolytic_condition":"false","sepsis":"false","tsb_mg_dl":"17"},{"age_hours":"48","albumin_lt_3":"false","clinical_instability_24h":"false","g6pd_deficiency":"false","gestational_age_weeks":"40","isoimmune_hemolytic_disease":"false","other_hemolytic_condition":"false","sepsis":"false","tsb_mg_dl":"17"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/plasma-dosage":{"get":{"description":"Compute the BSH Green 2018 starting plasma volume from body weight: 15 mL/kg in the absence of major bleeding. Adult starting dose only.\n\nWhen an agent needs the published adult starting plasma volume and must not invent a major-haemorrhage RBC:plasma ratio, a cryoprecipitate pool, a paediatric variant, or a product or ABO-group choice.\n\nNot a medical device. Not a transfusion order.\n\nNot a major-haemorrhage protocol. Does not implement RBC:plasma ratios, cryoprecipitate pools, or paediatric variants. Adult starting 15 mL/kg only.\n\nmagent does not choose a product or ABO group. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"weight_kg","description":"Weight in kilograms (1-500). Required.","required":true,"schema":{"type":"number"},"example":"70"}],"summary":"Plasma starting dose","operationId":"get_api_calc_plasma_dosage","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, weight_kg, ml_per_kg, volume_ml, citation, disclaimer."},"400":{"description":"invalid_plasma: Plasma volume inputs must match Green 2018 BSH weight from that guideline. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/plasma-dosage"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Plasma starting dose (bulk)","operationId":"post_api_calc_plasma_dosage","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_plasma: Plasma volume inputs must match Green 2018 BSH weight from that guideline. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/plasma-dosage"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"weight_kg":"70"},{"weight_kg":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-cvs":{"get":{"description":"Apply the Stanghellini 2016 Rome IV adult cyclic vomiting syndrome B3b diagnostic criteria and return whether the published CVS box holds (rome_iv_cvs) plus the supportive migraine_history flag.\n\nWhen an agent already has the eight caller-assigned Stanghellini 2016 Rome IV adult CVS B3b flags and needs whether the published CVS box holds. magent does not examine the patient.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose cyclic vomiting syndrome.\n\nThe caller assigns the eight flags. magent does not examine the patient.\n\nThis tool is Stanghellini 2016 Rome IV adult cyclic vomiting syndrome B3b only. Migraine history is supportive and not required for rome_iv_cvs. Not cannabinoid hyperemesis syndrome. Not pediatric or child Rome IV CVS. Not Rome IV IBS (Mearin 2016). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"stereotypical_episodes_acute_lt_1_week","description":"Stereotypical episodes of vomiting regarding onset (acute) and duration (<1 week) (Stanghellini 2016 Rome IV adult B3b). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"at_least_three_episodes_prior_year","description":"At least 3 discrete vomiting episodes in the prior year, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"at_least_two_episodes_past_6_months","description":"At least 2 discrete vomiting episodes in the past 6 months, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"episodes_at_least_1_week_apart","description":"Discrete vomiting episodes occurring at least 1 week apart, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"absence_of_vomiting_between_episodes","description":"Absence of vomiting between episodes; milder symptoms between cycles are allowed (Stanghellini 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"fulfilled_last_3_months","description":"Criteria fulfilled for the last 3 months, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"onset_at_least_6_months","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"migraine_history","description":"Personal history of migraine or family history of migraine, a supportive criterion that is not required for rome_iv_cvs (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV CVS","operationId":"get_api_calc_rome_iv_cvs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, migraine_history, rome_iv_cvs, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_cvs: Rome IV cyclic vomiting needs the eight Stanghellini 2016 adult B3b flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-cvs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV CVS (bulk)","operationId":"post_api_calc_rome_iv_cvs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_cvs: Rome IV cyclic vomiting needs the eight Stanghellini 2016 adult B3b flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-cvs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"absence_of_vomiting_between_episodes":"true","at_least_three_episodes_prior_year":"true","at_least_two_episodes_past_6_months":"true","episodes_at_least_1_week_apart":"true","fulfilled_last_3_months":"true","migraine_history":"true","onset_at_least_6_months":"true","stereotypical_episodes_acute_lt_1_week":"true"},{"absence_of_vomiting_between_episodes":"true","at_least_three_episodes_prior_year":"true","at_least_two_episodes_past_6_months":"true","episodes_at_least_1_week_apart":"true","fulfilled_last_3_months":"true","migraine_history":"true","onset_at_least_6_months":"true","stereotypical_episodes_acute_lt_1_week":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-nbs":{"get":{"description":"Apply the Keefer 2016 Rome IV narcotic bowel syndrome (NBS / D2) diagnostic criteria and return nbs_features_met (0-3) and whether the published NBS box holds (rome_iv_nbs).\n\nWhen an agent already has the seven caller-assigned Keefer 2016 Rome IV NBS flags and needs whether the published NBS box holds. magent does not examine the patient or judge opioid dose beyond the caller flags.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose narcotic bowel syndrome.\n\nThe caller assigns the seven flags. magent does not examine the patient or judge opioid dose beyond caller flags.\n\nPatients often take about 75 mg oral morphine equivalent; no particular time frame or dosage is required. That dose note is copy-only and is not parsed.\n\nThis tool is Keefer 2016 Rome IV NBS (D2 / opioid-induced GI hyperalgesia) only. Not Rome IV CAPS (D1). Not opioid-induced constipation (rome-iv-oic). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"chronic_or_frequently_recurring_abdominal_pain_on_narcotics","description":"Chronic or frequently recurring abdominal pain treated with acute high-dose or chronic narcotics; pain must occur most days, as assigned (Keefer 2016 Rome IV NBS / D2). Patients often take about 75 mg oral morphine equivalent; no particular time frame or dosage is required. true or false as assigned by the caller. magent does not examine the patient or judge opioid dose.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"pain_not_explained_by_current_or_previous_gi_diagnosis","description":"The nature and intensity of the pain is not explained by a current or previous GI diagnosis (a structural diagnosis may exist but is not sufficient to explain the pain), as assigned (Keefer 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"pain_worsens_or_incompletely_resolves_with_continued_or_escalating_narcotics","description":"Pain worsens or incompletely resolves with continued or escalating dosages of narcotics (one of three NBS features; at least two required). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"marked_worsening_when_dose_wanes_improvement_when_reinstituted","description":"Marked worsening of pain when the narcotic dose wanes and improvement when narcotics are re-instituted (soar and crash; one of three NBS features; at least two required). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"progression_of_frequency_duration_intensity_of_pain_episodes","description":"Progression of the frequency, duration, and intensity of pain episodes (one of three NBS features; at least two required). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"fulfilled_last_3_months","description":"Criteria fulfilled for the last 3 months, as assigned (Keefer 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"onset_at_least_6_months","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Keefer 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV NBS","operationId":"get_api_calc_rome_iv_nbs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, nbs_features_met, rome_iv_nbs, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_nbs: Rome IV narcotic bowel needs the Keefer 2016 centrally mediated NBS flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-nbs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV NBS (bulk)","operationId":"post_api_calc_rome_iv_nbs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_nbs: Rome IV narcotic bowel needs the Keefer 2016 centrally mediated NBS flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-nbs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"chronic_or_frequently_recurring_abdominal_pain_on_narcotics":"true","fulfilled_last_3_months":"true","marked_worsening_when_dose_wanes_improvement_when_reinstituted":"true","onset_at_least_6_months":"true","pain_not_explained_by_current_or_previous_gi_diagnosis":"true","pain_worsens_or_incompletely_resolves_with_continued_or_escalating_narcotics":"true","progression_of_frequency_duration_intensity_of_pain_episodes":"false"},{"chronic_or_frequently_recurring_abdominal_pain_on_narcotics":"true","fulfilled_last_3_months":"true","marked_worsening_when_dose_wanes_improvement_when_reinstituted":"true","onset_at_least_6_months":"true","pain_not_explained_by_current_or_previous_gi_diagnosis":"true","pain_worsens_or_incompletely_resolves_with_continued_or_escalating_narcotics":"true","progression_of_frequency_duration_intensity_of_pain_episodes":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/abcd2":{"get":{"description":"Compute the ABCD2 score as age, blood pressure, caller-assigned clinical features, symptom duration, and diabetes.\n\nWhen an agent needs the published Johnston 2007 ABCD2 total and must not invent clinical_features from a chart narrative.\n\nNot a diagnosis or admit protocol. magent does not diagnose TIA.\n\nThis is ABCD2 (Johnston 2007), not ABCD (Rothwell 2005 only) and not ABCD3-I.\n\nclinical_features is a caller-assigned enum (none, speech_without_weakness, or unilateral_weakness). magent does not examine the patient. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Age ≥60 scores 1; 59 scores 0.","required":true,"schema":{"type":"integer"},"example":"55"},{"in":"query","name":"systolic_mm_hg","description":"Cuff systolic blood pressure in mm Hg (50-250). ≥140 scores 1.","required":true,"schema":{"type":"number"},"example":"120"},{"in":"query","name":"diastolic_mm_hg","description":"Cuff diastolic blood pressure in mm Hg (20-160). Must be less than systolic. ≥90 scores 1.","required":true,"schema":{"type":"number"},"example":"80"},{"in":"query","name":"clinical_features","description":"Caller-assigned TIA features. none scores 0; speech_without_weakness scores 1; unilateral_weakness scores 2. Mutually exclusive. magent does not examine the patient.","required":true,"schema":{"type":"string"},"example":"none"},{"in":"query","name":"duration_min","description":"Symptom duration in minutes (integer 0-1440). Under 10 scores 0; 10-59 scores 1; 60 or more scores 2.","required":true,"schema":{"type":"integer"},"example":"5"},{"in":"query","name":"diabetes","description":"Diabetes mellitus. true scores 1; false scores 0.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"ABCD2 score","operationId":"get_api_calc_abcd2","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, abcd2_band, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_diastolic_bp: diastolic_mm_hg must be a number from 20 to 160. Returned before settlement; you are not charged.; invalid_pulse_pressure: diastolic_mm_hg must be less than systolic_mm_hg. Returned before settlement; you are not charged.; invalid_abcd2_clinical: clinical_features must be none, speech_without_weakness, or unilateral_weakness. Returned before settlement; you are not charged.; invalid_duration_min: duration_min must be an integer from 0 to 1440. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/abcd2"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ABCD2 score (bulk)","operationId":"post_api_calc_abcd2","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_diastolic_bp: diastolic_mm_hg must be a number from 20 to 160. Returned before settlement; you are not charged.; invalid_pulse_pressure: diastolic_mm_hg must be less than systolic_mm_hg. Returned before settlement; you are not charged.; invalid_abcd2_clinical: clinical_features must be none, speech_without_weakness, or unilateral_weakness. Returned before settlement; you are not charged.; invalid_duration_min: duration_min must be an integer from 0 to 1440. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/abcd2"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"55","clinical_features":"none","diabetes":"false","diastolic_mm_hg":"80","duration_min":"5","systolic_mm_hg":"120"},{"age":"55","clinical_features":"none","diabetes":"false","diastolic_mm_hg":"80","duration_min":"5","systolic_mm_hg":"120"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/nlr":{"get":{"description":"Compute the Zahorec 2001 neutrophil-to-lymphocyte ratio from relative neutrophil and lymphocyte percents.\n\nWhen an agent needs the published ratio of relative neutrophil to lymphocyte counts and must not invent a sepsis cutoff or an oncology threshold.\n\nNot a diagnosis of sepsis. Zahorec 2001 is the ratio of relative neutrophil and lymphocyte counts (%).\n\nmagent does not apply later oncology cutoffs that are not in that paper. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"neutrophil_percent","description":"Relative neutrophil count as a percent of leukocytes (0.1-99).","required":true,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"lymphocyte_percent","description":"Relative lymphocyte count as a percent of leukocytes (0.1-99). Must be greater than 0.","required":true,"schema":{"type":"number"},"example":"20"}],"summary":"NLR","operationId":"get_api_calc_nlr","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, neutrophil_percent, lymphocyte_percent, nlr, citation, disclaimer."},"400":{"description":"invalid_nlr_neutrophil_percent: neutrophil_percent must be a number from 0.1 to 99. Returned before settlement; you are not charged.; invalid_lymphocyte_percent: lymphocyte_percent must be a number from 0.1 to 99. Returned before settlement; you are not charged.; invalid_nlr_inputs: neutrophil_percent and lymphocyte_percent are required; lymphocyte_percent must be greater than 0. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nlr"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"NLR (bulk)","operationId":"post_api_calc_nlr","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_nlr_neutrophil_percent: neutrophil_percent must be a number from 0.1 to 99. Returned before settlement; you are not charged.; invalid_lymphocyte_percent: lymphocyte_percent must be a number from 0.1 to 99. Returned before settlement; you are not charged.; invalid_nlr_inputs: neutrophil_percent and lymphocyte_percent are required; lymphocyte_percent must be greater than 0. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nlr"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"lymphocyte_percent":"20","neutrophil_percent":"70"},{"lymphocyte_percent":"20","neutrophil_percent":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-chest-pain":{"get":{"description":"Apply the Aziz 2016 Rome IV functional chest pain diagnostic criteria and return whether the published functional chest pain box holds (rome_iv_chest_pain).\n\nWhen an agent already has the six caller-assigned Aziz 2016 Rome IV functional chest pain flags and needs whether the published box holds. magent does not examine the patient, rule out ACS, or read manometry.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose functional chest pain.\n\nThe caller assigns the six flags, including that cardiac causes are ruled out. magent does not examine the patient, rule out ACS, or read manometry.\n\nThis tool is Aziz 2016 Rome IV functional chest pain only. Not functional heartburn. Not reflux hypersensitivity. Not globus. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"retrosternal_chest_pain_or_discomfort","description":"Retrosternal chest pain or discomfort; cardiac causes ruled out by the caller (Aziz 2016). true or false as assigned by the caller. magent does not examine the patient or rule out ACS.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"no_associated_heartburn_or_dysphagia","description":"Absence of associated esophageal symptoms such as heartburn and dysphagia, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"not_explained_by_gerd_or_eoe","description":"Symptoms not explained by GERD or eosinophilic esophagitis, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"no_major_esophageal_motor_disorder","description":"Absence of a major esophageal motor disorder, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not read manometry.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"fulfilled_last_3_months","description":"Criteria fulfilled for the last 3 months, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"onset_at_least_6_months","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV Chest Pain","operationId":"get_api_calc_rome_iv_chest_pain","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, rome_iv_chest_pain, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_chest_pain: Rome IV functional chest pain needs the Aziz 2016 esophageal chest-pain flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-chest-pain"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV Chest Pain (bulk)","operationId":"post_api_calc_rome_iv_chest_pain","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_chest_pain: Rome IV functional chest pain needs the Aziz 2016 esophageal chest-pain flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-chest-pain"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"fulfilled_last_3_months":"true","no_associated_heartburn_or_dysphagia":"true","no_major_esophageal_motor_disorder":"true","not_explained_by_gerd_or_eoe":"true","onset_at_least_6_months":"true","retrosternal_chest_pain_or_discomfort":"true"},{"fulfilled_last_3_months":"true","no_associated_heartburn_or_dysphagia":"true","no_major_esophageal_motor_disorder":"true","not_explained_by_gerd_or_eoe":"true","onset_at_least_6_months":"true","retrosternal_chest_pain_or_discomfort":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/delta-p":{"get":{"description":"Sum the six Titulaer 2011 DELTA-P items (bulbar weakness, erectile dysfunction in males, weight loss ≥5%, smoking at onset, age ≥50, Karnofsky <70) and return the score, SCLC band, and published SCLC percents for scores 0, 1, and 3-6.\n\nWhen an agent has caller-assigned DELTA-P items at or within 3 months of LEMS onset and needs the published Titulaer 2011 total and SCLC band, without inventing a LEMS diagnosis, SOX1 result, or SCLC screen.\n\nNot a medical device. magent does not diagnose LEMS or small-cell lung cancer.\n\nNot a LEMS diagnosis and not SOX1 antibody testing.\n\nmagent does not screen for SCLC and does not order CT, PET, or bronchoscopy.\n\nItems are scored at or within 3 months of LEMS onset as assigned by the caller.\n\nFemale erectile_dysfunction is always 0 (Titulaer 2011 Female | 0), including if omitted or true. The flag is required only when sex is male.\n\nAge 50 scores 1; 49 does not. kps_lt_70 is a caller flag for Karnofsky 0-60; magent does not compute Karnofsky.\n\nPublished SCLC percents are returned for scores 0, 1, 3, 4, 5, and 6 (0%, 2.6%, 83.9%, 93.5%, 96.6%, 100%). Score 2 (intermediate) has no published percent in the Titulaer 2011 main text; magent does not invent one. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sex","description":"female or male. Erectile dysfunction scores only when male. Female erectile is always 0 (Titulaer 2011: Female | 0).","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"age","description":"Age at LEMS onset in years (18-120). ≥50 scores 1; 49 does not (Titulaer 2011).","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"bulbar_weakness","description":"Dysarthria, dysphagia, chewing difficulty, or neck weakness at or within 3 months of LEMS onset (Titulaer 2011 D). true or false. Caller-assigned. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"erectile_dysfunction","description":"Erectile dysfunction at or within 3 months of LEMS onset (Titulaer 2011 E). Required when sex is male (true scores 1). When female, this item is always 0, including if omitted, false, or true. true or false.","required":false,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"weight_loss_ge_5pct","description":"Weight loss ≥5% at or within 3 months of LEMS onset (Titulaer 2011 L). true or false. Caller-assigned. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"smoking_at_onset","description":"Smoking at LEMS onset (Titulaer 2011 T). true or false. Caller-assigned. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"kps_lt_70","description":"Karnofsky Performance Status 0-60 (KPS <70) at or within 3 months of LEMS onset (Titulaer 2011 P). Caller-assigned flag; magent does not compute Karnofsky. true or false. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"DELTA-P","operationId":"get_api_calc_delta_p","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, sclc_band, sclc_percent, sex, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/delta-p"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"DELTA-P (bulk)","operationId":"post_api_calc_delta_p","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/delta-p"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","bulbar_weakness":"false","kps_lt_70":"false","sex":"female","smoking_at_onset":"false","weight_loss_ge_5pct":"false"},{"age":"40","bulbar_weakness":"false","kps_lt_70":"false","sex":"female","smoking_at_onset":"false","weight_loss_ge_5pct":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/cat":{"get":{"description":"Sum eight caller-assigned Jones 2009 CAT items (each integer 0-5) and return the published 0-40 total. Does not apply later GOLD CAT impact bands.\n\nWhen an agent already has Jones 2009 integers 0-5 for the eight CAT items and needs the published total. magent does not interview the patient, diagnose COPD, score BODE, assign GOLD ABE groups, or apply later 0-10/11-20/21-30/31-40 GOLD impact bands.\n\nNot a medical device and not a COPD diagnosis or treatment order.\n\nEach of the eight items is a caller-assigned integer 0-5. magent does not interview the patient.\n\nThis is Jones 2009 CAT only (eight items; max 40). magent does not score BODE and does not assign GOLD ABE groups.\n\nJones 2009 published no GOLD 0-10 / 11-20 / 21-30 / 31-40 CAT impact bands. This tool returns score and max_score only. It does not apply later website or GOLD cutoffs. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"cough","description":"Caller-assigned Jones 2009 CAT cough (integer 0-5): 0 I never cough to 5 I cough all the time. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"phlegm","description":"Caller-assigned Jones 2009 CAT phlegm (integer 0-5): 0 I have no phlegm (mucus) in my chest at all to 5 my chest is completely full of phlegm (mucus). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"chest_tightness","description":"Caller-assigned Jones 2009 CAT chest tightness (integer 0-5): 0 my chest does not feel tight at all to 5 my chest feels very tight. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"breathlessness","description":"Caller-assigned Jones 2009 CAT breathlessness (integer 0-5): 0 when I walk up a hill or one flight of stairs I am not breathless to 5 when I walk up a hill or one flight of stairs I am very breathless. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"activities","description":"Caller-assigned Jones 2009 CAT activities (integer 0-5): 0 I am not limited doing any activities at home to 5 I am very limited doing activities at home. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"confidence","description":"Caller-assigned Jones 2009 CAT confidence (integer 0-5): 0 I am confident leaving my home despite my lung condition to 5 I am not at all confident leaving my home because of my lung condition. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"sleep","description":"Caller-assigned Jones 2009 CAT sleep (integer 0-5): 0 I sleep soundly to 5 I don't sleep soundly because of my lung condition. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"energy","description":"Caller-assigned Jones 2009 CAT energy (integer 0-5): 0 I have lots of energy to 5 I have no energy at all. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"CAT","operationId":"get_api_calc_cat","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_cat: COPD Assessment Test needs the eight Jones 2009 items each as an integer 0-5. Returned before settlement; you are not charged.; invalid_cat_item: each CAT item must be an integer from 0 to 5 (Jones 2009). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cat"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CAT (bulk)","operationId":"post_api_calc_cat","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_cat: COPD Assessment Test needs the eight Jones 2009 items each as an integer 0-5. Returned before settlement; you are not charged.; invalid_cat_item: each CAT item must be an integer from 0 to 5 (Jones 2009). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cat"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"activities":"0","breathlessness":"0","chest_tightness":"0","confidence":"0","cough":"0","energy":"0","phlegm":"0","sleep":"0"},{"activities":"0","breathlessness":"0","chest_tightness":"0","confidence":"0","cough":"0","energy":"0","phlegm":"0","sleep":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pe-sard":{"get":{"description":"Sum the Chopard 2021 PE-SARD factors (syncope, anemia, renal dysfunction) and return the published early major-bleed risk band.\n\nWhen an agent needs the published PE-SARD point total and band for early major bleeding in acute PE and must not invent a PE diagnosis or anticoagulation decision.\n\nNot a medical device.\n\nNot a PE diagnosis and not an anticoagulation order or treatment recommendation.\n\nmagent does not assay hemoglobin or compute GFR. Anemia (Chopard 2021: hemoglobin <12 g/dL) and renal dysfunction (GFR <60 mL/min) are caller-assigned flags.\n\nBands follow Chopard 2021: low (score 0), intermediate (1–2.5 inclusive), high (>2.5). JSON does not include unpublished intermediate observed bleed rates. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"syncope","description":"Syncope as assigned by the caller (Chopard 2021). true scores 1.5. magent does not take a syncope history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"anemia","description":"Anemia as assigned by the caller (Chopard 2021: hemoglobin <12 g/dL). true scores 2.5. magent does not assay hemoglobin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"renal_dysfunction","description":"Renal dysfunction as assigned by the caller (Chopard 2021: GFR <60 mL/min). true scores 1. magent does not compute GFR.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"PE-SARD","operationId":"get_api_calc_pe_sard","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk, components, citation, disclaimer."},"400":{"description":"invalid_pe_sard: PE-SARD inputs must match Chopard 2021 syncope, anemia, and renal-dysfunction factors from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pe-sard"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PE-SARD (bulk)","operationId":"post_api_calc_pe_sard","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pe_sard: PE-SARD inputs must match Chopard 2021 syncope, anemia, and renal-dysfunction factors from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pe-sard"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"anemia":"false","renal_dysfunction":"false","syncope":"false"},{"anemia":"false","renal_dysfunction":"false","syncope":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/apfel":{"get":{"description":"Sum the four Apfel 1999 predictors for postoperative nausea and vomiting and return the published integer score (0-4).\n\nWhen an agent needs the published Apfel 1999 integer score and must not invent a prophylaxis order, a PONV diagnosis, or the paper's incidence percents.\n\nNot a medical device.\n\nNot a prophylaxis order and not a diagnosis of PONV.\n\nApfel 1999 reported incidences by score. This tool returns the integer score without those percents.\n\nThe caller assigns sex, motion-sickness or PONV history, smoking status, and the postoperative opioid plan. magent does not take an anesthetic. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sex","description":"female or male (Apfel 1999). Female scores 1. Male scores 0. Assigned by the caller.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"history_motion_sickness_or_ponv","description":"History of motion sickness or postoperative nausea and vomiting (Apfel 1999). true or false as assigned by the caller. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"nonsmoker","description":"Nonsmoking status (Apfel 1999). true scores 1. Smokers (false) score 0. Assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"postoperative_opioids","description":"Postoperative opioids planned or given (Apfel 1999). true or false as assigned by the caller. 1 point if true. magent does not take an anesthetic.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Apfel PONV score","operationId":"get_api_calc_apfel","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, band, sex, components, citation, disclaimer."},"400":{"description":"invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/apfel"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Apfel PONV score (bulk)","operationId":"post_api_calc_apfel","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/apfel"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"history_motion_sickness_or_ponv":"false","nonsmoker":"false","postoperative_opioids":"false","sex":"male"},{"history_motion_sickness_or_ponv":"false","nonsmoker":"false","postoperative_opioids":"false","sex":"male"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/canadian-c-spine":{"get":{"description":"Apply the Stiell 2001 Canadian C-spine rule and return whether cervical radiography is indicated from caller-assigned age, high-risk factors, low-risk factors, and neck rotation.\n\nWhen an agent has caller-assigned findings after blunt neck trauma in an alert, stable adult and needs the published Canadian C-spine radiography rule, not NEXUS.\n\nNot a diagnosis of cervical spine injury. magent does not examine the neck.\n\nThis tool is the Stiell 2001 Canadian C-spine rule only. It is not NEXUS and not a pediatric C-spine rule.\n\nPopulation is alert, stable blunt trauma in adults with GCS 15 as published. magent does not take GCS; the caller assigns the findings.\n\nDangerous mechanism is caller-assigned. Published dangerous mechanisms: fall from elevation ≥3 feet/5 stairs; axial load to head; MVC high speed (>100 km/h), rollover, or ejection; motorized recreational vehicles; bicycle collision.\n\nSimple rear-end MVC is caller-assigned. Published exclusions from simple rear-end: pushed into oncoming traffic, hit by a bus or large truck, rollover, hit by a high-speed vehicle. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Age ≥65 is a high-risk factor that mandates radiography; 64 does not.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"dangerous_mechanism","description":"Dangerous mechanism as assigned by the caller. true or false. High-risk; when true, radiography is indicated without range-of-motion assessment.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"paresthesias_extremities","description":"Paresthesias in the extremities. true or false as assigned by the caller. High-risk; when true, radiography is indicated without range-of-motion assessment.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"simple_rear_end_mvc","description":"Simple rear-end motor vehicle collision as assigned by the caller. true or false. A low-risk factor that can allow safe range-of-motion assessment.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"sitting_in_ed","description":"Sitting position in the emergency department. true or false as assigned by the caller. A low-risk factor that can allow safe range-of-motion assessment.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ambulatory_since_injury","description":"Ambulatory at any time since injury. true or false as assigned by the caller. A low-risk factor that can allow safe range-of-motion assessment.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"delayed_neck_pain","description":"Delayed onset of neck pain. true or false as assigned by the caller. A low-risk factor that can allow safe range-of-motion assessment.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"midline_cspine_tenderness","description":"Midline cervical-spine tenderness. true or false as assigned by the caller. Absence of midline tenderness (false) is a low-risk factor that can allow safe range-of-motion assessment.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"able_to_rotate_45","description":"Able to actively rotate the neck 45 degrees left and right. true or false as assigned by the caller. Consulted only when there is no high-risk factor and at least one low-risk factor.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Canadian C-spine rule","operationId":"get_api_calc_canadian_c_spine","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, xray_indicated, high_risk, low_risk_allows_rom, able_to_rotate_45, age_years, criteria, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/canadian-c-spine"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Canadian C-spine rule (bulk)","operationId":"post_api_calc_canadian_c_spine","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/canadian-c-spine"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"able_to_rotate_45":"true","age":"40","ambulatory_since_injury":"false","dangerous_mechanism":"false","delayed_neck_pain":"true","midline_cspine_tenderness":"true","paresthesias_extremities":"false","simple_rear_end_mvc":"false","sitting_in_ed":"false"},{"able_to_rotate_45":"true","age":"40","ambulatory_since_injury":"false","dangerous_mechanism":"false","delayed_neck_pain":"true","midline_cspine_tenderness":"true","paresthesias_extremities":"false","simple_rear_end_mvc":"false","sitting_in_ed":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mme":{"get":{"description":"Compute morphine milligram equivalents from a CDC 2022 table opioid and daily dose (or transdermal fentanyl mcg/hr).\n\nWhen an agent needs published CDC 2022 MME arithmetic and must not invent conversion factors or convert one opioid to another.\n\nAll doses are mg/day except fentanyl_transdermal, which is mcg/hr.\n\nMME values are estimates only and do not account for individual variability.\n\nDo not use MME to convert one opioid to another or to choose a replacement dose.\n\nThe methadone conversion factor is an estimate; it increases at higher methadone doses.\n\nTransdermal fentanyl absorption can increase with fever or heat.\n\nBuprenorphine is not in the CDC 2022 table and is rejected.\n\nNot for opioid use disorder (OUD) dosing of methadone or buprenorphine.\n\nAnalytic MME only; not a taper protocol, diagnosis, or dosing recommendation. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"opioid","description":"CDC 2022 MME table key (case-insensitive exact match). Not a brand name or alias.","required":true,"schema":{"type":"string","enum":["codeine","fentanyl_transdermal","hydrocodone","hydromorphone","methadone","morphine","oxycodone","oxymorphone","tapentadol","tramadol"]},"example":"hydrocodone"},{"in":"query","name":"dose","description":"Daily opioid dose in mg/day (0.1-5000), or fentanyl_transdermal patch rate in mcg/hr (12-300).","required":true,"schema":{"type":"number"},"example":"20"}],"summary":"Morphine milligram equivalents","operationId":"get_api_calc_mme","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, opioid, dose, dose_unit, conversion_factor, mme, citation, disclaimer."},"400":{"description":"invalid_opioid: opioid must be codeine, fentanyl_transdermal, hydrocodone, hydromorphone, methadone, morphine, oxycodone, oxymorphone, tapentadol, or tramadol. Returned before settlement; you are not charged.; invalid_opioid_dose: dose must be a number in range for that opioid (mg/day, or mcg/hr for fentanyl_transdermal). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mme"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Morphine milligram equivalents (bulk)","operationId":"post_api_calc_mme","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_opioid: opioid must be codeine, fentanyl_transdermal, hydrocodone, hydromorphone, methadone, morphine, oxycodone, oxymorphone, tapentadol, or tramadol. Returned before settlement; you are not charged.; invalid_opioid_dose: dose must be a number in range for that opioid (mg/day, or mcg/hr for fentanyl_transdermal). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mme"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"dose":"20","opioid":"hydrocodone"},{"dose":"20","opioid":"hydrocodone"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/adapt":{"get":{"description":"Apply the Than 2012 ADAPT 2-hour accelerated diagnostic protocol and return whether a caller-assigned TIMI UA/NSTEMI score plus initial ECG and 0-hour/2-hour troponin flags meet the published ADP-negative (low-risk) rule.\n\nWhen an agent already has a caller-assigned Antman 2000 TIMI UA/NSTEMI total (0-7) and caller-assigned flags for new ischemic ECG changes and 0-hour and 2-hour troponin elevation and needs the published Than 2012 ADP-negative result. magent does not assign TIMI items, read an ECG, or assay troponin.\n\nNot a medical device and not a diagnosis of ACS.\n\ntimi_score is the caller-assigned Antman 2000 TIMI UA/NSTEMI total (0-7). magent does not assign TIMI items.\n\nnew_ischemic_ecg is a caller-assigned flag for new ischemic changes on the initial ECG (not known to be pre-existing). magent does not read an ECG.\n\ntroponin_0_elevated and troponin_2h_elevated are caller-assigned flags for 0-hour and 2-hour (not 3-hour) cTnI at or above the institutional cutoff. magent does not assay troponin.\n\nThis tool is not a discharge order or a stress-test order. Presence of high-risk features does not mandate a test.\n\nThis is the Than 2012 ADAPT protocol (TIMI 0 plus no new ischemic ECG plus both 0h/2h troponins not elevated), not HEART Pathway (Mahler 2015 HEART 0-3 plus 0h/3h) and not TIMI item scoring. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"timi_score","description":"Caller-assigned TIMI UA/NSTEMI score integer 0-7 (Antman 2000 components already summed by the caller). magent does not assign TIMI items. Low-risk (ADP-negative) requires 0 when the ECG and both 2-hour serial troponin flags are false.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"new_ischemic_ecg","description":"New ischemic changes on the initial ECG (not known to be pre-existing), as assigned by the caller. true or false. true blocks low-risk. magent does not read an ECG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"troponin_0_elevated","description":"0-hour cTnI at or above the institutional cutoff as assigned by the caller. true or false. true blocks low-risk. magent does not assay troponin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"troponin_2h_elevated","description":"2-hour (not 3-hour) troponin at or above the institutional cutoff as assigned by the caller. true or false. true blocks low-risk. magent does not assay troponin.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"ADAPT","operationId":"get_api_calc_adapt","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, timi_score, new_ischemic_ecg, troponin_0_elevated, troponin_2h_elevated, low_risk, components, citation, disclaimer."},"400":{"description":"invalid_timi_score: timi_score must be an integer from 0 to 7 (caller-assigned Antman 2000 TIMI UA/NSTEMI total as used in Than 2012 ADAPT). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/adapt"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ADAPT (bulk)","operationId":"post_api_calc_adapt","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_timi_score: timi_score must be an integer from 0 to 7 (caller-assigned Antman 2000 TIMI UA/NSTEMI total as used in Than 2012 ADAPT). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/adapt"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"new_ischemic_ecg":"false","timi_score":"0","troponin_0_elevated":"false","troponin_2h_elevated":"false"},{"new_ischemic_ecg":"false","timi_score":"0","troponin_0_elevated":"false","troponin_2h_elevated":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/sofa-2":{"get":{"description":"Compute the Ranzani 2025 SOFA-2 score from oxygenation (PaO2/FiO2 or SpO2/FiO2), advanced respiratory support or ECMO, MAP and vasopressor doses, caller-assigned GCS, bilirubin, platelets, and creatinine, urine output, or RRT.\n\nWhen an agent needs the published Ranzani 2025 SOFA-2 total and must not use Vincent 1996 SOFA cutoffs or invent gastrointestinal or immune points.\n\nNot a medical device. Not a diagnosis of sepsis or organ failure and not a treatment order. magent does not examine the patient.\n\nRanzani 2025 SOFA-2 only. Not Vincent 1996 SOFA (use sofa). Gastrointestinal and immune systems are not in SOFA-2.\n\nGCS is a caller-assigned integer 3-15 (last pre-sedation GCS, or the motor scale when the three-domain GCS cannot be evaluated). Delirium-drug scoring is the caller's assignment that drugs were given to treat delirium.\n\nVasopressor points use the published dose as assigned by the caller; magent does not time the ≥1 h infusion. Norepinephrine is scored as the base. RRT eligibility, ECMO indication, mechanical circulatory support, and ceiling-of-treatment or resource-unavailable flags are caller-assigned. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"pao2_mm_hg","description":"Arterial PaO2 in mm Hg (20-700). Provide this with fio2, or spo2 with fio2 when PaO2 is unavailable. PaO2/FiO2 >300 scores 0; ≤300 scores 1; ≤225 scores 2; ≤150 with advanced ventilatory support scores 3; ≤75 with advanced ventilatory support scores 4. Respiratory ECMO scores 4 regardless of the ratio.","required":false,"schema":{"type":"number"},"example":"96"},{"in":"query","name":"spo2","description":"Pulse-oximetry SpO2 as a percent (50-97.9). Used with fio2 only when pao2_mm_hg is absent and SpO2 is <98 (Ranzani 2025). SpO2/FiO2 >300 scores 0; ≤300 scores 1; ≤250 scores 2; ≤200 with advanced ventilatory support scores 3; ≤120 with advanced ventilatory support or ECMO scores 4.","required":false,"schema":{"type":"number"},"example":"96"},{"in":"query","name":"fio2","description":"Inspired oxygen as a fraction (0.21-1.0), not a percent.","required":true,"schema":{"type":"number"},"example":"0.21"},{"in":"query","name":"advanced_ventilatory_support","description":"High-flow nasal cannula, CPAP, bilevel positive airway pressure, noninvasive ventilation, invasive mechanical ventilation, or long-term home ventilation (Ranzani 2025). true or false. Respiratory scores 3 and 4 require this, ventilatory_support_unavailable, or respiratory ECMO.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ecmo","description":"Respiratory ECMO of any form. true or false when provided; absent is false. true scores respiratory 4 regardless of PaO2/FiO2 or SpO2/FiO2 and does not by itself score cardiovascular points.","required":false,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ventilatory_support_unavailable","description":"Advanced ventilatory support not available or precluded by a ceiling of treatment (Ranzani 2025). true or false when provided; absent is false. When true, oxygenation ratios may score 3 or 4 without advanced_ventilatory_support.","required":false,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"platelets_10e9_l","description":"Platelets ×10^9/L, same as ×10^3/μL (1-2000). >150 scores 0; ≤150 scores 1; ≤100 scores 2; ≤80 scores 3; ≤50 scores 4.","required":true,"schema":{"type":"number"},"example":"200"},{"in":"query","name":"bilirubin_mg_dl","description":"Total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l. ≤1.20 scores 0; ≤3.0 scores 1; ≤6.0 scores 2; ≤12.0 scores 3; >12.0 scores 4.","required":false,"schema":{"type":"number"},"example":"0.8"},{"in":"query","name":"bilirubin_umol_l","description":"Total bilirubin in µmol/L (2-684). ≤20.6 scores 0; ≤51.3 scores 1; ≤102.6 scores 2; ≤205 scores 3; >205 scores 4.","required":false,"schema":{"type":"number"},"example":"13.7"},{"in":"query","name":"map_mm_hg","description":"Mean arterial pressure in mm Hg (20-180). MAP <70 with no vasopressor or inotrope scores 1 unless a higher cardiovascular band applies. When vasoactive_unavailable is true, MAP ≥70 scores 0; 60-69 scores 1; 50-59 scores 2; 40-49 scores 3; <40 scores 4.","required":true,"schema":{"type":"number"},"example":"80"},{"in":"query","name":"norepinephrine_ug_kg_min","description":"Norepinephrine as the base in µg/kg·min (0-10) when provided. Absent is 0. Summed with epinephrine: >0 to ≤0.2 scores 2; >0.2 to ≤0.4 scores 3; >0.4 scores 4. Low-dose plus any other vasopressor or inotrope scores 3; medium-dose plus any other, or mechanical circulatory support, scores 4.","required":false,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"epinephrine_ug_kg_min","description":"Epinephrine in µg/kg·min (0-10) when provided. Absent is 0. Added to norepinephrine for the published dose bands.","required":false,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"dopamine_ug_kg_min","description":"Dopamine in µg/kg·min (0-80) when provided. Absent is 0. As a single vasopressor: ≤20 scores 2; >20 to 40 scores 3; >40 scores 4. With norepinephrine, epinephrine, or another agent it counts as an other vasopressor or inotrope.","required":false,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"other_vasopressor_or_inotrope","description":"Any other vasopressor or inotrope (Ranzani 2025). true or false when provided; absent is false. Any dose scores cardiovascular 2 unless a higher norepinephrine/epinephrine or mechanical band applies.","required":false,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"mechanical_circulatory_support","description":"Mechanical circulatory support (veno-arterial ECMO, intra-aortic balloon pump, left ventricular assist device, or microaxial flow pump). true or false when provided; absent is false. true scores cardiovascular 4.","required":false,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"vasoactive_unavailable","description":"Vasoactive drugs unavailable or precluded by a ceiling of treatment (Ranzani 2025). true or false when provided; absent is false. When true, cardiovascular points use the MAP-only cutoffs unless mechanical_circulatory_support is true.","required":false,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"gcs","description":"Glasgow Coma Scale total as assigned by the caller (integer 3-15), including last pre-sedation GCS or the motor scale when the three-domain GCS cannot be evaluated. 15 scores 0; 13-14 scores 1; 9-12 scores 2; 6-8 scores 3; 3-5 scores 4. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"15"},{"in":"query","name":"delirium_drugs","description":"Drugs given to treat delirium (Ranzani 2025). true or false when provided; absent is false. true scores brain at least 1 even if GCS is 15.","required":false,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"creatinine_mg_dl","description":"Creatinine in mg/dL (0.1-20). Provide this, creatinine_umol_l, or rrt=true. ≤1.20 scores 0; ≤2.0 scores 1; ≤3.50 scores 2; >3.50 scores 3. Kidney is the max of creatinine, urine, and RRT.","required":false,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"creatinine_umol_l","description":"Creatinine in µmol/L (9-1768). ≤110 scores 0; ≤170 scores 1; ≤300 scores 2; >300 scores 3.","required":false,"schema":{"type":"number"},"example":"88"},{"in":"query","name":"urine_output_ml_kg_h","description":"Urine output in mL/kg/h (0-20) when provided. Provide oliguria_hours with this. <0.5 for 6-12 h scores 1; <0.5 for ≥12 h scores 2; <0.3 for ≥24 h or anuria (0 mL) for ≥12 h scores 3.","required":false,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"oliguria_hours","description":"Hours at the reported urine_output_ml_kg_h (0-72). Required when urine_output_ml_kg_h is provided.","required":false,"schema":{"type":"number"},"example":"8"},{"in":"query","name":"rrt","description":"Receiving renal replacement therapy or fulfilling published RRT criteria, including chronic use (Ranzani 2025). true or false when provided; absent is false. true scores kidney 4. Non-renal RRT is not scored; the caller assigns this flag.","required":false,"schema":{"type":"boolean"},"example":"false"}],"summary":"SOFA-2","operationId":"get_api_calc_sofa_2","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_sofa_2: SOFA-2 needs Ranzani 2025 six organ-system inputs in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sofa-2"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SOFA-2 (bulk)","operationId":"post_api_calc_sofa_2","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_sofa_2: SOFA-2 needs Ranzani 2025 six organ-system inputs in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sofa-2"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"advanced_ventilatory_support":"false","bilirubin_mg_dl":"0.8","creatinine_mg_dl":"1.0","fio2":"0.21","gcs":"15","map_mm_hg":"80","pao2_mm_hg":"96","platelets_10e9_l":"200"},{"advanced_ventilatory_support":"false","bilirubin_mg_dl":"0.8","creatinine_mg_dl":"1.0","fio2":"0.21","gcs":"15","map_mm_hg":"80","pao2_mm_hg":"96","platelets_10e9_l":"200"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/aspects":{"get":{"description":"Compute Barber 2000 ASPECTS as 10 minus the number of published MCA-territory regions with caller-assigned early ischemic change.\n\nWhen an agent already has caller-assigned early ischemic change flags for the ten published MCA-territory regions and needs the Barber 2000 ASPECTS total. magent does not read the CT, score posterior-circulation pc-ASPECTS, diagnose stroke, or issue a lytic order.\n\nNot a medical device. Not a diagnosis and not a lytic order. magent does not read the CT. Each of the ten published MCA-territory regions is a caller-assigned flag for early ischemic change.\n\nThis is Barber 2000 MCA-territory ASPECTS (C, L, IC, I, M1–M6). It is not posterior-circulation pc-ASPECTS.\n\nBarber 2000 used ASPECTS of 7 or less versus greater than 7 to discriminate 3-month independence from dependence and death, and states that this analysis is not a reason to exclude patients from thrombolysis. This tool returns score and max_score only. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"caudate","description":"Caudate (C). Caller-assigned early ischemic change in the published caudate region (Barber 2000). magent does not read the CT. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"lentiform","description":"Lentiform (L). Caller-assigned early ischemic change in the published lentiform region (Barber 2000). magent does not read the CT. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"internal_capsule","description":"Internal capsule (IC). Caller-assigned early ischemic change in the published internal-capsule region (Barber 2000). magent does not read the CT. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"insular_ribbon","description":"Insular ribbon (I). Caller-assigned early ischemic change in the published insular-ribbon region (Barber 2000). magent does not read the CT. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"m1","description":"Anterior MCA cortex (M1). Caller-assigned early ischemic change in the published M1 region (Barber 2000). magent does not read the CT. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"m2","description":"MCA cortex lateral to insular ribbon (M2). Caller-assigned early ischemic change in the published M2 region (Barber 2000). magent does not read the CT. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"m3","description":"Posterior MCA cortex (M3). Caller-assigned early ischemic change in the published M3 region (Barber 2000). magent does not read the CT. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"m4","description":"Anterior MCA territory immediately superior to M1, rostral to basal ganglia (M4). Caller-assigned early ischemic change in the published M4 region (Barber 2000). magent does not read the CT. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"m5","description":"Lateral MCA territory immediately superior to M2, rostral to basal ganglia (M5). Caller-assigned early ischemic change in the published M5 region (Barber 2000). magent does not read the CT. true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"m6","description":"Posterior MCA territory immediately superior to M3, rostral to basal ganglia (M6). Caller-assigned early ischemic change in the published M6 region (Barber 2000). magent does not read the CT. true or false.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"ASPECTS (Barber)","operationId":"get_api_calc_aspects","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_aspects_regions: ASPECTS inputs must match caller-assigned involvement of the ten published MCA regions. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/aspects"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ASPECTS (Barber) (bulk)","operationId":"post_api_calc_aspects","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_aspects_regions: ASPECTS inputs must match caller-assigned involvement of the ten published MCA regions. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/aspects"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"caudate":"false","insular_ribbon":"false","internal_capsule":"false","lentiform":"false","m1":"false","m2":"false","m3":"false","m4":"false","m5":"false","m6":"false"},{"caudate":"false","insular_ribbon":"false","internal_capsule":"false","lentiform":"false","m1":"false","m2":"false","m3":"false","m4":"false","m5":"false","m6":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/has-bled":{"get":{"description":"Compute the HAS-BLED bleeding-risk score from discrete clinical flags.\n\nWhen an agent needs AF bleeding-risk arithmetic and must not invent the point total from prose.\n\nNot a diagnosis and not a treatment or anticoagulation recommendation.\n\nLabile INR and other flags are caller-supplied. magent does not read an INR time-in-range. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Age >65 scores 1 (E).","required":true,"schema":{"type":"integer"},"example":"78"},{"in":"query","name":"hypertension","description":"Uncontrolled hypertension (H). true or false.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"abnormal_renal","description":"Abnormal renal function (A). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"abnormal_liver","description":"Abnormal liver function (A). true or false. Renal and liver each score 1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"stroke","description":"Prior stroke (S). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bleeding","description":"Bleeding history or predisposition (B). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"labile_inr","description":"Labile INR (L). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"drugs","description":"Concomitant antiplatelet or NSAID (D). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"alcohol","description":"Alcohol excess (D). true or false. Drugs and alcohol each score 1.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"HAS-BLED","operationId":"get_api_calc_has_bled","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/has-bled"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HAS-BLED (bulk)","operationId":"post_api_calc_has_bled","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/has-bled"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"abnormal_liver":"false","abnormal_renal":"false","age":"78","alcohol":"false","bleeding":"false","drugs":"false","hypertension":"true","labile_inr":"false","stroke":"false"},{"abnormal_liver":"false","abnormal_renal":"false","age":"78","alcohol":"false","bleeding":"false","drugs":"false","hypertension":"true","labile_inr":"false","stroke":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/nafcs":{"get":{"description":"Sum Hegele 2025 Table 3 NAFCS item points (age or early HTG onset, BMI, abdominal pain or pancreatitis, secondary factors, fasting TG, TG/TC ratio, apo B, and three published interactions) and return the 0–100 score plus ≥60 definite classical FCS and ≥45 very likely classical FCS flags. Not a diagnosis or genetic test.\n\nWhen an agent already has caller-assigned Hegele 2025 NAFCS clinical flags and fasting TG, TG/TC ratio, and apo B in published units and needs the published point total. magent does not examine the patient, assay lipids, sequence genes, or apply Simon Broome or Dutch Lipid Clinic Network FH criteria.\n\nNot a medical device and not a diagnosis of familial chylomicronemia syndrome or multifactorial chylomicronemia syndrome.\n\nmagent does not examine the patient, assay lipids, or sequence genes. The caller assigns age, onset, BMI vs threshold, abdominal history, secondary factors, and labs.\n\nNot a genetic test. Not Simon Broome. Not Dutch Lipid Clinic Network FH. Not the European Moulin FCS score.\n\nThe paper does not provide a score for infants under 1 year or for pregnancy. For age ≥10 the score assumes non-response to fibrates and high-dose omega-3 fatty acids (TG decrease <20%).\n\nA single fasting TG and TG/TC ratio stand in for Table 1 lab categories; all adult last-3 or child last-2 readings must meet the band as assigned by the caller. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_years","description":"Current age in whole years (1-120). Hegele 2025 Table 3: ages 1-9 score child_htg 12; ages ≥10 score early_htg_onset 12 only when htg_onset_before_age_10 is true. The score does not provide a value for infants <1 year. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"htg_onset_before_age_10","description":"Hypertriglyceridemia onset in infancy or childhood (before age 10) as assigned by the caller (Hegele 2025 Table 1). true or false. Scores 12 only when age_years ≥10. For ages 1-9, child_htg is scored from age and this flag does not add points. magent does not date onset.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bmi_below_threshold","description":"BMI <25.0 kg/m2 in adults or <85th percentile in children/adolescents as assigned by the caller (Hegele 2025 Table 3, 9 points). true or false. magent does not compute BMI or pediatric percentiles.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"abdominal_history","description":"Caller-assigned chylomicronemia-related abdominal history (Hegele 2025 Table 3): none (0), abdominal_pain = recurrent abdominal pain without pancreatitis (9), pancreatitis = history of pancreatitis with or without abdominal pain (16). magent does not diagnose pancreatitis.","required":true,"schema":{"type":"string","enum":["none","abdominal_pain","pancreatitis"]},"example":"none"},{"in":"query","name":"secondary_factors_present","description":"One or more secondary factors that may contribute to hypertriglyceridemia as assigned by the caller (Hegele 2025 Table 1: lifestyle, medications, clinical conditions). true (≥1, 0 points) or false (none, 11 points, plus published interactions). magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"tg_mg_dl","description":"Caller-assigned fasting triglycerides in mg/dL (440-20000) representing all readings used in the score (Hegele 2025 Table 1: last 3 labs in adults, last 2 in children). All readings >880 score 13. Provide exactly one of tg_mg_dl or tg_mmol_l. magent does not assay lipids.","required":false,"schema":{"type":"number"},"example":"500"},{"in":"query","name":"tg_mmol_l","description":"Caller-assigned fasting triglycerides in mmol/L (5-226). All readings >10 score 13. Provide exactly one of tg_mg_dl or tg_mmol_l. magent does not assay lipids.","required":false,"schema":{"type":"number"},"example":"8"},{"in":"query","name":"tg_tc_ratio_mg_dl","description":"Triglyceride/total-cholesterol ratio when both are in mg/dL (0.1-80). >8 scores 8 (Hegele 2025 Table 1). Provide exactly one of tg_tc_ratio_mg_dl or tg_tc_ratio_mmol_l. magent does not assay lipids.","required":false,"schema":{"type":"number"},"example":"5"},{"in":"query","name":"tg_tc_ratio_mmol_l","description":"Triglyceride/total-cholesterol ratio when both are in mmol/L (0.1-35). >3.5 scores 8. Provide exactly one of tg_tc_ratio_mg_dl or tg_tc_ratio_mmol_l. magent does not assay lipids.","required":false,"schema":{"type":"number"},"example":"2"},{"in":"query","name":"apo_b_g_l","description":"Apolipoprotein B in g/L (0.1-3.0). <1.0 scores 12 (Hegele 2025 Table 3). Provide exactly one of apo_b_g_l or apo_b_mg_dl. 1.0 g/L = 100 mg/dL in the paper. magent does not assay apo B.","required":false,"schema":{"type":"number"},"example":"1.2"},{"in":"query","name":"apo_b_mg_dl","description":"Apolipoprotein B in mg/dL (10-300). <100 scores 12. Provide exactly one of apo_b_g_l or apo_b_mg_dl. magent does not assay apo B.","required":false,"schema":{"type":"number"},"example":"120"}],"summary":"NAFCS","operationId":"get_api_calc_nafcs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, age_years, all_tg_severely_elevated, high_tg_tc_ratio, low_apo_b, definite_classical_fcs, very_likely_classical_fcs, components, citation, disclaimer."},"400":{"description":"invalid_nafcs: NAFCS needs Hegele North American familial chylomicronemia inputs in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nafcs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"NAFCS (bulk)","operationId":"post_api_calc_nafcs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_nafcs: NAFCS needs Hegele North American familial chylomicronemia inputs in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nafcs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"abdominal_history":"none","age_years":"40","apo_b_g_l":"1.2","bmi_below_threshold":"false","htg_onset_before_age_10":"false","secondary_factors_present":"true","tg_mg_dl":"500","tg_tc_ratio_mg_dl":"5"},{"abdominal_history":"none","age_years":"40","apo_b_g_l":"1.2","bmi_below_threshold":"false","htg_onset_before_age_10":"false","secondary_factors_present":"true","tg_mg_dl":"500","tg_tc_ratio_mg_dl":"5"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mbig":{"get":{"description":"Apply the Khan 2020 modified Brain Injury Guidelines and return mBIG tier 1, 2, or 3 from caller-assigned GCS, neurologic findings, medications, ethanol, skull fracture, and hematoma sizes.\n\nWhen an agent already has caller-assigned mild-TBI findings and CT hematoma sizes for an adult with traumatic ICH and needs the 2020 mBIG tier, not original Joseph 2014 BIG, not PECARN, and not Canadian CT Head.\n\nNot a medical device. Not a diagnosis. Not a neurosurgical plan or observation-order.\n\nKhan 2020 is for adults with mild TBI and traumatic ICH. magent does not read CT, measure hematoma thickness, assay ethanol, or compute GCS. All inputs are caller-assigned.\n\nThis is the 2020 modified Brain Injury Guidelines, not original Joseph 2014 BIG. Any EDH is mBIG 3. Anticoagulant or antiplatelet excluding aspirin alone is mBIG 3; aspirin monotherapy is not scored as mBIG 3 on this API.\n\nDischarge requiring GCS 15 and published observation hours are not returned. Neurologic deterioration is not scored here. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"gcs","description":"Caller-assigned Glasgow Coma Scale total, integer 3-15. Khan 2020 methods: GCS of 12 or less is an abnormal neurologic examination and is mBIG 3. magent does not compute eye, verbal, or motor GCS.","required":true,"schema":{"type":"integer"},"example":"15"},{"in":"query","name":"focal_neuro_or_pupillary_abnormality","description":"Focal neurologic deficit or abnormal pupillary findings as assigned by the caller (Khan 2020 abnormal neurologic examination). true or false. true is mBIG 3. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ac_ap_excluding_aspirin","description":"Anticoagulant or antiplatelet therapy excluding aspirin alone, as assigned by the caller. true or false. true is mBIG 3. Aspirin monotherapy is false. magent does not read a medication list.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"etoh_gt_80","description":"Blood alcohol concentration >80 mg/dL as assigned by the caller (Khan 2020 intoxication definition, US legal driving limit). true or false. true excludes mBIG 1 (mBIG 2 unless a mBIG 3 feature is also met). magent does not assay ethanol.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"skull_fracture","description":"Skull fracture as assigned by the caller from CT: none (mBIG 1 row), nondisplaced (mBIG 2), or displaced (mBIG 3). magent does not read CT.","required":true,"schema":{"type":"string","enum":["none","nondisplaced","displaced"]},"example":"none"},{"in":"query","name":"sdh_mm","description":"Largest subdural hematoma thickness in millimetres as assigned by the caller (0-40). mBIG 1 if <4, mBIG 2 if >=4 and <8, mBIG 3 if >=8. magent does not measure SDH or read CT.","required":true,"schema":{"type":"number"},"example":"3"},{"in":"query","name":"iph_mm","description":"Largest intraparenchymal hemorrhage size in millimetres as assigned by the caller (0-40). mBIG 1 if <4, mBIG 2 if >=4 and <8, mBIG 3 if >=8. Use 0 when no IPH. magent does not measure IPH or read CT.","required":true,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"multiple_iph","description":"Multiple intraparenchymal hemorrhages as assigned by the caller. true or false. true is mBIG 3. magent does not count lesions on CT.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"sah_pattern","description":"Traumatic SAH pattern as assigned by the caller from Khan 2020 sulci/hemisphere definitions that replace original BIG trace/localized/scattered: none_or_trace (<=3 sulci and <1 mm), localized (one hemisphere, >3 sulci, 1-3 mm), or scattered (bi-hemispheric or >3 mm). magent does not read CT.","required":true,"schema":{"type":"string","enum":["none_or_trace","localized","scattered"]},"example":"none_or_trace"},{"in":"query","name":"sah_mm","description":"SAH thickness in millimetres as assigned by the caller (0-20). mBIG 1 if <1, mBIG 2 if 1-3, mBIG 3 if >3. Use 0 when none. Combined with sah_pattern; either scattered pattern or >3 mm is mBIG 3. magent does not measure SAH.","required":true,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"edh","description":"Any epidural hematoma as assigned by the caller. true or false. Any EDH is mBIG 3 (Khan 2020 safety modification versus original BIG size bands). magent does not read CT.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ivh","description":"Intraventricular hemorrhage as assigned by the caller. true or false. true is mBIG 3. magent does not read CT.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"modified Brain Injury Guidelines (mBIG)","operationId":"get_api_calc_mbig","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, mbig_tier, gcs, sdh_mm, iph_mm, sah_mm, skull_fracture, sah_pattern, criteria, citation, disclaimer."},"400":{"description":"invalid_gcs_total: gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.; invalid_sdh_mm: sdh_mm must be a number from 0 to 40 (Khan 2020 mBIG subdural thickness mm). Returned before settlement; you are not charged.; invalid_iph_mm: iph_mm must be a number from 0 to 40 (Khan 2020 mBIG intraparenchymal hemorrhage mm). Returned before settlement; you are not charged.; invalid_sah_mm: sah_mm must be a number from 0 to 20 (Khan 2020 mBIG subarachnoid thickness mm). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mbig"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"modified Brain Injury Guidelines (mBIG) (bulk)","operationId":"post_api_calc_mbig","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_gcs_total: gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.; invalid_sdh_mm: sdh_mm must be a number from 0 to 40 (Khan 2020 mBIG subdural thickness mm). Returned before settlement; you are not charged.; invalid_iph_mm: iph_mm must be a number from 0 to 40 (Khan 2020 mBIG intraparenchymal hemorrhage mm). Returned before settlement; you are not charged.; invalid_sah_mm: sah_mm must be a number from 0 to 20 (Khan 2020 mBIG subarachnoid thickness mm). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mbig"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ac_ap_excluding_aspirin":"false","edh":"false","etoh_gt_80":"false","focal_neuro_or_pupillary_abnormality":"false","gcs":"15","iph_mm":"0","ivh":"false","multiple_iph":"false","sah_mm":"0","sah_pattern":"none_or_trace","sdh_mm":"3","skull_fracture":"none"},{"ac_ap_excluding_aspirin":"false","edh":"false","etoh_gt_80":"false","focal_neuro_or_pupillary_abnormality":"false","gcs":"15","iph_mm":"0","ivh":"false","multiple_iph":"false","sah_mm":"0","sah_pattern":"none_or_trace","sdh_mm":"3","skull_fracture":"none"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ie-mortality":{"get":{"description":"Compute the Park 2016 ICE simplified risk score for 6-month mortality in infective endocarditis from age and caller-assigned Table 5 flags, and return the score, quadratic 6-month mortality percent, and whether score >= 8.\n\nWhen an agent already has Park 2016 Table 5 inputs (age, dialysis, nosocomial or prosthetic IE, symptom duration, organism, vegetation site, NYHA class 3 or 4, stroke, paravalvular complication, persistent bacteremia, and whether surgery was performed) and needs the published simplified score and 6-month mortality percent, not a diagnosis or a surgery decision.\n\nNot a medical device. Not a diagnosis of infective endocarditis.\n\nmagent does not examine the patient, interpret cultures or echocardiography, or decide surgery. Flags are caller-assigned.\n\nTable 5 simplified risk score only (Park 2016 ICE). Does not apply Table 6 quintile bands. score_ge_8 is the paper ROC operating point (simplified score >= 8), not a treatment cutoff.\n\nStaphylococcus aureus and viridans group streptococci are independent Table 5 rows; both may be true.\n\nAge 18-120 is the magent adult clamp via Params.age/1, not a published Park 2016 age range. Not Durack 1994 Duke diagnostic criteria. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120). Park 2016 Table 5: <=45 scores 0; 46-60 scores 2; 61-70 scores 3; >70 scores 4. Age 45 scores 0; 46 scores 2; 70 scores 3; 71 scores 4. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"dialysis","description":"History of dialysis as assigned by the caller (Park 2016 Table 5). true or false. +3 if true. magent does not review dialysis records.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"nosocomial_ie","description":"Nosocomial infective endocarditis as assigned by the caller (Park 2016 Table 5). true or false. +2 if true. magent does not classify acquisition.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"prosthetic_ie","description":"Prosthetic-valve infective endocarditis as assigned by the caller (Park 2016 Table 5). true or false. +1 if true. magent does not examine the valve.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"symptoms_gt_1_month","description":"Symptoms for more than 1 month before admission as assigned by the caller (Park 2016 Table 5). true or false. -1 if true. magent does not date symptom onset.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"staphylococcus_aureus","description":"Staphylococcus aureus as assigned by the caller (Park 2016 Table 5). true or false. +1 if true. Independent of viridans_group_streptococci; both may be true. magent does not interpret cultures.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"viridans_group_streptococci","description":"Viridans group streptococci as assigned by the caller (Park 2016 Table 5). true or false. -2 if true. Independent of staphylococcus_aureus; both may be true. magent does not interpret cultures.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"aortic_vegetation","description":"Aortic vegetation as assigned by the caller (Park 2016 Table 5). true or false. +1 if true. Independent of mitral_vegetation. magent does not read an echocardiogram.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"mitral_vegetation","description":"Mitral vegetation as assigned by the caller (Park 2016 Table 5). true or false. +1 if true. Independent of aortic_vegetation. magent does not read an echocardiogram.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"nyha_class_3_or_4","description":"NYHA class 3 or 4 heart failure as assigned by the caller (Park 2016 Table 5). true or false. +3 if true. magent does not examine the patient or assign NYHA class.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"stroke","description":"Stroke as assigned by the caller (Park 2016 Table 5). true or false. +2 if true. magent does not diagnose stroke.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"paravalvular_complication","description":"Paravalvular complication as assigned by the caller (Park 2016 Table 5). true or false. +2 if true. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"persistent_bacteremia","description":"Persistent bacteremia as assigned by the caller (Park 2016 Table 5). true or false. +2 if true. magent does not interpret cultures.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"surgical_treatment","description":"Surgical treatment as assigned by the caller (Park 2016 Table 5). true or false. -2 if true. magent does not decide surgery.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"IE mortality","operationId":"get_api_calc_ie_mortality","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, mortality_percent, score_ge_8, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ie-mortality"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"IE mortality (bulk)","operationId":"post_api_calc_ie_mortality","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ie-mortality"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","aortic_vegetation":"false","dialysis":"false","mitral_vegetation":"false","nosocomial_ie":"false","nyha_class_3_or_4":"false","paravalvular_complication":"false","persistent_bacteremia":"false","prosthetic_ie":"false","staphylococcus_aureus":"false","stroke":"false","surgical_treatment":"false","symptoms_gt_1_month":"false","viridans_group_streptococci":"false"},{"age":"40","aortic_vegetation":"false","dialysis":"false","mitral_vegetation":"false","nosocomial_ie":"false","nyha_class_3_or_4":"false","paravalvular_complication":"false","persistent_bacteremia":"false","prosthetic_ie":"false","staphylococcus_aureus":"false","stroke":"false","surgical_treatment":"false","symptoms_gt_1_month":"false","viridans_group_streptococci":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/add-rs":{"get":{"description":"Count how many of the three Rogers 2011 ADD-RS high-risk categories have at least one marker and return the published 0 / 1 / 2-3 band.\n\nWhen an agent needs the published ADD-RS category count (0–3) and must not invent an imaging order, treat the score as ADvISED D-dimer rule-out, or treat score 0 as exclusion of dissection.\n\nNot a medical device.\n\nNot an imaging order and not a diagnosis of aortic dissection.\n\nNot the ADvISED D-dimer rule-out pathway. magent does not interpret D-dimer.\n\nScore 0 does not exclude dissection. Rogers 2011 operationalizes the 2010 ACCF/AHA high-risk markers as three categories; two markers in one category still add only 1.\n\nFlags are caller-assigned. magent does not examine the patient. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"marfan_or_connective_tissue","description":"Marfan syndrome or other connective-tissue disease (Rogers 2011 high-risk condition). true or false. Caller-assigned; magent does not diagnose a syndrome.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"family_aortic_disease","description":"Family history of aortic disease (Rogers 2011 high-risk condition). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"known_aortic_valve_disease","description":"Known aortic valve disease (Rogers 2011 high-risk condition). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"recent_aortic_manipulation","description":"Recent aortic manipulation such as catheterization or cardiac surgery (Rogers 2011 high-risk condition). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"known_thoracic_aneurysm","description":"Known thoracic aortic aneurysm (Rogers 2011 high-risk condition). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pain_sudden","description":"Chest, back, or abdominal pain of abrupt onset (Rogers 2011 high-risk pain feature). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pain_severe","description":"Chest, back, or abdominal pain of severe intensity (Rogers 2011 high-risk pain feature). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pain_ripping_or_tearing","description":"Chest, back, or abdominal pain described as ripping or tearing (Rogers 2011 high-risk pain feature). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulse_deficit_or_sbp_differential","description":"Pulse deficit or systolic blood-pressure differential (Rogers 2011 high-risk exam feature). true or false. Caller-assigned; magent does not measure pulses.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"focal_neuro_deficit_with_pain","description":"Focal neurologic deficit in conjunction with pain (Rogers 2011 high-risk exam feature). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"new_ai_murmur_with_pain","description":"New murmur of aortic insufficiency in conjunction with pain (Rogers 2011 high-risk exam feature). true or false. Caller-assigned; magent does not auscultate.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypotension_or_shock","description":"Hypotension or shock state (Rogers 2011 high-risk exam feature). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"ADD-RS","operationId":"get_api_calc_add_rs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, add_rs_band, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/add-rs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ADD-RS (bulk)","operationId":"post_api_calc_add_rs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/add-rs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"family_aortic_disease":"false","focal_neuro_deficit_with_pain":"false","hypotension_or_shock":"false","known_aortic_valve_disease":"false","known_thoracic_aneurysm":"false","marfan_or_connective_tissue":"false","new_ai_murmur_with_pain":"false","pain_ripping_or_tearing":"false","pain_severe":"false","pain_sudden":"false","pulse_deficit_or_sbp_differential":"false","recent_aortic_manipulation":"false"},{"family_aortic_disease":"false","focal_neuro_deficit_with_pain":"false","hypotension_or_shock":"false","known_aortic_valve_disease":"false","known_thoracic_aneurysm":"false","marfan_or_connective_tissue":"false","new_ai_murmur_with_pain":"false","pain_ripping_or_tearing":"false","pain_severe":"false","pain_sudden":"false","pulse_deficit_or_sbp_differential":"false","recent_aortic_manipulation":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/bap-65":{"get":{"description":"Apply Tabak 2009 BAP-65 and return class I–V from three caller-assigned main factors, using age >65 only to split class I from II when zero main factors are present.\n\nWhen an agent already has BUN, mental status, pulse, and age assigned as Tabak 2009 flags for an adult with acute exacerbation of COPD and needs the published BAP-65 class. magent does not compute GCS, BUN, or pulse.\n\nNot a medical device.\n\nNot a mechanical-ventilation, ICU-admission, or early-discharge order. magent does not diagnose COPD exacerbation.\n\nThe caller assigns bun_gt_25, altered_mental_status, pulse_gt_109, and age_gt_65 as already determined. magent does not compute GCS, BUN, or pulse.\n\nAge >65 is not a fourth additive point. It splits class I from class II only when zero of the three main factors are present. Classes III–V ignore age.\n\nIn-hospital mortality figures in Tabak 2009 are 0.3% for no factors and age ≤65 versus 13.1% (derivation) / 14.6% (validation) when all three main factors are present. Per-class percents for II–IV are not attached. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"bun_gt_25","description":"BUN >25 mg/dL (strict greater than; 25 does not meet). true or false as assigned by the caller. magent does not compute BUN.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"altered_mental_status","description":"GCS <14 or physician designation of disoriented, stupor, or coma (Tabak 2009). true or false as assigned by the caller. magent does not compute GCS.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulse_gt_109","description":"Pulse >109/min (strict greater than; 109 does not meet). true or false as assigned by the caller. magent does not compute pulse.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"age_gt_65","description":"Age >65 years (strict greater than). Used only when zero of the three main factors are present, to split class I from II. true or false as assigned by the caller. magent does not compute age.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"BAP-65","operationId":"get_api_calc_bap_65","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, bap65_class, main_factor_count, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bap-65"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"BAP-65 (bulk)","operationId":"post_api_calc_bap_65","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bap-65"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_gt_65":"false","altered_mental_status":"false","bun_gt_25":"false","pulse_gt_109":"false"},{"age_gt_65":"false","altered_mental_status":"false","bun_gt_25":"false","pulse_gt_109":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/atropine-op":{"get":{"description":"Compute the Eddleston 2004 atropine maintenance infusion band (10-20% of the total atropine required to stabilize, every hour) from a caller-assigned loading milligram amount. Not doubling-bolus titration.\n\nWhen an agent needs the Eddleston 2004 hourly atropine maintenance band from a caller-assigned total loading milligram amount and must not invent doubling-bolus titration, pralidoxime, or a diagnosis of organophosphate poisoning.\n\nNot a medical device. A licensed clinician remains responsible for interpretation.\n\nNot a prescription. magent does not choose a vial, route, or infusion pump setting.\n\nNot doubling-bolus titration. Loading boluses are bedside titration; this tool is the post-stabilization hourly infusion band only.\n\nNot pralidoxime. magent does not compute oxime dose.\n\nmagent does not examine the chest or pulse and does not diagnose organophosphate poisoning. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"atropine_load_mg","description":"Caller-assigned total atropine loading milligrams already used to stabilize (0.6-200). magent does not choose loading boluses.","required":true,"schema":{"type":"number"},"example":"18"}],"summary":"Atropine maintenance infusion","operationId":"get_api_calc_atropine_op","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, atropine_load_mg, infusion_low_mg_h, infusion_high_mg_h, citation, disclaimer."},"400":{"description":"invalid_atropine: Atropine infusion inputs must match Eddleston 2004 total loading milligrams from that protocol. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/atropine-op"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Atropine maintenance infusion (bulk)","operationId":"post_api_calc_atropine_op","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_atropine: Atropine infusion inputs must match Eddleston 2004 total loading milligrams from that protocol. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/atropine-op"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"atropine_load_mg":"18"},{"atropine_load_mg":"18"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/psadt":{"get":{"description":"Compute Pound 1999 PSA doubling time from two rising PSA values and the months between them using two-point first-order kinetics, and report the 10-month prognostic split.\n\nWhen an agent already has two rising detectable PSA values and the interval in months and must not invent a 3-point least-squares slope, Gleason, time-to-recurrence tables, or treat doubling time as a treatment order.\n\nNot a medical device. magent does not measure PSA or diagnose recurrence or metastasis.\n\nTwo-point first-order kinetics only: psadt_months = ln(2) × interval_months / ln(psa2_ng_ml / psa1_ng_ml). Does not implement 3-point least-squares, Gleason, or time-to-recurrence algorithm tables.\n\nPound 1999 split is PSADT of 10 months or less versus greater than 10. Exactly 10.0 is <=10. Not a treatment order.\n\nEach PSA is 0.2-10000 ng/mL (Pound biochemical recurrence used detectable PSA ≥0.2 ng/mL). psa2_ng_ml must be greater than psa1_ng_ml. interval_months is 0.25-120 (magent clamp). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"psa1_ng_ml","description":"Earlier serum PSA in ng/mL (0.2-10000). Pound biochemical recurrence used detectable PSA ≥0.2 ng/mL. magent does not measure PSA.","required":true,"schema":{"type":"number"},"example":"0.4"},{"in":"query","name":"psa2_ng_ml","description":"Later serum PSA in ng/mL (0.2-10000). Must be greater than psa1_ng_ml (rising). magent does not measure PSA.","required":true,"schema":{"type":"number"},"example":"0.8"},{"in":"query","name":"interval_months","description":"Months between the two PSA values (0.25-120, magent clamp). Pound 1999 does not publish an input band for this two-point tool.","required":true,"schema":{"type":"number"},"example":"10"}],"summary":"PSA doubling time","operationId":"get_api_calc_psadt","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, psa1_ng_ml, psa2_ng_ml, interval_months, psadt_months, pound_psadt_band, citation, disclaimer."},"400":{"description":"invalid_psadt: PSADT needs two rising PSA values (each 0.2-10000 ng/mL) and interval_months (0.25-120). Returned before settlement; you are not charged.; invalid_psa_interval: interval_months must be a number from 0.25 to 120. Returned before settlement; you are not charged.; invalid_rising_psa: psa2_ng_ml must be greater than psa1_ng_ml (rising PSA; Pound 1999). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/psadt"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PSA doubling time (bulk)","operationId":"post_api_calc_psadt","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_psadt: PSADT needs two rising PSA values (each 0.2-10000 ng/mL) and interval_months (0.25-120). Returned before settlement; you are not charged.; invalid_psa_interval: interval_months must be a number from 0.25 to 120. Returned before settlement; you are not charged.; invalid_rising_psa: psa2_ng_ml must be greater than psa1_ng_ml (rising PSA; Pound 1999). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/psadt"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"interval_months":"10","psa1_ng_ml":"0.4","psa2_ng_ml":"0.8"},{"interval_months":"10","psa1_ng_ml":"0.4","psa2_ng_ml":"0.8"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/evendo":{"get":{"description":"Compute the Dong 2019 EVendo score from INR, AST, platelet count, BUN, hemoglobin, and ascites in US conventional units, rounded to 2 decimals, and whether that score is strictly below the published 3.90 cutoff.\n\nWhen an agent already has INR, AST, platelets, BUN, hemoglobin, and an ascites assignment and needs the published Dong 2019 EVendo arithmetic and 3.90 cutoff, not a varices diagnosis, endoscopy order, or invented risk class.\n\nNot a medical device. Not a varices diagnosis or an endoscopy order. magent does not assay labs.\n\nDong 2019 published cutoff is strictly below 3.90 (an EVendo score below 3.90 would have spared EGDs). magent does not invent extra risk classes or endoscopy-sparing percents.\n\nUS conventional units only (AST U/L, platelets 10^3/µL, BUN mg/dL, hemoglobin g/dL). magent does not convert SI units.\n\nAscites is a caller-assigned flag. magent does not examine the abdomen. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"inr","description":"International normalized ratio (0.8-4.0, magent clamp). Dong 2019 uses INR. Rejects non-positive INR. magent does not assay coagulation.","required":true,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"ast_u_l","description":"Aspartate aminotransferase in U/L (5-4000, magent clamp). US conventional units as in Dong 2019. Rejects non-positive AST. magent does not assay AST.","required":true,"schema":{"type":"number"},"example":"35"},{"in":"query","name":"platelets_k_ul","description":"Platelet count in 10^3/µL (10-800, magent clamp), the same unit as 10^9/L. US conventional units as in Dong 2019. Rejects non-positive platelets. magent does not assay platelets.","required":true,"schema":{"type":"number"},"example":"150"},{"in":"query","name":"bun_mg_dl","description":"Blood urea nitrogen in mg/dL (2-150, magent clamp). US conventional units as in Dong 2019. Rejects non-positive BUN. magent does not assay BUN.","required":true,"schema":{"type":"number"},"example":"20"},{"in":"query","name":"hemoglobin_g_dl","description":"Hemoglobin in g/dL (4-20, magent clamp). US conventional units as in Dong 2019. Rejects non-positive hemoglobin. magent does not assay hemoglobin.","required":true,"schema":{"type":"number"},"example":"15"},{"in":"query","name":"ascites","description":"Clinically evident ascites as assigned by the caller (Dong 2019). true adds 1 to the score; false adds 0. true or false. magent does not examine the abdomen.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"EVendo","operationId":"get_api_calc_evendo","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, inr, ast_u_l, platelets_k_ul, bun_mg_dl, hemoglobin_g_dl, ascites, evendo, below_cutoff_3_90, citation, disclaimer."},"400":{"description":"invalid_evendo: EVendo inputs must be numeric INR, AST, platelets, BUN, and hemoglobin plus ascites as used in Dong 2019. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/evendo"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"EVendo (bulk)","operationId":"post_api_calc_evendo","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_evendo: EVendo inputs must be numeric INR, AST, platelets, BUN, and hemoglobin plus ascites as used in Dong 2019. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/evendo"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ascites":"false","ast_u_l":"35","bun_mg_dl":"20","hemoglobin_g_dl":"15","inr":"1.0","platelets_k_ul":"150"},{"ascites":"false","ast_u_l":"35","bun_mg_dl":"20","hemoglobin_g_dl":"15","inr":"1.0","platelets_k_ul":"150"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/hct-ci":{"get":{"description":"Sum the Sorror 2005 HCT-specific comorbidity index weights and return low (0), intermediate (1–2), or high (≥3).\n\nWhen an agent needs the published HCT-CI point total and risk group from caller-assigned comorbidities and must not substitute Charlson weights or invent a transplant listing.\n\nNot a medical device and not a diagnosis. Not a transplant listing. magent does not examine the patient.\n\nThis is the Sorror 2005 HCT-CI, not the Charlson comorbidity index. Weights are the HCT-CI published integers, not Charlson weights.\n\nmagent does not interpret PFTs, echo, BMI, or laboratory values. The caller assigns each comorbidity as present or absent, including the published pulmonary and hepatic grades.\n\nModerate and severe pulmonary grades are mutually exclusive. Mild and moderate/severe hepatic grades are mutually exclusive. Both-true returns HTTP 400. Mild pulmonary and mild renal are not scored in Sorror 2005.\n\nRisk groups follow Sorror 2005 (0 low, 1–2 intermediate, ≥3 high). JSON does not include unofficial survival percentages. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"arrhythmia","description":"Arrhythmia as assigned by the caller (Sorror 2005: atrial fibrillation or flutter, sick sinus syndrome, or ventricular arrhythmias). true scores 1. magent does not diagnose arrhythmia.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cardiac","description":"Cardiac comorbidity as assigned by the caller (Sorror 2005: coronary artery disease, congestive heart failure, myocardial infarction, or ejection fraction ≤50%). true scores 1. magent does not interpret echo or diagnose cardiac disease.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"inflammatory_bowel_disease","description":"Inflammatory bowel disease as assigned by the caller (Sorror 2005: Crohn disease or ulcerative colitis). true scores 1. magent does not diagnose IBD.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"diabetes","description":"Diabetes requiring insulin or oral hypoglycemics, not diet alone, as assigned by the caller (Sorror 2005). true scores 1. magent does not diagnose diabetes.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cerebrovascular_disease","description":"Cerebrovascular disease as assigned by the caller (Sorror 2005: TIA or cerebrovascular accident). true scores 1. magent does not diagnose stroke or TIA.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"psychiatric_disturbance","description":"Psychiatric disturbance as assigned by the caller (Sorror 2005: depression or anxiety requiring psychiatric consult or treatment). true scores 1. magent does not diagnose psychiatric disease.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"mild_hepatic","description":"Mild hepatic comorbidity as assigned by the caller (Sorror 2005: chronic hepatitis, bilirubin >ULN to 1.5×ULN, or AST/ALT >ULN to 2.5×ULN). true scores 1. Mutually exclusive with moderate_severe_hepatic. magent does not grade liver tests.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"obesity","description":"Obesity as assigned by the caller (Sorror 2005: body mass index >35 kg/m²). true scores 1. magent does not compute BMI.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"infection","description":"Infection requiring continuation of antimicrobial treatment after day 0 as assigned by the caller (Sorror 2005). true scores 1. magent does not diagnose infection.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"rheumatologic","description":"Rheumatologic comorbidity as assigned by the caller (Sorror 2005: SLE, RA, polymyositis, mixed CTD, or polymyalgia rheumatica). true scores 2. magent does not diagnose rheumatologic disease.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"peptic_ulcer","description":"Peptic ulcer requiring treatment as assigned by the caller (Sorror 2005). true scores 2. magent does not diagnose ulcer disease.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"moderate_severe_renal","description":"Moderate/severe renal comorbidity as assigned by the caller (Sorror 2005: serum creatinine >2 mg/dL, dialysis, or prior renal transplantation). true scores 2. magent does not grade kidney disease from creatinine.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"moderate_pulmonary","description":"Moderate pulmonary comorbidity as assigned by the caller (Sorror 2005: DLco and/or FEV1 66%–80% or dyspnea on slight activity). true scores 2. Mutually exclusive with severe_pulmonary. magent does not interpret PFTs.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"prior_solid_tumor","description":"Prior solid tumor treated at any time, excluding nonmelanoma skin cancer, as assigned by the caller (Sorror 2005). true scores 3. magent does not diagnose cancer.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"heart_valve_disease","description":"Heart valve disease except mitral valve prolapse as assigned by the caller (Sorror 2005). true scores 3. magent does not interpret echo.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"severe_pulmonary","description":"Severe pulmonary comorbidity as assigned by the caller (Sorror 2005: DLco and/or FEV1 ≤65% or dyspnea at rest or requiring oxygen). true scores 3. Mutually exclusive with moderate_pulmonary. magent does not interpret PFTs.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"moderate_severe_hepatic","description":"Moderate/severe hepatic comorbidity as assigned by the caller (Sorror 2005: cirrhosis, bilirubin >1.5×ULN, or AST/ALT >2.5×ULN). true scores 3. Mutually exclusive with mild_hepatic. magent does not grade liver tests.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"HCT-CI","operationId":"get_api_calc_hct_ci","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk_group, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_hct_ci: each HCT-CI 2005 comorbidity must be scored as in Sorror 2005. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hct-ci"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HCT-CI (bulk)","operationId":"post_api_calc_hct_ci","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_hct_ci: each HCT-CI 2005 comorbidity must be scored as in Sorror 2005. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hct-ci"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"arrhythmia":"false","cardiac":"false","cerebrovascular_disease":"false","diabetes":"false","heart_valve_disease":"false","infection":"false","inflammatory_bowel_disease":"false","mild_hepatic":"false","moderate_pulmonary":"false","moderate_severe_hepatic":"false","moderate_severe_renal":"false","obesity":"false","peptic_ulcer":"false","prior_solid_tumor":"false","psychiatric_disturbance":"false","rheumatologic":"false","severe_pulmonary":"false"},{"arrhythmia":"false","cardiac":"false","cerebrovascular_disease":"false","diabetes":"false","heart_valve_disease":"false","infection":"false","inflammatory_bowel_disease":"false","mild_hepatic":"false","moderate_pulmonary":"false","moderate_severe_hepatic":"false","moderate_severe_renal":"false","obesity":"false","peptic_ulcer":"false","prior_solid_tumor":"false","psychiatric_disturbance":"false","rheumatologic":"false","severe_pulmonary":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mirels":{"get":{"description":"Sum the Mirels 1989 score for diagnosing impending pathologic fractures in long-bone metastatic disease from four caller-assigned items and return the published 4–12 integer total and band (≤7 / 8 / ≥9). Not an operative order and not SINS.\n\nWhen an agent has already assigned Mirels 1989 site, size, nature, and pain for metastatic disease in a long bone and needs the published integer sum and band, not a surgical order and not SINS (neoplastic spinal instability).\n\nNot a medical device. magent does not read radiographs. Site, size, nature, and pain are caller-assigned.\n\nNot an operative order. Bands ≤7 (le_7), 8, and ≥9 (ge_9) follow Mirels 1989; they are not a surgical command.\n\nNot SINS (Fisher 2010 neoplastic spinal instability). This tool is Mirels 1989 for metastatic disease in long bones.\n\nPain 3 is functional (pain that is functional), not severe. magent does not interview the patient. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"site","description":"Caller-assigned site (Mirels 1989). upper (upper limb) scores 1; lower (lower limb) scores 2; peritrochanteric scores 3. magent does not read radiographs.","required":true,"schema":{"type":"string","enum":["upper","lower","peritrochanteric"]},"example":"upper"},{"in":"query","name":"size","description":"Caller-assigned lesion size relative to bone diameter (Mirels 1989). lt_one_third (<1/3) scores 1; one_to_two_thirds (1/3–2/3) scores 2; gt_two_thirds (>2/3) scores 3. magent does not read radiographs.","required":true,"schema":{"type":"string","enum":["lt_one_third","one_to_two_thirds","gt_two_thirds"]},"example":"lt_one_third"},{"in":"query","name":"nature","description":"Caller-assigned lesion nature (Mirels 1989). blastic scores 1; mixed scores 2; lytic scores 3. magent does not read radiographs.","required":true,"schema":{"type":"string","enum":["blastic","mixed","lytic"]},"example":"blastic"},{"in":"query","name":"pain","description":"Caller-assigned pain (Mirels 1989). mild scores 1; moderate scores 2; functional (pain that is functional) scores 3. Not severe. magent does not interview the patient.","required":true,"schema":{"type":"string","enum":["mild","moderate","functional"]},"example":"mild"}],"summary":"Mirels","operationId":"get_api_calc_mirels","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, mirels_band, site, size, nature, pain, components, citation, disclaimer."},"400":{"description":"invalid_mirels: site must be upper, lower, or peritrochanteric; size must be lt_one_third, one_to_two_thirds, or gt_two_thirds; nature must be blastic, mixed, or lytic; pain must be mild, moderate, or functional (Mirels 1989). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mirels"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Mirels (bulk)","operationId":"post_api_calc_mirels","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_mirels: site must be upper, lower, or peritrochanteric; size must be lt_one_third, one_to_two_thirds, or gt_two_thirds; nature must be blastic, mixed, or lytic; pain must be mild, moderate, or functional (Mirels 1989). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mirels"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"nature":"blastic","pain":"mild","site":"upper","size":"lt_one_third"},{"nature":"blastic","pain":"mild","site":"upper","size":"lt_one_third"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/reach-b":{"get":{"description":"Sum the Yang 2011 REACH-B 17-point score (sex, age 30-65, ALT, HBeAg, HBV DNA copies/mL) and return the published 3-, 5-, and 10-year HCC risk percents.\n\nWhen an agent has caller-assigned sex, age 30-65, ALT, HBeAg, and HBV DNA in copies/mL as in Yang 2011, and needs the published non-cirrhotic REVEAL-HBV score and table risks, not an IU/mL conversion and not a cirrhosis instrument.\n\nNot a medical device.\n\nNot a diagnosis of HCC and not a biopsy order.\n\nYang 2011 derivation excluded cirrhosis. Not for patients with cirrhosis. Not the later modified REACH-B that scores age >=65 as 7.\n\nAge must be 30-65 as in the derivation cohort. magent does not assay ALT or HBV DNA. HBV DNA is copies/mL as published; this tool does not convert IU/mL.\n\nHBV DNA >=1000000 copies/mL scores 4; 100000-999999 scores 5 (Yang 2011 table, non-monotonic). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sex","description":"female or male. Yang 2011: female scores 0; male scores 2.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"age","description":"Age in years. Yang 2011 derivation 30-65 only: 30-34 scores 0; 35-39 scores 1; 40-44 scores 2; 45-49 scores 3; 50-54 scores 4; 55-59 scores 5; 60-65 scores 6. Age 34 scores 0; 35 scores 1; 65 scores 6. Age outside 30-65 is rejected. This tool does not score age >=65 as 7.","required":true,"schema":{"type":"integer"},"example":"30"},{"in":"query","name":"alt_u_l","description":"Alanine aminotransferase in U/L (1-10000). Caller-assigned; magent does not assay ALT. Yang 2011: <15 scores 0; 15-44 scores 1; >=45 scores 2. ALT 14 scores 0; 15 and 44 score 1; 45 scores 2.","required":true,"schema":{"type":"number"},"example":"14"},{"in":"query","name":"hbeag_positive","description":"HBeAg positive as assigned by the caller (Yang 2011). true scores 2; false scores 0. magent does not assay HBeAg.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hbv_dna_copies_per_ml","description":"HBV DNA in copies/mL (integer 0-10000000000). Yang 2011 uses copies/mL, not IU/mL. magent does not assay HBV DNA and does not convert units. <300 scores 0; 300-9999 scores 0; 10000-99999 scores 3; 100000-999999 scores 5; >=1000000 scores 4 (non-monotonic: 10^6 scores 4, 10^5 to 10^6-1 scores 5).","required":true,"schema":{"type":"integer"},"example":"200"}],"summary":"REACH-B","operationId":"get_api_calc_reach_b","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk_3y_percent, risk_5y_percent, risk_10y_percent, sex, age_years, alt_u_l, hbeag_positive, hbv_dna_copies_per_ml, components, citation, disclaimer."},"400":{"description":"invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_alt: alt_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_hbv_dna: hbv_dna_copies_per_ml must be an integer from 0 to 10000000000 (Yang 2011 copies/mL). Returned before settlement; you are not charged.; invalid_reach_b: age must be 30-65, and each other REACH-B 2011 item must be a published category. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/reach-b"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"REACH-B (bulk)","operationId":"post_api_calc_reach_b","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_alt: alt_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_hbv_dna: hbv_dna_copies_per_ml must be an integer from 0 to 10000000000 (Yang 2011 copies/mL). Returned before settlement; you are not charged.; invalid_reach_b: age must be 30-65, and each other REACH-B 2011 item must be a published category. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/reach-b"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"30","alt_u_l":"14","hbeag_positive":"false","hbv_dna_copies_per_ml":"200","sex":"female"},{"age":"30","alt_u_l":"14","hbeag_positive":"false","hbv_dna_copies_per_ml":"200","sex":"female"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/lights":{"get":{"description":"Apply Light 1972 pleural fluid criteria from protein ratio, LDH ratio, and pleural LDH versus two-thirds the laboratory LDH upper limit of normal.\n\nWhen an agent needs Light 1972 transudate versus exudate arithmetic and must not invent Heffner abbreviated criteria, an NT-proBNP rule, or a cause of the effusion.\n\nNot a diagnosis of the cause of an effusion (for example CHF versus infection).\n\nNot Heffner's abbreviated two-test criteria and not an NT-proBNP rule.\n\nmagent does not interpret a chest x-ray.\n\nldh_uln_u_l is required; magent does not assume a laboratory ULN of 200 U/L.\n\nCutoffs are strictly greater than 0.5, 0.6, and two-thirds ULN (equality is not exudate by that criterion). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"pleural_protein_g_dl","description":"Pleural fluid protein in g/dL (0.1-20).","required":true,"schema":{"type":"number"},"example":"3.0"},{"in":"query","name":"serum_protein_g_dl","description":"Serum protein in g/dL (0.1-20).","required":true,"schema":{"type":"number"},"example":"6.0"},{"in":"query","name":"pleural_ldh_u_l","description":"Pleural fluid LDH in U/L (1-10000).","required":true,"schema":{"type":"number"},"example":"100"},{"in":"query","name":"serum_ldh_u_l","description":"Serum LDH in U/L (1-10000).","required":true,"schema":{"type":"number"},"example":"200"},{"in":"query","name":"ldh_uln_u_l","description":"Laboratory LDH upper limit of normal in U/L (50-2000). Required; magent does not assume 200.","required":true,"schema":{"type":"number"},"example":"200"}],"summary":"Light's criteria","operationId":"get_api_calc_lights","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, exudate, protein_ratio, ldh_ratio, ldh_two_thirds_uln, pleural_ldh_u_l, criteria, citation, disclaimer."},"400":{"description":"invalid_pleural_protein: pleural_protein_g_dl must be a number from 0.1 to 20. Returned before settlement; you are not charged.; invalid_serum_protein: serum_protein_g_dl must be a number from 0.1 to 20. Returned before settlement; you are not charged.; invalid_pleural_ldh: pleural_ldh_u_l must be a number from 1 to 10000. Returned before settlement; you are not charged.; invalid_serum_ldh: serum_ldh_u_l must be a number from 1 to 10000. Returned before settlement; you are not charged.; invalid_ldh_uln: ldh_uln_u_l must be a number from 50 to 2000. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/lights"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Light's criteria (bulk)","operationId":"post_api_calc_lights","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pleural_protein: pleural_protein_g_dl must be a number from 0.1 to 20. Returned before settlement; you are not charged.; invalid_serum_protein: serum_protein_g_dl must be a number from 0.1 to 20. Returned before settlement; you are not charged.; invalid_pleural_ldh: pleural_ldh_u_l must be a number from 1 to 10000. Returned before settlement; you are not charged.; invalid_serum_ldh: serum_ldh_u_l must be a number from 1 to 10000. Returned before settlement; you are not charged.; invalid_ldh_uln: ldh_uln_u_l must be a number from 50 to 2000. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/lights"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ldh_uln_u_l":"200","pleural_ldh_u_l":"100","pleural_protein_g_dl":"3.0","serum_ldh_u_l":"200","serum_protein_g_dl":"6.0"},{"ldh_uln_u_l":"200","pleural_ldh_u_l":"100","pleural_protein_g_dl":"3.0","serum_ldh_u_l":"200","serum_protein_g_dl":"6.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ho-index":{"get":{"description":"Sum the Ho 2004 day-3 IV-steroid score for severe ulcerative colitis from mean stool frequency, colonic dilatation, and hypoalbuminaemia, and return the published medical-therapy failure bands.\n\nWhen an agent already has the first-three-day mean stool frequency, a caller-assigned colonic-dilatation flag, and albumin during intravenous steroid treatment for severe ulcerative colitis and needs the published Ho 2004 point total and medical-therapy failure bands. magent does not count stools, read films, or measure albumin.\n\nNot a medical device.\n\nNot a colectomy order, second-line medical-therapy order, or surgery assignment. magent does not assign treatment.\n\nThis is Ho 2004 day-3 of intravenous steroids for severe ulcerative colitis only. Not Travis (day-3 stool count + CRP). Not Truelove and Witts.\n\nThe caller assigns mean_stool_frequency, colonic_dilatation, and albumin. magent does not count stools, read an abdominal film, or measure albumin. colonic_dilatation has no centimetre cutoff in this tool.\n\nEquality at 30 g/L is not hypoalbuminaemia. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"mean_stool_frequency","description":"Mean stool frequency over the first 3 days of IV steroids, as assigned by the caller (number 0-40). Ho 2004: <4 scores 0; 4 ≤ x < 6 scores 1; 6 ≤ x ≤ 9 scores 2; x > 9 scores 4. Exactly 6 and exactly 9 score 2. magent does not count stools.","required":true,"schema":{"type":"number"},"example":"3"},{"in":"query","name":"colonic_dilatation","description":"Caller-assigned colonic dilatation (Ho 2004). true scores 4; false scores 0. magent does not read an abdominal film and does not invent a centimetre cutoff.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"albumin_g_l","description":"Serum albumin in g/L (10-60). Provide this or albumin_g_dl, not both. Ho 2004 hypoalbuminaemia is <30 g/L (30 is not low). magent does not assay albumin.","required":false,"schema":{"type":"number"},"example":"35"},{"in":"query","name":"albumin_g_dl","description":"Serum albumin in g/dL (1-6). Converted as g/L = g/dL × 10. Provide this or albumin_g_l, not both.","required":false,"schema":{"type":"number"},"example":"3.5"}],"summary":"Ho index","operationId":"get_api_calc_ho_index","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk, medical_failure_percent, score_ge_4, mean_stool_frequency, colonic_dilatation, albumin_g_l, hypoalbuminaemia, components, citation, disclaimer."},"400":{"description":"invalid_ho_stools: mean_stool_frequency must be a number from 0 to 40 (Ho 2004 three-day mean). Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ho-index"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Ho index (bulk)","operationId":"post_api_calc_ho_index","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ho_stools: mean_stool_frequency must be a number from 0 to 40 (Ho 2004 three-day mean). Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ho-index"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"albumin_g_l":"35","colonic_dilatation":"false","mean_stool_frequency":"3"},{"albumin_g_l":"35","colonic_dilatation":"false","mean_stool_frequency":"3"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/timi-ua-nstemi":{"get":{"description":"Compute the TIMI risk score for unstable angina / NSTEMI from age and six caller-assigned flags.\n\nWhen an agent needs the published TIMI UA/NSTEMI total and must not invent points from a chart narrative.\n\nNot an invasive-strategy protocol and not a diagnosis.\n\ncad_risk_factors_ge_3 is a caller-assigned flag. magent does not expand smoking, hypertension, family history, diabetes, or cholesterol.\n\nst_deviation is a caller-assigned flag. magent does not read ECGs. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Age ≥65 scores 1.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"cad_risk_factors_ge_3","description":"≥3 CAD risk factors as assigned by the caller. true or false. magent does not expand smoking, hypertension, family history, diabetes, or cholesterol.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"known_cad","description":"Known CAD (stenosis ≥50%). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"aspirin_last_7d","description":"Aspirin use in the last 7 days. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"severe_angina","description":"Severe angina (≥2 episodes in 24 hours). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"st_deviation","description":"ST deviation ≥0.5 mm as assigned by the caller. true or false. magent does not read ECGs.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"elevated_markers","description":"Elevated cardiac markers as assigned by the caller. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"TIMI UA/NSTEMI","operationId":"get_api_calc_timi_ua_nstemi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/timi-ua-nstemi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"TIMI UA/NSTEMI (bulk)","operationId":"post_api_calc_timi_ua_nstemi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/timi-ua-nstemi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","aspirin_last_7d":"false","cad_risk_factors_ge_3":"false","elevated_markers":"false","known_cad":"false","severe_angina":"false","st_deviation":"false"},{"age":"50","aspirin_last_7d":"false","cad_risk_factors_ge_3":"false","elevated_markers":"false","known_cad":"false","severe_angina":"false","st_deviation":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/hfa-icos-raf-mek":{"get":{"description":"Classify Lyon 2020 HFA-ICOS baseline cardiovascular risk before combination RAF and MEK inhibitors as very_high, high, medium, or low from that table's printed factors and the shared medium-point rule.\n\nWhen an agent already has age, LVEF, and the yes/no Lyon 2020 RAF-MEK table factors and needs the published HFA-ICOS class plus the expert-opinion cardiotoxicity guide. magent does not examine the patient, read an echocardiogram, or assay biomarkers. Not a treatment order.\n\nNot a medical device. Not a treatment order, monitoring schedule, or cardiotoxicity diagnosis.\n\nThis RAF-MEK table has no printed LVEF <50 High row and no High age band. Age ≥65 is Medium 1 only. LVEF <50 does not invent a High factor.\n\nCardiotoxicity percents are the paper's expert-opinion guide (<2% / 2-9% / 10-19% / ≥20%), not a patient-specific probability.\n\nFlags are caller-assigned. magent does not diagnose heart failure, compute BMI or eGFR, or assay troponin or natriuretic peptides. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_years","description":"Age in whole years (18-100). Lyon 2020 RAF-MEK table: age ≥65 is Medium 1. There is no High age band on this table. magent does not read an identity document.","required":true,"schema":{"type":"integer"},"example":50},{"in":"query","name":"lvef_percent","description":"Baseline LVEF in whole percent (10-80) as assigned by the caller. 50-54 is Medium 2. ≥55 adds no points. This table has no printed LVEF <50 High row; LVEF <50 does not raise risk_level by itself. magent does not read an echocardiogram.","required":true,"schema":{"type":"integer"},"example":60},{"in":"query","name":"heart_failure_or_cardiomyopathy","description":"Heart failure or cardiomyopathy as assigned by the caller (Lyon 2020 RAF-MEK table). true is Very high. magent does not diagnose heart failure.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"mi_or_cabg","description":"Myocardial infarction or CABG as assigned by the caller (Lyon 2020 RAF-MEK table). true is High.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"stable_angina","description":"Stable angina as assigned by the caller (Lyon 2020 RAF-MEK table). true is High. magent does not diagnose angina.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"severe_valvular_heart_disease","description":"Severe valvular heart disease as assigned by the caller (Lyon 2020 RAF-MEK table). true is High.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"prior_anthracycline","description":"Prior anthracycline exposure as assigned by the caller (Lyon 2020 RAF-MEK table). true is High. magent does not read a chemotherapy record.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"elevated_troponin","description":"Elevated baseline troponin above the local laboratory upper limit of normal as assigned by the caller (Lyon 2020 RAF-MEK table). true is Medium 2. magent does not assay troponin.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"elevated_bnp","description":"Elevated baseline BNP or NT-proBNP above the local laboratory upper limit of normal as assigned by the caller (Lyon 2020 RAF-MEK table). true is Medium 2. magent does not assay natriuretic peptides.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"hypertension","description":"Hypertension (systolic >140 mm Hg or diastolic >90 mm Hg, or on treatment) as assigned by the caller (Lyon 2020 RAF-MEK table). true is Medium 2. magent does not measure blood pressure.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"prior_left_chest_or_mediastinal_rt","description":"Prior radiotherapy to the left chest or mediastinum as assigned by the caller (Lyon 2020 RAF-MEK table). true is Medium 2.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"arrhythmia","description":"Atrial fibrillation, atrial flutter, ventricular tachycardia, or ventricular fibrillation as assigned by the caller (Lyon 2020 RAF-MEK table footnote). true is Medium 1. magent does not read an ECG.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"diabetes","description":"Diabetes mellitus (glycated haemoglobin >7.0% or >53 mmol/mol, or on treatment) as assigned by the caller (Lyon 2020 RAF-MEK table). true is Medium 1. magent does not assay haemoglobin A1c.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"ckd","description":"Chronic kidney disease (estimated glomerular filtration rate <60 mL/min/1.73 m2) as assigned by the caller (Lyon 2020 RAF-MEK table). true is Medium 1. magent does not compute eGFR.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"current_or_significant_smoker","description":"Current smoker or significant smoking history as assigned by the caller (Lyon 2020 RAF-MEK table). true is Medium 1.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"obesity","description":"Obesity (BMI >30 kg/m2) as assigned by the caller (Lyon 2020 RAF-MEK table). true is Medium 1. magent does not compute BMI.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"HFA-ICOS RAF-MEK inhibitor baseline CV risk","operationId":"get_api_calc_hfa_icos_raf_mek","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, lvef_percent, risk_level, medium_points, cardiotoxicity_guide, components, citation, disclaimer."},"400":{"description":"invalid_hfa_icos_raf_mek: Lyon 2020 HFA-ICOS RAF-MEK inhibitor inputs must match that table's age, LVEF, and yes/no factors. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hfa-icos-raf-mek"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HFA-ICOS RAF-MEK inhibitor baseline CV risk (bulk)","operationId":"post_api_calc_hfa_icos_raf_mek","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_hfa_icos_raf_mek: Lyon 2020 HFA-ICOS RAF-MEK inhibitor inputs must match that table's age, LVEF, and yes/no factors. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hfa-icos-raf-mek"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_years":"50","arrhythmia":"false","ckd":"false","current_or_significant_smoker":"false","diabetes":"false","elevated_bnp":"false","elevated_troponin":"false","heart_failure_or_cardiomyopathy":"false","hypertension":"false","lvef_percent":"60","mi_or_cabg":"false","obesity":"false","prior_anthracycline":"false","prior_left_chest_or_mediastinal_rt":"false","severe_valvular_heart_disease":"false","stable_angina":"false"},{"age_years":"50","arrhythmia":"false","ckd":"false","current_or_significant_smoker":"false","diabetes":"false","elevated_bnp":"false","elevated_troponin":"false","heart_failure_or_cardiomyopathy":"false","hypertension":"false","lvef_percent":"60","mi_or_cabg":"false","obesity":"false","prior_anthracycline":"false","prior_left_chest_or_mediastinal_rt":"false","severe_valvular_heart_disease":"false","stable_angina":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-globus":{"get":{"description":"Apply the Aziz 2016 Rome IV esophageal globus diagnostic criteria and return whether the published globus box holds (rome_iv_globus).\n\nWhen an agent already has the eight caller-assigned Aziz 2016 Rome IV globus flags and needs whether the published globus box holds. magent does not examine the patient or read endoscopy.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose globus.\n\nThe caller assigns the eight flags. magent does not examine the patient or read endoscopy.\n\nThis tool is Aziz 2016 Rome IV esophageal globus only. Not functional heartburn. Not Rome IV IBS (Mearin 2016). Not cannabinoid hyperemesis syndrome (CHS). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"nonpainful_lump_or_foreign_body_sensation","description":"Persistent or intermittent, nonpainful sensation of a lump or foreign body in the throat (Aziz 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"occurrence_between_meals","description":"Occurrence of the sensation between meals (Aziz 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"no_dysphagia_or_odynophagia","description":"Absence of dysphagia or odynophagia (Aziz 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"no_gastric_inlet_patch","description":"Absence of a gastric inlet patch in the proximal esophagus (Aziz 2016). true or false as assigned by the caller. magent does not read endoscopy.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"not_explained_by_gerd_or_eoe","description":"Absence of evidence that gastroesophageal reflux or eosinophilic esophagitis is the cause of the symptom (Aziz 2016). true or false as assigned by the caller. magent does not read endoscopy.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"no_major_esophageal_motor_disorder","description":"Absence of major esophageal motor disorders (achalasia/EGJ outflow obstruction, diffuse esophageal spasm, jackhammer esophagus, absent peristalsis) (Aziz 2016). true or false as assigned by the caller. magent does not interpret manometry.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"fulfilled_last_3_months","description":"Criteria fulfilled for the last 3 months, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"onset_at_least_6_months","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV globus","operationId":"get_api_calc_rome_iv_globus","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, rome_iv_globus, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_globus: Rome IV globus needs the Aziz 2016 esophageal globus flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-globus"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV globus (bulk)","operationId":"post_api_calc_rome_iv_globus","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_globus: Rome IV globus needs the Aziz 2016 esophageal globus flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-globus"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"fulfilled_last_3_months":"true","no_dysphagia_or_odynophagia":"true","no_gastric_inlet_patch":"true","no_major_esophageal_motor_disorder":"true","nonpainful_lump_or_foreign_body_sensation":"true","not_explained_by_gerd_or_eoe":"true","occurrence_between_meals":"true","onset_at_least_6_months":"true"},{"fulfilled_last_3_months":"true","no_dysphagia_or_odynophagia":"true","no_gastric_inlet_patch":"true","no_major_esophageal_motor_disorder":"true","nonpainful_lump_or_foreign_body_sensation":"true","not_explained_by_gerd_or_eoe":"true","occurrence_between_meals":"true","onset_at_least_6_months":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/doac-score":{"get":{"description":"Compute the Aggarwal 2023 DOAC Score from age, CrCl or eGFR, and caller-assigned Table 2 flags for patients with atrial fibrillation on a DOAC.\n\nWhen an agent needs the published Circulation Table 2 DOAC Score arithmetic for AF on DOACs and must not invent HAS-BLED, a DOAC dose, or a warfarin score.\n\nNot a medical device. Not a diagnosis. Not a treatment or anticoagulation recommendation.\n\nNot HAS-BLED. Not a DOAC dosing tool. Not for warfarin.\n\nIntended primarily for atrial fibrillation on DOACs. Derivation was RE-LY (dabigatran 150 mg twice daily). Age <65 scores 0 and is not rejected.\n\nCirculation Table 2 is the score card: CrCl/eGFR 30-60 inclusive scores 1 and <30 scores 2 (not the body-text 30-59 / ≤30 wording).\n\nmagent does not compute BMI. underweight is the caller-assigned Table 2 BMI <18.5 kg/m² flag.\n\nliver_disease is caller-assigned. Table 2 footnote: AST, ALT, or ALP ≥3× ULN, ALP ≥2× ULN, or cirrhosis. magent does not assay labs or assign Child-Pugh. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Table 2: 65-69 scores 2; 70-74 scores 3; 75-79 scores 4; ≥80 scores 5; age <65 scores 0 and is accepted.","required":true,"schema":{"type":"integer"},"example":"65"},{"in":"query","name":"crcl_or_egfr_ml_min","description":"Creatinine clearance or eGFR in mL/min (5-200). Table 2: 30-60 inclusive scores 1; <30 scores 2; >60 scores 0. Exactly 30 and exactly 60 score 1.","required":true,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"underweight","description":"Caller-assigned BMI <18.5 kg/m² (Table 2 underweight). true or false. Scores 1. magent does not compute BMI.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"stroke_tia_embolism_history","description":"History of stroke, TIA, or embolism as assigned by the caller. true or false. Scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"diabetes","description":"Diabetes as assigned by the caller. true or false. Scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypertension","description":"Hypertension as assigned by the caller. true or false. Scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"antiplatelet","description":"Antiplatelet use: none (0), aspirin (2), or dual (aspirin + P2Y12; 3). Table 2.","required":true,"schema":{"type":"string","enum":["none","aspirin","dual"]},"example":"none"},{"in":"query","name":"nsaid_use","description":"NSAID use as assigned by the caller. true or false. Scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bleeding_history","description":"Bleeding history as assigned by the caller. true or false. Scores 3.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"liver_disease","description":"Liver disease as assigned by the caller (Table 2 footnote: AST, ALT, or ALP ≥3× ULN, ALP ≥2× ULN, or cirrhosis). true or false. Scores 2. magent does not assay labs or assign Child-Pugh.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"DOAC Score","operationId":"get_api_calc_doac_score","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, uncapped_sum, max_score, band, age_years, crcl_or_egfr_ml_min, antiplatelet, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_doac: antiplatelet must be none, aspirin, or dual; crcl_or_egfr_ml_min must be a number from 5 to 200 (Aggarwal 2023 DOAC Score Table 2). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/doac-score"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"DOAC Score (bulk)","operationId":"post_api_calc_doac_score","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_doac: antiplatelet must be none, aspirin, or dual; crcl_or_egfr_ml_min must be a number from 5 to 200 (Aggarwal 2023 DOAC Score Table 2). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/doac-score"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"65","antiplatelet":"none","bleeding_history":"false","crcl_or_egfr_ml_min":"70","diabetes":"false","hypertension":"false","liver_disease":"false","nsaid_use":"false","stroke_tia_embolism_history":"false","underweight":"false"},{"age":"65","antiplatelet":"none","bleeding_history":"false","crcl_or_egfr_ml_min":"70","diabetes":"false","hypertension":"false","liver_disease":"false","nsaid_use":"false","stroke_tia_embolism_history":"false","underweight":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/vaco":{"get":{"description":"Compute the King 2020 VACO Index 30-day all-cause mortality probability from age, sex, a caller-assigned unadjusted Charlson comorbidity index, and history of myocardial infarction or peripheral vascular disease using Supplement S3 coefficients.\n\nWhen an agent already has age, sex, a caller-assigned unadjusted Charlson score, and whether MI or PVD is present, and needs the published King 2020 S3 logistic 30-day probability, not VACS Index 1.0, VACS 2.0, 4C, or PRIEST.\n\nNot a medical device and not a diagnosis. Not a treatment, triage, isolation, or disposition order.\n\nmagent does not assign Charlson diagnoses. CCI is caller-assigned from administrative codes as in King 2020; this tool does not run ICD-10 mapping.\n\nAge 85 years or older uses the published combined age–CCI term; the numeric CCI does not change the linear predictor.\n\nNot VACS Index 1.0 and not VACS 2.0. King 2020 did not retain race or ethnicity in the final index; magent does not add either.\n\nDerivation used early-pandemic VA testing. King 2020 publishes no later-wave recalibration in S3. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 20-120). King 2020 S3 bands: 20-50 (ages 20-49), 50-54, 55-59, 60-64, 65-69, 70-74, 75-79, 80-89, ge90. Age 50 uses 50-54. Age 85-89 keeps the 80-89 age term and the age>=85 CCI term.","required":true,"schema":{"type":"integer"},"example":40},{"in":"query","name":"sex","description":"Sex as assigned by the caller. female is the S3 reference (0). male adds 0.322291449. magent does not assign sex.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"cci","description":"Unadjusted Charlson comorbidity index as assigned by the caller (integer 0-37). King 2020 S3: 0 (reference), 1-3, 4-5, 6-9, ge10 when age<85. Age 85 or older uses the published combined CCI term regardless of this integer. magent does not assign Charlson diagnoses.","required":true,"schema":{"type":"integer"},"example":0},{"in":"query","name":"mi_pvd","description":"History of myocardial infarction or peripheral vascular disease as assigned by the caller (true or false). false is the S3 reference (0). true adds 0.267265312.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"VACO Index","operationId":"get_api_calc_vaco","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age, sex, cci, mi_pvd, age_band, cci_band, logit, estimated_probability_percent, citation, disclaimer."},"400":{"description":"invalid_vaco: VACO Index inputs must match King 2020 age, sex, Charlson comorbidity index, and myocardial infarction or peripheral vascular disease. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/vaco"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"VACO Index (bulk)","operationId":"post_api_calc_vaco","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_vaco: VACO Index inputs must match King 2020 age, sex, Charlson comorbidity index, and myocardial infarction or peripheral vascular disease. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/vaco"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","cci":"0","mi_pvd":"false","sex":"female"},{"age":"40","cci":"0","mi_pvd":"false","sex":"female"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rose":{"get":{"description":"Compute the Reed 2010 ROSE (BRACES) criterion count and high-risk flag from published cutoffs.\n\nWhen an agent needs the published ROSE BRACES arithmetic and must not invent a disposition from a syncope narrative.\n\nNot a medical device. Not a disposition protocol, admission order, or discharge decision.\n\nHigh-risk means any BRACES criterion (score ≥ 1), not a diagnosis.\n\nmagent does not measure BNP, hemoglobin, or SpO2, and does not read an ECG. The caller assigns fecal occult blood, chest pain, and the Q-wave-not-lead-III flag. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"bnp_pg_ml","description":"BNP in pg/mL (0-35000). Reed 2010 BRACES scores 1 when ≥300; 300 is high-risk. magent does not measure BNP.","required":true,"schema":{"type":"number"},"example":"50"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats/min (integer 30-220). Reed 2010 bradycardia ≤50 (ED or pre-hospital in the paper; this tool takes one integer). 50 scores 1. magent does not measure heart rate.","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"fecal_occult_blood","description":"Rectal exam showing fecal occult blood if GI-bleed suspicion (Reed 2010 R). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hemoglobin_g_l","description":"Hemoglobin in g/L (30-220). Reed 2010 anemia scores 1 when ≤90; 90 is high-risk. magent does not assay hemoglobin.","required":true,"schema":{"type":"number"},"example":"130"},{"in":"query","name":"chest_pain","description":"Chest pain associated with syncope (Reed 2010 C). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"q_wave_not_lead_iii","description":"Q wave not in lead III (Reed 2010 E). true or false as assigned by the caller. magent does not read an ECG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"spo2_percent","description":"Room-air SpO2 percent (50-100). Reed 2010 scores 1 when ≤94; 94 is high-risk. magent does not measure SpO2.","required":true,"schema":{"type":"number"},"example":"98"}],"summary":"ROSE","operationId":"get_api_calc_rose","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, rose_high_risk, bnp_pg_ml, heart_rate_bpm, hemoglobin_g_l, spo2_percent, components, citation, disclaimer."},"400":{"description":"invalid_bnp_pg_ml: bnp_pg_ml must be a number from 0 to 35000 (Reed 2010 ROSE). Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rose"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ROSE (bulk)","operationId":"post_api_calc_rose","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_bnp_pg_ml: bnp_pg_ml must be a number from 0 to 35000 (Reed 2010 ROSE). Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rose"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bnp_pg_ml":"50","chest_pain":"false","fecal_occult_blood":"false","heart_rate_bpm":"70","hemoglobin_g_l":"130","q_wave_not_lead_iii":"false","spo2_percent":"98"},{"bnp_pg_ml":"50","chest_pain":"false","fecal_occult_blood":"false","heart_rate_bpm":"70","hemoglobin_g_l":"130","q_wave_not_lead_iii":"false","spo2_percent":"98"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/h2fpef":{"get":{"description":"Sum the Reddy 2018 H2FPEF points score (six components, max 9) and return score and max_score only.\n\nWhen an agent has caller-supplied BMI, age, antihypertensive-count flag, AF flag, echo PASP flag, and E/e' flag and needs the published Reddy 2018 points total, not the continuous nomogram, not HFA-PEFF, and not a HFpEF diagnosis or cath decision.\n\nNot a medical device. magent does not diagnose HFpEF and does not examine the patient.\n\nNot a HFpEF diagnosis, treatment order, or cardiac-catheterization substitute.\n\nThis is the Reddy 2018 H2FPEF points score only (0-9). It is not the paper's continuous logistic nomogram and not HFA-PEFF. Probability classes (0-1 / 2-5 / 6-9) are not returned.\n\nmagent does not read echo. pasp_gt_35 and e_over_e_prime_gt_9 are caller-assigned flags (PASP > 35 mm Hg; E/e' > 9).\n\nmagent does not compute BMI from height and weight. BMI 30 and age 60 do not score (strict greater-than). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Reddy 2018 elderly: scores 1 when >60. Age 60 does not score.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"bmi_kg_m2","description":"Body-mass index in kg/m^2 (10-80). Reddy 2018 heavy/obesity: scores 2 when >30. BMI 30 does not score. Caller-supplied; magent does not compute BMI from height and weight.","required":true,"schema":{"type":"number"},"example":"25"},{"in":"query","name":"antihypertensive_ge_2","description":"Treatment with two or more antihypertensive drugs (Reddy 2018 hypertensive). true or false. Caller-assigned. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"atrial_fibrillation","description":"Paroxysmal or persistent atrial fibrillation (Reddy 2018). true or false. Caller-assigned. 3 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pasp_gt_35","description":"Echocardiographic pulmonary artery systolic pressure >35 mm Hg (Reddy 2018 pulmonary hypertension). true or false. Caller-assigned. 1 point if true. magent does not measure PASP.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"e_over_e_prime_gt_9","description":"E/e' ratio >9 (Reddy 2018 filling pressures). true or false. Caller-assigned. 1 point if true. magent does not measure E/e'.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"H2FPEF","operationId":"get_api_calc_h2fpef","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, age_years, bmi_kg_m2, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/h2fpef"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"H2FPEF (bulk)","operationId":"post_api_calc_h2fpef","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/h2fpef"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","antihypertensive_ge_2":"false","atrial_fibrillation":"false","bmi_kg_m2":"25","e_over_e_prime_gt_9":"false","pasp_gt_35":"false"},{"age":"50","antihypertensive_ge_2":"false","atrial_fibrillation":"false","bmi_kg_m2":"25","e_over_e_prime_gt_9":"false","pasp_gt_35":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rapid":{"get":{"description":"Sum the Rahman 2014 RAPID points for pleural infection at presentation and return the published low, medium, or high band.\n\nWhen an agent needs the published RAPID total for pleural infection and must not invent a drain, surgery, or fibrinolytic decision.\n\nNot a medical device. magent does not assay urea or albumin or inspect pleural fluid.\n\nNot a drain, surgery, or fibrinolytic decision. RAPID is a presentation risk score for pleural infection (Rahman 2014), not Light's criteria. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"urea_mmol_l","description":"Serum urea in mmol/L (1-50). Provide this or bun_mg_dl, not both. <5 scores 0; 5.0-8.0 inclusive scores 1; >8 scores 2 (Rahman 2014).","required":false,"schema":{"type":"number"},"example":"4"},{"in":"query","name":"bun_mg_dl","description":"BUN in mg/dL (3-140). Converted as urea_mmol_l = bun_mg_dl / 2.8.","required":false,"schema":{"type":"number"},"example":"11.2"},{"in":"query","name":"age","description":"Age in years (18-120). <50 scores 0; 50-70 inclusive scores 1; >70 scores 2.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"pleural_purulent","description":"Purulent pleural fluid (Rahman 2014). true scores 0; false (non-purulent) scores 1. magent does not inspect the fluid.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"hospital_acquired","description":"Hospital-acquired pleural infection (Rahman 2014). true scores 1; false (community) scores 0.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"albumin_g_l","description":"Serum albumin in g/L (10-60). Provide this or albumin_g_dl, not both. ≥27 scores 0; <27 scores 1.","required":false,"schema":{"type":"number"},"example":"35"},{"in":"query","name":"albumin_g_dl","description":"Serum albumin in g/dL (1-6). Converted as g/L = g/dL × 10. Provide this or albumin_g_l, not both.","required":false,"schema":{"type":"number"},"example":"3.5"}],"summary":"RAPID","operationId":"get_api_calc_rapid","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk_band, urea_mmol_l, age_years, pleural_purulent, hospital_acquired, albumin_g_l, components, citation, disclaimer."},"400":{"description":"invalid_urea: urea_mmol_l (1-50) or bun_mg_dl (3-140) is required, not both. Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rapid"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"RAPID (bulk)","operationId":"post_api_calc_rapid","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_urea: urea_mmol_l (1-50) or bun_mg_dl (3-140) is required, not both. Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rapid"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","albumin_g_l":"35","hospital_acquired":"false","pleural_purulent":"true","urea_mmol_l":"4"},{"age":"40","albumin_g_l":"35","hospital_acquired":"false","pleural_purulent":"true","urea_mmol_l":"4"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/madrs":{"get":{"description":"Sum ten caller-assigned Montgomery 1979 MADRS items (each integer 0-6) and return the published 0-60 total. Does not apply later total-score severity bands.\n\nWhen an agent already has Montgomery 1979 integers 0-6 for the ten items and needs the published total. magent does not interview the patient, diagnose depression, score Hamilton 1960, score PHQ-9, or apply later 0-6/7-19/20-34/35-60 cutoffs.\n\nNot a medical device and not a depression diagnosis or treatment order.\n\nEach of the ten items is a caller-assigned integer 0-6. magent does not interview the patient.\n\nThis is Montgomery 1979 MADRS only (ten items; max 60). magent does not score Hamilton 1960 or PHQ-9.\n\nMontgomery 1979 published no total-score severity bands. This tool returns score and max_score only. It does not apply later 0-6/7-19/20-34/35-60 website or review cutoffs. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"apparent_sadness","description":"Caller-assigned Montgomery 1979 apparent sadness (integer 0-6): despondency, gloom, and despair reflected in speech, facial expression, and posture, rated by depth and inability to brighten up. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"reported_sadness","description":"Caller-assigned Montgomery 1979 reported sadness (integer 0-6): reports of depressed mood, low spirits, despondency, or feeling beyond help, regardless of appearance. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"inner_tension","description":"Caller-assigned Montgomery 1979 inner tension (integer 0-6): ill-defined discomfort, edginess, inner turmoil, or mental tension mounting to panic, dread, or anguish. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"reduced_sleep","description":"Caller-assigned Montgomery 1979 reduced sleep (integer 0-6): reduced duration or depth of sleep compared with the subject's own normal pattern when well. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"reduced_appetite","description":"Caller-assigned Montgomery 1979 reduced appetite (integer 0-6): loss of desire for food or the need to force oneself to eat compared with when well. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"concentration_difficulties","description":"Caller-assigned Montgomery 1979 concentration difficulties (integer 0-6): difficulty collecting one's thoughts mounting to incapacitating lack of concentration. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"lassitude","description":"Caller-assigned Montgomery 1979 lassitude (integer 0-6): difficulty getting started or slowness initiating and performing everyday activities. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"inability_to_feel","description":"Caller-assigned Montgomery 1979 inability to feel (integer 0-6): reduced interest in surroundings or activities that normally give pleasure, or reduced ability to react with adequate emotion. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"pessimistic_thoughts","description":"Caller-assigned Montgomery 1979 pessimistic thoughts (integer 0-6): thoughts of guilt, inferiority, self-reproach, sinfulness, remorse, or ruin. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"suicidal_thoughts","description":"Caller-assigned Montgomery 1979 suicidal thoughts (integer 0-6): feeling that life is not worth living, that a natural death would be welcome, suicidal thoughts, or preparations for suicide. A suicide attempt should not in itself influence the rating. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"MADRS","operationId":"get_api_calc_madrs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_madrs: MADRS needs ten caller-assigned items, each an integer 0-6 (Montgomery 1979). Returned before settlement; you are not charged.; invalid_madrs_item: each MADRS item must be an integer from 0 to 6 (Montgomery 1979). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/madrs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"MADRS (bulk)","operationId":"post_api_calc_madrs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_madrs: MADRS needs ten caller-assigned items, each an integer 0-6 (Montgomery 1979). Returned before settlement; you are not charged.; invalid_madrs_item: each MADRS item must be an integer from 0 to 6 (Montgomery 1979). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/madrs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"apparent_sadness":"0","concentration_difficulties":"0","inability_to_feel":"0","inner_tension":"0","lassitude":"0","pessimistic_thoughts":"0","reduced_appetite":"0","reduced_sleep":"0","reported_sadness":"0","suicidal_thoughts":"0"},{"apparent_sadness":"0","concentration_difficulties":"0","inability_to_feel":"0","inner_tension":"0","lassitude":"0","pessimistic_thoughts":"0","reduced_appetite":"0","reduced_sleep":"0","reported_sadness":"0","suicidal_thoughts":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/forrest":{"get":{"description":"Return the Forrest 1974 endoscopic lesion class (ia, ib, iia, iib, iic, or iii) and published description from a caller-assigned token.\n\nWhen an agent already has an endoscopic Forrest class as assigned at endoscopy and needs the canonical token and 1974 lesion wording. magent does not interpret endoscopy images. Not Glasgow-Blatchford and not Rockall.\n\nNot a medical device.\n\nmagent does not interpret endoscopy images. The caller assigns forrest as ia, ib, iia, iib, iic, or iii.\n\nThis tool is Forrest 1974 lesion class only. It does not report rebleeding percentages (Forrest 1974 does not publish them). Not Glasgow-Blatchford and not Rockall. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"forrest","description":"Forrest 1974 endoscopic lesion class as assigned by the caller: ia (active spurting hemorrhage), ib (active oozing hemorrhage), iia (non-bleeding visible vessel), iib (adherent clot), iic (flat pigmented haematin / coffee-ground base), or iii (clean ulcer base / no signs of recent hemorrhage). Case-insensitive. magent does not interpret endoscopy images.","required":true,"schema":{"type":"string"},"example":"iii"}],"summary":"Forrest","operationId":"get_api_calc_forrest","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, forrest, description, criteria, citation, disclaimer."},"400":{"description":"invalid_forrest: forrest must be ia, ib, iia, iib, iic, or iii (Forrest 1974). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/forrest"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Forrest (bulk)","operationId":"post_api_calc_forrest","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_forrest: forrest must be ia, ib, iia, iib, iic, or iii (Forrest 1974). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/forrest"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"forrest":"iii"},{"forrest":"iii"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/bard":{"get":{"description":"Sum the Harrison 2008 BARD score (BMI ≥28, AST/ALT ≥0.8, diabetes) and return low (0–1) or high (2–4).\n\nWhen an agent has caller-supplied BMI, AST, ALT, and a diabetes flag for a patient already recognized as NAFLD and needs the published BARD total, not a NASH diagnosis, biopsy stage, FIB-4, APRI, or NAFLD fibrosis score.\n\nNot a medical device and not a NASH diagnosis. magent does not interpret a biopsy.\n\nBMI is caller-supplied. magent does not compute BMI from height and weight in this tool.\n\nHarrison 2008 BARD only: BMI ≥28 (1), AST/ALT ≥0.8 (2), diabetes mellitus (1). Max 4. risk_group is the paper's 2–4 vs 0–1 split (low 0–1, high 2–4), not F0–F4 stages.\n\nA score of 2–4 was associated with OR 17 for advanced fibrosis and NPV 96% in Harrison 2008. NPV is not a biopsy result.\n\nNot the NAFLD fibrosis score, not FIB-4, and not APRI. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"bmi","description":"Body-mass index in kg/m^2 (10-80). >=28 scores 1 (Harrison 2008). 27.9 scores 0. Caller-supplied; magent does not compute BMI from height and weight.","required":true,"schema":{"type":"number"},"example":"25"},{"in":"query","name":"ast_u_l","description":"Aspartate aminotransferase in U/L (1-10000). Used with ALT for the AAR.","required":true,"schema":{"type":"number"},"example":"20"},{"in":"query","name":"alt_u_l","description":"Alanine aminotransferase in U/L (1-10000). AST/ALT >= 0.8 scores 2 (Harrison 2008). 0.799 scores 0. ALT must be >0.","required":true,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"diabetes","description":"Diabetes mellitus as assigned by the caller (Harrison 2008). true scores 1. magent does not diagnose diabetes.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"BARD","operationId":"get_api_calc_bard","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk_group, bmi, ast_u_l, alt_u_l, ast_alt_ratio, diabetes, components, citation, disclaimer."},"400":{"description":"invalid_bard: bmi 10-80, ast_u_l 1-10000, and alt_u_l 1-10000 (Harrison 2008; magent clamps). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bard"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"BARD (bulk)","operationId":"post_api_calc_bard","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_bard: bmi 10-80, ast_u_l 1-10000, and alt_u_l 1-10000 (Harrison 2008; magent clamps). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bard"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"alt_u_l":"40","ast_u_l":"20","bmi":"25","diabetes":"false"},{"alt_u_l":"40","ast_u_l":"20","bmi":"25","diabetes":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/uas":{"get":{"description":"Sum Młynek 2008 EAACI/GA2LEN/EDF urticaria activity score over seven consecutive days: each day wheals 0-3 plus pruritus 0-3 (daily UAS 0-6). Return UAS7 (0-42) and mean_daily_uas. This paper published no UAS7 activity bands.\n\nWhen an agent already has seven consecutive days of caller-assigned UAS wheals and pruritus integers (0-3) and needs the published UAS7 and mean daily UAS. magent does not count wheals, grade pruritus, diagnose urticaria, or score angioedema activity (AAS).\n\nNot a medical device and not a diagnosis of urticaria or a treatment order. magent does not count wheals or grade pruritus. Each of the 14 values is a caller-assigned integer 0-3.\n\nMłynek 2008 found quality-of-life correlation plateaued from the fourth consecutive day. magent still requires seven complete days and does not impute missing days.\n\nThis is EAACI/GA2LEN/EDF UAS (daily wheals plus pruritus; UAS7 0-42), not angioedema activity (AAS).\n\nMłynek 2008 published no UAS7 activity-band cutpoints. magent returns UAS7 and mean_daily_uas only. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"wheals_d1","description":"Caller-assigned Młynek 2008 UAS wheals integer 0-3 for that 24h day: 0 none, 1 mild (<20 wheals/24h), 2 moderate (20-50/24h), 3 intense (>50 wheals/24h or large confluent areas). magent does not count wheals.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"1"},{"in":"query","name":"wheals_d2","description":"Caller-assigned Młynek 2008 UAS wheals integer 0-3 for that 24h day: 0 none, 1 mild (<20 wheals/24h), 2 moderate (20-50/24h), 3 intense (>50 wheals/24h or large confluent areas). magent does not count wheals.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"wheals_d3","description":"Caller-assigned Młynek 2008 UAS wheals integer 0-3 for that 24h day: 0 none, 1 mild (<20 wheals/24h), 2 moderate (20-50/24h), 3 intense (>50 wheals/24h or large confluent areas). magent does not count wheals.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"wheals_d4","description":"Caller-assigned Młynek 2008 UAS wheals integer 0-3 for that 24h day: 0 none, 1 mild (<20 wheals/24h), 2 moderate (20-50/24h), 3 intense (>50 wheals/24h or large confluent areas). magent does not count wheals.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"wheals_d5","description":"Caller-assigned Młynek 2008 UAS wheals integer 0-3 for that 24h day: 0 none, 1 mild (<20 wheals/24h), 2 moderate (20-50/24h), 3 intense (>50 wheals/24h or large confluent areas). magent does not count wheals.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"wheals_d6","description":"Caller-assigned Młynek 2008 UAS wheals integer 0-3 for that 24h day: 0 none, 1 mild (<20 wheals/24h), 2 moderate (20-50/24h), 3 intense (>50 wheals/24h or large confluent areas). magent does not count wheals.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"wheals_d7","description":"Caller-assigned Młynek 2008 UAS wheals integer 0-3 for that 24h day: 0 none, 1 mild (<20 wheals/24h), 2 moderate (20-50/24h), 3 intense (>50 wheals/24h or large confluent areas). magent does not count wheals.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"pruritus_d1","description":"Caller-assigned Młynek 2008 UAS pruritus integer 0-3 for that 24h day: 0 none, 1 mild (present but not annoying), 2 moderate (troublesome, does not interfere with activity or sleep), 3 intense (interferes with activity or sleep). magent does not grade itch.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"1"},{"in":"query","name":"pruritus_d2","description":"Caller-assigned Młynek 2008 UAS pruritus integer 0-3 for that 24h day: 0 none, 1 mild (present but not annoying), 2 moderate (troublesome, does not interfere with activity or sleep), 3 intense (interferes with activity or sleep). magent does not grade itch.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"pruritus_d3","description":"Caller-assigned Młynek 2008 UAS pruritus integer 0-3 for that 24h day: 0 none, 1 mild (present but not annoying), 2 moderate (troublesome, does not interfere with activity or sleep), 3 intense (interferes with activity or sleep). magent does not grade itch.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"pruritus_d4","description":"Caller-assigned Młynek 2008 UAS pruritus integer 0-3 for that 24h day: 0 none, 1 mild (present but not annoying), 2 moderate (troublesome, does not interfere with activity or sleep), 3 intense (interferes with activity or sleep). magent does not grade itch.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"pruritus_d5","description":"Caller-assigned Młynek 2008 UAS pruritus integer 0-3 for that 24h day: 0 none, 1 mild (present but not annoying), 2 moderate (troublesome, does not interfere with activity or sleep), 3 intense (interferes with activity or sleep). magent does not grade itch.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"pruritus_d6","description":"Caller-assigned Młynek 2008 UAS pruritus integer 0-3 for that 24h day: 0 none, 1 mild (present but not annoying), 2 moderate (troublesome, does not interfere with activity or sleep), 3 intense (interferes with activity or sleep). magent does not grade itch.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"pruritus_d7","description":"Caller-assigned Młynek 2008 UAS pruritus integer 0-3 for that 24h day: 0 none, 1 mild (present but not annoying), 2 moderate (troublesome, does not interfere with activity or sleep), 3 intense (interferes with activity or sleep). magent does not grade itch.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"}],"summary":"UAS","operationId":"get_api_calc_uas","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, mean_daily_uas, daily_d1, daily_d2, daily_d3, daily_d4, daily_d5, daily_d6, daily_d7, components, citation, disclaimer."},"400":{"description":"invalid_uas: UAS needs seven consecutive daily wheals and pruritus integers 0-3 (Mlynek 2008). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/uas"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"UAS (bulk)","operationId":"post_api_calc_uas","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_uas: UAS needs seven consecutive daily wheals and pruritus integers 0-3 (Mlynek 2008). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/uas"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"pruritus_d1":"1","pruritus_d2":"0","pruritus_d3":"0","pruritus_d4":"0","pruritus_d5":"0","pruritus_d6":"0","pruritus_d7":"0","wheals_d1":"1","wheals_d2":"0","wheals_d3":"0","wheals_d4":"0","wheals_d5":"0","wheals_d6":"0","wheals_d7":"0"},{"pruritus_d1":"1","pruritus_d2":"0","pruritus_d3":"0","pruritus_d4":"0","pruritus_d5":"0","pruritus_d6":"0","pruritus_d7":"0","wheals_d1":"1","wheals_d2":"0","wheals_d3":"0","wheals_d4":"0","wheals_d5":"0","wheals_d6":"0","wheals_d7":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/phq-9":{"get":{"description":"Sum nine caller-assigned Kroenke 2001 PHQ-9 integers (0-3) and return the published total (max 27), severity cutpoints, and ≥10 screen.\n\nWhen an agent has already assigned Kroenke 2001 0-3 integers for each of the nine PHQ-9 items and needs the published total, severity cutpoints, and ≥10 screen, not a depression diagnosis or GAD-7.\n\nNot a medical device and not a depression diagnosis or treatment order.\n\nEach of the nine items is a caller-assigned integer 0-3 (0 not at all, 1 several days, 2 more than half the days, 3 nearly every day). magent does not interpret the items.\n\nThis is Kroenke 2001 PHQ-9 only (nine DSM-IV depression items; max 27). magent does not score PHQ-2, PHQ-8, or GAD-7.\n\nPublished severity cutpoints are 5 / 10 / 15 / 20 (0-4 none_minimal, 5-9 mild, 10-14 moderate, 15-19 moderately_severe, 20-27 severe). Score 0 is none_minimal; magent does not invent a separate none class. screen_ge_10 is true iff score ≥10 (this paper: 88% sensitivity and 88% specificity for major depression). It is a screen, not a diagnosis. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"anhedonia","description":"Caller-assigned Kroenke 2001 PHQ-9 item 1 (integer 0-3): little interest or pleasure in doing things (0 not at all, 1 several days, 2 more than half the days, 3 nearly every day). magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"depressed","description":"Caller-assigned Kroenke 2001 PHQ-9 item 2 (integer 0-3): feeling down, depressed, or hopeless. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"sleep","description":"Caller-assigned Kroenke 2001 PHQ-9 item 3 (integer 0-3): trouble falling or staying asleep, or sleeping too much. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"energy","description":"Caller-assigned Kroenke 2001 PHQ-9 item 4 (integer 0-3): feeling tired or having little energy. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"appetite","description":"Caller-assigned Kroenke 2001 PHQ-9 item 5 (integer 0-3): poor appetite or overeating. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"failure","description":"Caller-assigned Kroenke 2001 PHQ-9 item 6 (integer 0-3): feeling bad about yourself — a failure, or having let yourself or your family down. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"concentration","description":"Caller-assigned Kroenke 2001 PHQ-9 item 7 (integer 0-3): trouble concentrating on things such as reading or watching television. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"psychomotor","description":"Caller-assigned Kroenke 2001 PHQ-9 item 8 (integer 0-3): moving or speaking so slowly that other people could have noticed, or being so fidgety or restless that you have been moving around a lot more than usual. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"self_harm","description":"Caller-assigned Kroenke 2001 PHQ-9 item 9 (integer 0-3): thoughts that you would be better off dead, or of hurting yourself in some way. magent does not interpret the item.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"PHQ-9","operationId":"get_api_calc_phq_9","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, severity, screen_ge_10, components, citation, disclaimer."},"400":{"description":"invalid_phq9_item: each PHQ-9 item must be an integer from 0 to 3 (Kroenke 2001: 0 not at all, 1 several days, 2 more than half the days, 3 nearly every day). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/phq-9"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PHQ-9 (bulk)","operationId":"post_api_calc_phq_9","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_phq9_item: each PHQ-9 item must be an integer from 0 to 3 (Kroenke 2001: 0 not at all, 1 several days, 2 more than half the days, 3 nearly every day). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/phq-9"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"anhedonia":"0","appetite":"0","concentration":"0","depressed":"0","energy":"0","failure":"0","psychomotor":"0","self_harm":"0","sleep":"0"},{"anhedonia":"0","appetite":"0","concentration":"0","depressed":"0","energy":"0","failure":"0","psychomotor":"0","self_harm":"0","sleep":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/iota":{"get":{"description":"Apply Timmerman 2008 simple ultrasound-based rules from ten caller-assigned M-rule and B-rule flags and return m_count, b_count, and whether the mass classifies as malignant, benign, or inconclusive.\n\nWhen an agent already has the ten caller-assigned Timmerman 2008 M-rule and B-rule ultrasound flags and needs the published Simple Rules classification. magent does not read ultrasound. Not a diagnosis of ovarian cancer, not RMI, not Swede, and not the later SRRisk logistic model.\n\nNot a medical device.\n\nNot a diagnosis of ovarian cancer. magent does not diagnose ovarian cancer.\n\nTimmerman 2008 Simple Rules only. Not the later SRRisk logistic model. Not RMI. Not Swede.\n\nThe caller assigns ten ultrasound flags. magent does not read ultrasound or perform Doppler.\n\nRules classify as malignant when one or more M-rules apply and no B-rule applies, and as benign when one or more B-rules apply and no M-rule applies. Otherwise inconclusive. magent does not invent a probability. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"irregular_solid_tumor","description":"Irregular solid tumor (M-rule). true or false as assigned by the caller (Timmerman 2008). magent does not read ultrasound.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"ascites","description":"Ascites (M-rule). true or false as assigned by the caller. magent does not read ultrasound.","required":true,"schema":{"type":"boolean"},"example":true},{"in":"query","name":"at_least_four_papillary_structures","description":"At least four papillary structures (M-rule). true or false as assigned by the caller. magent does not read ultrasound.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"irregular_multilocular_solid_ge_100mm","description":"Irregular multilocular-solid tumor with largest diameter ≥100 mm (M-rule). true or false as assigned by the caller. magent does not measure the mass.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"very_high_color_doppler","description":"Very high color content on color Doppler (M-rule). true or false as assigned by the caller. magent does not perform Doppler.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"unilocular_cyst","description":"Unilocular cyst (B-rule). true or false as assigned by the caller. magent does not read ultrasound.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"solid_component_lt_7mm","description":"Solid components with largest solid component <7 mm (B-rule). true or false as assigned by the caller. magent does not measure the mass.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"acoustic_shadows","description":"Acoustic shadows (B-rule). true or false as assigned by the caller. magent does not read ultrasound.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"smooth_multilocular_lt_100mm","description":"Smooth multilocular tumor <100 mm largest diameter (B-rule). true or false as assigned by the caller. magent does not measure the mass.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"no_detectable_blood_flow","description":"No detectable blood flow on Doppler (B-rule). true or false as assigned by the caller. magent does not perform Doppler.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"IOTA Simple Rules","operationId":"get_api_calc_iota","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, classification, m_count, b_count, criteria, citation, disclaimer."},"400":{"description":"invalid_iota: IOTA Simple Rules need ten caller-assigned M and B ultrasound flags (Timmerman 2008). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/iota"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"IOTA Simple Rules (bulk)","operationId":"post_api_calc_iota","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_iota: IOTA Simple Rules need ten caller-assigned M and B ultrasound flags (Timmerman 2008). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/iota"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"acoustic_shadows":"false","ascites":"true","at_least_four_papillary_structures":"false","irregular_multilocular_solid_ge_100mm":"false","irregular_solid_tumor":"false","no_detectable_blood_flow":"false","smooth_multilocular_lt_100mm":"false","solid_component_lt_7mm":"false","unilocular_cyst":"false","very_high_color_doppler":"false"},{"acoustic_shadows":"false","ascites":"true","at_least_four_papillary_structures":"false","irregular_multilocular_solid_ge_100mm":"false","irregular_solid_tumor":"false","no_detectable_blood_flow":"false","smooth_multilocular_lt_100mm":"false","solid_component_lt_7mm":"false","unilocular_cyst":"false","very_high_color_doppler":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/palchak":{"get":{"description":"Apply the Palchak 2003 derivation and return high or low risk of brain injury from five caller-assigned findings after blunt head trauma in a child 0-17 years. Scalp hematoma scores only when age is 0, 1, or 2.\n\nWhen an agent has caller-assigned findings after blunt head trauma in a child 0-17 years and needs the Palchak 2003 low-risk rule, not PECARN, CATCH, CHALICE, Canadian CT Head, or NEXUS.\n\nNot a medical device. Not a diagnosis. magent does not examine the child or order CT.\n\nThis tool is the Palchak 2003 derivation only. It is not PECARN, not CATCH, not CHALICE, not the Canadian CT Head Rule, and not NEXUS.\n\nAge is integer years 0-17. Scalp hematoma counts toward high risk only when age is 0, 1, or 2; the flag is parsed but does not score at age 3-17.\n\nHeadache is a published Palchak 2003 predictor and is scored at all ages 0-17 as assigned by the caller.\n\nThe caller assigns all five findings. magent does not examine the child. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 0-17). Scalp hematoma is a high-risk predictor only when age is 0, 1, or 2; age 3-17 parse scalp_hematoma but do not score it. Age 18 is rejected.","required":true,"schema":{"type":"integer"},"example":"10"},{"in":"query","name":"abnormal_mental_status","description":"Abnormal mental status as assigned by the caller. true or false. High-risk at all ages 0-17. magent does not examine the child or assign GCS.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"clinical_signs_skull_fracture","description":"Clinical signs of skull fracture as assigned by the caller. true or false. High-risk at all ages 0-17. magent does not examine the child or read a radiograph.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"history_of_vomiting","description":"History of vomiting as assigned by the caller. true or false. High-risk at all ages 0-17.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"scalp_hematoma","description":"Scalp hematoma as assigned by the caller. true or false. High-risk only when age is 0, 1, or 2; parsed but not scored when age >= 3. magent does not examine the scalp.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"headache","description":"Headache as assigned by the caller. true or false. High-risk at all ages 0-17 (Palchak 2003 listed headache as a predictor). magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Palchak pediatric head trauma","operationId":"get_api_calc_palchak","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, high_risk, low_risk, ct_not_low_risk, criteria, citation, disclaimer."},"400":{"description":"invalid_palchak_age: age must be an integer from 0 to 17 (Palchak 2003 pediatric blunt head trauma). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/palchak"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Palchak pediatric head trauma (bulk)","operationId":"post_api_calc_palchak","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_palchak_age: age must be an integer from 0 to 17 (Palchak 2003 pediatric blunt head trauma). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/palchak"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"abnormal_mental_status":"false","age":"10","clinical_signs_skull_fracture":"false","headache":"false","history_of_vomiting":"false","scalp_hematoma":"false"},{"abnormal_mental_status":"false","age":"10","clinical_signs_skull_fracture":"false","headache":"false","history_of_vomiting":"false","scalp_hematoma":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-infant-diarrhea":{"get":{"description":"Apply the Benninga 2016 Rome IV G5 Functional Diarrhea diagnostic criteria and return whether the published infant functional diarrhea box holds (rome_iv_infant_diarrhea).\n\nWhen an agent already has the four caller-assigned Benninga 2016 Rome IV G5 flags and needs whether the published infant functional diarrhea box holds. magent does not examine the child.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose infant functional diarrhea.\n\nThe caller assigns the four flags, including onset_between_6_and_60_months. magent does not examine the child.\n\nRome IV G5 requires 4 or more stools per day (not 3; Rome III used 3). The sleep-stool criterion was dropped in Rome IV and is not a flag.\n\nThis tool is Benninga 2016 Rome IV G5 Functional Diarrhea only. Not adult Rome IV functional diarrhea (Mearin 2016 C3). Not a malabsorption workup. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"daily_painless_recurrent_4_or_more_large_unformed_stools","description":"Daily, painless, recurrent passage of 4 or more large, unformed stools, as assigned (Benninga 2016 Rome IV G5; Rome IV is 4 or more, not Rome III's 3). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"symptoms_last_more_than_4_weeks","description":"Symptoms last more than 4 weeks, as assigned (Benninga 2016 Rome IV G5). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"onset_between_6_and_60_months","description":"Onset between 6 and 60 months of age, as assigned (Benninga 2016 Rome IV G5). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"no_failure_to_thrive_if_caloric_intake_adequate","description":"No failure to thrive if caloric intake is adequate, as assigned (Benninga 2016 Rome IV G5). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV Infant Diarrhea","operationId":"get_api_calc_rome_iv_infant_diarrhea","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, rome_iv_infant_diarrhea, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_infant_diarrhea: Rome IV infant functional diarrhea needs the Benninga 2016 neonate/toddler G5 flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-infant-diarrhea"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV Infant Diarrhea (bulk)","operationId":"post_api_calc_rome_iv_infant_diarrhea","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_infant_diarrhea: Rome IV infant functional diarrhea needs the Benninga 2016 neonate/toddler G5 flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-infant-diarrhea"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"daily_painless_recurrent_4_or_more_large_unformed_stools":"true","no_failure_to_thrive_if_caloric_intake_adequate":"true","onset_between_6_and_60_months":"true","symptoms_last_more_than_4_weeks":"true"},{"daily_painless_recurrent_4_or_more_large_unformed_stools":"true","no_failure_to_thrive_if_caloric_intake_adequate":"true","onset_between_6_and_60_months":"true","symptoms_last_more_than_4_weeks":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-chs":{"get":{"description":"Apply the Stanghellini 2016 Rome IV cannabinoid hyperemesis syndrome diagnostic criteria and return whether the published CHS box holds (rome_iv_chs) plus the supportive pathologic_bathing flag.\n\nWhen an agent already has the six caller-assigned Stanghellini 2016 Rome IV CHS flags and needs whether the published CHS box holds. magent does not take a cannabis history.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose cannabinoid hyperemesis syndrome.\n\nThe caller assigns the six flags. magent does not examine the patient or take a cannabis history.\n\nThis tool is Stanghellini 2016 Rome IV cannabinoid hyperemesis syndrome only. Pathologic bathing is supportive and not required for rome_iv_chs. Not cyclic vomiting syndrome as the primary tool. Not Rome IV IBS (Mearin 2016). Not Rome IV functional dyspepsia. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"stereotypical_episodic_vomiting","description":"Stereotypical episodic vomiting resembling cyclic vomiting syndrome (CVS) in onset, duration, and frequency (Stanghellini 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"after_prolonged_excessive_cannabis","description":"Presentation after prolonged excessive cannabis use, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a cannabis history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"relief_with_sustained_cessation","description":"Relief of vomiting episodes by sustained cessation of cannabis, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a cannabis history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"fulfilled_last_3_months","description":"Criteria fulfilled for the last 3 months, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"onset_at_least_6_months","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"pathologic_bathing","description":"Pathologic bathing behavior (prolonged hot baths or showers), a supportive criterion that is not required for rome_iv_chs (Stanghellini 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV CHS","operationId":"get_api_calc_rome_iv_chs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, pathologic_bathing, rome_iv_chs, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_chs: Rome IV CHS needs stereotypical episodic vomiting, cannabis-use onset, relief after cannabis cessation, and the 3-month/6-month timing flags (Stanghellini 2016). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-chs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV CHS (bulk)","operationId":"post_api_calc_rome_iv_chs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_chs: Rome IV CHS needs stereotypical episodic vomiting, cannabis-use onset, relief after cannabis cessation, and the 3-month/6-month timing flags (Stanghellini 2016). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-chs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"after_prolonged_excessive_cannabis":"true","fulfilled_last_3_months":"true","onset_at_least_6_months":"true","pathologic_bathing":"true","relief_with_sustained_cessation":"true","stereotypical_episodic_vomiting":"true"},{"after_prolonged_excessive_cannabis":"true","fulfilled_last_3_months":"true","onset_at_least_6_months":"true","pathologic_bathing":"true","relief_with_sustained_cessation":"true","stereotypical_episodic_vomiting":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/intrauterine-rbc":{"get":{"description":"Compute Mandelbrot 1988 intrauterine RBC transfusion volume from caller-assigned estimated fetal weight and initial, target, and donor hematocrits. Hematocrit arm only.\n\nWhen an agent already has estimated fetal weight and hematocrits and needs the published Mandelbrot 1988 hematocrit-arm volume, not a platelet intrauterine transfusion, a biometry-derived weight, or a transfusion order.\n\nNot a medical device. Not a transfusion order.\n\nHematocrit arm only. Mandelbrot 1988 also allowed a platelet-count variant; magent does not implement platelets.\n\nmagent does not estimate fetal weight from biometry. estimated_fetal_weight_g is caller-assigned. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"estimated_fetal_weight_g","description":"Caller-assigned estimated fetal weight in grams (200-4000). Required. magent does not estimate fetal weight from biometry.","required":true,"schema":{"type":"number"},"example":"1000"},{"in":"query","name":"hct_initial_percent","description":"Initial fetal hematocrit as a percent (5-50). Must be strictly less than hct_final_percent.","required":true,"schema":{"type":"number"},"example":"20"},{"in":"query","name":"hct_final_percent","description":"Target fetal hematocrit as a percent (20-60). Must be strictly greater than hct_initial_percent and strictly less than hct_donor_percent.","required":true,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"hct_donor_percent","description":"Donor unit hematocrit as a percent (60-90). Must be strictly greater than hct_final_percent.","required":true,"schema":{"type":"number"},"example":"80"}],"summary":"Intrauterine RBC transfusion volume","operationId":"get_api_calc_intrauterine_rbc","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, estimated_fetal_weight_g, hct_initial_percent, hct_final_percent, hct_donor_percent, fetoplacental_volume_ml, volume_ml, citation, disclaimer."},"400":{"description":"invalid_iut: Intrauterine transfusion inputs must match Mandelbrot 1988 estimated fetal weight and hematocrit window from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/intrauterine-rbc"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Intrauterine RBC transfusion volume (bulk)","operationId":"post_api_calc_intrauterine_rbc","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_iut: Intrauterine transfusion inputs must match Mandelbrot 1988 estimated fetal weight and hematocrit window from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/intrauterine-rbc"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"estimated_fetal_weight_g":"1000","hct_donor_percent":"80","hct_final_percent":"40","hct_initial_percent":"20"},{"estimated_fetal_weight_g":"1000","hct_donor_percent":"80","hct_final_percent":"40","hct_initial_percent":"20"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/oocyte-live-birth":{"get":{"description":"Compute Goldman 2017 counseling probabilities of at least one, two, or three live births from a planned count of mature oocytes after elective cryopreservation, using that paper's autologous blastocyst and euploid rates or the donor-egg rates.\n\nWhen an agent already has integer age 24–44 years, a mature-oocyte count, and whether the oocytes are from a donor, and needs the published Goldman 2017 at-least-1/2/3 live-birth percents. magent does not count oocytes, assign donor status, or predict a clinic thaw rate. Not a guarantee of live birth and not oncofertility counseling.\n\nNot a medical device. Not a guarantee of live birth. magent does not count oocytes or assign donor status.\n\nDerivation used a surrogate ICSI male/tubal-factor population, not prospective thawed-oocyte outcomes.\n\nCenter thaw and blastocyst rates vary; this tool uses the paper's printed survival and blastocyst equations, not a local laboratory rate.\n\nNot oncofertility. Not a substitute for clinic-specific counseling after a thaw. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_years","description":"Integer age in years (24-44) at the time of the oocyte retrieval as assigned by the caller. Autologous Equation 1 groups age ≤35 as equation_age 35. Donor rates do not change with age, but age is still required. magent does not read an identity document.","required":true,"schema":{"type":"integer"},"example":37},{"in":"query","name":"mature_oocytes","description":"Count of mature (MII) oocytes to bank, integer 1-80, as assigned by the caller. Each oocyte is an independent Bernoulli trial at p_oocyte. magent does not count oocytes.","required":true,"schema":{"type":"integer"},"example":20},{"in":"query","name":"egg_donor","description":"true when the mature oocytes are from a donor as assigned by the caller; false for autologous oocytes. Donor path uses p_blast 0.3583 and p_euploid 0.647. true or false.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"Goldman 2017 oocyte live-birth counseling","operationId":"get_api_calc_oocyte_live_birth","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, mature_oocytes, egg_donor, p_blast, p_euploid, p_oocyte, p_at_least_1_percent, p_at_least_2_percent, p_at_least_3_percent, citation, disclaimer."},"400":{"description":"invalid_oocyte_live_birth: Goldman 2017 oocyte counseling inputs must match age 24-44 years, mature oocyte count, and egg_donor flag from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/oocyte-live-birth"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Goldman 2017 oocyte live-birth counseling (bulk)","operationId":"post_api_calc_oocyte_live_birth","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_oocyte_live_birth: Goldman 2017 oocyte counseling inputs must match age 24-44 years, mature oocyte count, and egg_donor flag from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/oocyte-live-birth"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_years":"37","egg_donor":"false","mature_oocytes":"20"},{"age_years":"37","egg_donor":"false","mature_oocytes":"20"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ehmrg":{"get":{"description":"Compute the Lee 2012 Emergency Heart Failure Mortality Risk Grade 7-day emergency-department integer score from age, EMS transport, initial systolic BP, heart rate, oxygen saturation, creatinine, potassium, troponin above ULN, active cancer, and home metolazone.\n\nWhen an agent has caller-supplied ED presentation values and needs the published Lee 2012 Table 3 7-day ED model total and derivation risk_group 1/2/3/4/5a/5b, not EHMRG30-ST, not ADHERE CART, and not a discharge or admission order.\n\nNot a medical device. magent does not examine the patient and does not measure vitals or laboratories.\n\nNot a discharge or admission order. This is the Lee 2012 7-day ED integer score only.\n\nThis is not EHMRG30-ST and not ADHERE CART.\n\nDialysis-dependent patients are excluded (Lee 2012 Methods and Table 3 footnote). dialysis_dependent must be false to score.\n\nUnpublished potassium gaps 3.91-3.99 mmol/L pin with the <=3.9 band (+5). Gaps 4.51-4.59 mmol/L pin with the >=4.6 band (+30). magent does not invent extra named potassium classes.\n\nThe caller assigns EMS transport, troponin above ULN, active cancer, home metolazone, and dialysis status. magent does not interpret assays or medication lists. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120). Lee 2012 Table 3 adds +2 per year. magent does not assign age.","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"ems_transport","description":"Transported by EMS as assigned by the caller (true or false). Lee 2012 Table 3: +60 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"systolic_mm_hg","description":"Initial/triage systolic blood pressure in mm Hg (integer 50-250). Lee 2012 Table 3 scores -1 * min(SBP, 160); values above 160 mm Hg are capped. magent does not measure blood pressure.","required":true,"schema":{"type":"integer"},"example":"160"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats/min (integer 30-220). Lee 2012 Table 3 scores +1 * clamp(HR, 80, 120): floor 80, ceiling 120. magent does not measure heart rate.","required":true,"schema":{"type":"integer"},"example":"80"},{"in":"query","name":"spo2_percent","description":"Lowest initial/triage oxygen saturation percent (50-100). Lee 2012 Table 3 scores -2 * min(SpO2, 92); values above 92% are capped. magent does not measure saturation.","required":true,"schema":{"type":"number"},"example":"92"},{"in":"query","name":"creatinine_mg_dl","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l, not both. Lee 2012 Table 3 adds +20 per mg/dL. magent does not measure creatinine.","required":false,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"creatinine_umol_l","description":"Serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42. Provide this or creatinine_mg_dl, not both.","required":false,"schema":{"type":"number"},"example":"88.4"},{"in":"query","name":"potassium_mmol_l","description":"Serum potassium in mmol/L (1.5-8.0). Lee 2012 Table 3: 4.0-4.5 inclusive → 0; >=4.6 → +30; <=3.9 → +5. Unpublished 3.91-3.99 pin with <=3.9; 4.51-4.59 pin with >=4.6. magent does not measure potassium.","required":true,"schema":{"type":"number"},"example":"4.2"},{"in":"query","name":"troponin_gt_uln","description":"Troponin above the local upper limit of normal as assigned by the caller (true or false). Lee 2012 Table 3: +60 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"active_cancer","description":"Active cancer as assigned by the caller (true or false). Lee 2012 Table 3: +45 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"metolazone","description":"Metolazone at home as assigned by the caller (true or false). Lee 2012 Table 3: +60 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"dialysis_dependent","description":"Dialysis dependence as assigned by the caller (true or false). Lee 2012 excludes dialysis-dependent patients; true returns HTTP 400. magent does not determine dialysis status.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"EHMRG","operationId":"get_api_calc_ehmrg","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, ehmrg_score, risk_group, age_years, ems_transport, systolic_mm_hg, heart_rate_bpm, spo2_percent, creatinine_mg_dl, potassium_mmol_l, troponin_gt_uln, active_cancer, metolazone, dialysis_dependent, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_potassium: potassium_mmol_l must be a number from 1.5 to 8.0. Returned before settlement; you are not charged.; invalid_ehmrg_dialysis: EHMRG is not for dialysis-dependent patients (Lee 2012). dialysis_dependent must be false to score. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ehmrg"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"EHMRG (bulk)","operationId":"post_api_calc_ehmrg","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_potassium: potassium_mmol_l must be a number from 1.5 to 8.0. Returned before settlement; you are not charged.; invalid_ehmrg_dialysis: EHMRG is not for dialysis-dependent patients (Lee 2012). dialysis_dependent must be false to score. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ehmrg"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"active_cancer":"false","age":"70","creatinine_mg_dl":"1.0","dialysis_dependent":"false","ems_transport":"false","heart_rate_bpm":"80","metolazone":"false","potassium_mmol_l":"4.2","spo2_percent":"92","systolic_mm_hg":"160","troponin_gt_uln":"false"},{"active_cancer":"false","age":"70","creatinine_mg_dl":"1.0","dialysis_dependent":"false","ems_transport":"false","heart_rate_bpm":"80","metolazone":"false","potassium_mmol_l":"4.2","spo2_percent":"92","systolic_mm_hg":"160","troponin_gt_uln":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/grobman-vbac":{"get":{"description":"Compute the Grobman 2007 first-prenatal-visit logistic probability of vaginal birth after cesarean from maternal age, prepregnancy BMI, caller-assigned ethnicity, any prior vaginal delivery, prior VBAC after cesarean, and recurrent cesarean indication.\n\nWhen an agent already has Grobman 2007 first-visit predictors and needs that paper's probability. Not a trial-of-labor order, not the Flamm admission score, not the 2009/2010 admission model, and not Grobman 2021.\n\nNot a medical device and not a trial-of-labor or cesarean order.\n\nethnicity is caller-assigned as african_american, hispanic, or other using Grobman 2007 terms. magent does not assign race or ethnicity.\n\nGrobman 2007 first prenatal visit logistic model only. Not the 2009/2010 admission or intrapartum model. A later MFMU model without race/ethnicity exists (Grobman 2021) and is not this tool.\n\nAge 12-55 and BMI 15-70 are clinical ranges for TOLAC. Grobman 2007 does not print those clamps.\n\nprior_vaginal, prior_vbac, and recurrent_indication are caller-assigned independently. magent does not infer obstetric history. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Maternal age in years (integer 12-55). Grobman 2007 coefficient -0.039 per year. 12-55 is a clinical range for TOLAC; the paper does not print that clamp. magent does not take a date of birth.","required":true,"schema":{"type":"integer"},"example":"30"},{"in":"query","name":"bmi_kg_m2","description":"Prepregnancy BMI in kg/m^2 (15-70). Grobman 2007 coefficient -0.060. 15-70 is a clinical range; the paper does not print that clamp. Caller-supplied; magent does not compute BMI from height and weight.","required":true,"schema":{"type":"number"},"example":"25"},{"in":"query","name":"ethnicity","description":"Caller-assigned ethnicity as used in Grobman 2007: african_american, hispanic, or other (mutually exclusive paper terms; other is the reference). magent does not assign race or ethnicity.","required":true,"schema":{"type":"string","enum":["african_american","hispanic","other"]},"example":"other"},{"in":"query","name":"prior_vaginal","description":"Any prior vaginal delivery as assigned by the caller (Grobman 2007). true scores +0.888. true or false. magent does not read the obstetric history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"prior_vbac","description":"VBAC after prior cesarean as assigned by the caller (Grobman 2007). true scores +1.003. true or false. magent does not infer this from prior_vaginal.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"recurrent_indication","description":"Recurring indication for cesarean as assigned by the caller (Grobman 2007). true scores -0.632. true or false. magent does not read the operative indication.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Grobman VBAC","operationId":"get_api_calc_grobman_vbac","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, bmi_kg_m2, ethnicity, prior_vaginal, prior_vbac, recurrent_indication, linear_predictor, vbac_probability, citation, disclaimer."},"400":{"description":"invalid_grobman_vbac: Grobman 2007 first-visit VBAC inputs must match age, BMI, caller-assigned ethnicity, prior vaginal birth, prior VBAC, and recurrent cesarean indication. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/grobman-vbac"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Grobman VBAC (bulk)","operationId":"post_api_calc_grobman_vbac","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_grobman_vbac: Grobman 2007 first-visit VBAC inputs must match age, BMI, caller-assigned ethnicity, prior vaginal birth, prior VBAC, and recurrent cesarean indication. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/grobman-vbac"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"30","bmi_kg_m2":"25","ethnicity":"other","prior_vaginal":"false","prior_vbac":"false","recurrent_indication":"false"},{"age":"30","bmi_kg_m2":"25","ethnicity":"other","prior_vaginal":"false","prior_vbac":"false","recurrent_indication":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/nhfs":{"get":{"description":"Sum the Maxwell 2008 Nottingham hip fracture score from seven preoperative variables and return the integer total (max 10).\n\nWhen an agent needs the published Maxwell 2008 integer NHFS and must not invent a 30-day mortality percent or an operative-clearance decision.\n\nNot a medical device and not operative clearance. magent does not clear a patient for surgery.\n\nInteger score only from Maxwell 2008. Does not output predicted 30-day mortality percent. Not the 2012 or 2015 recalibrated mortality models.\n\nmagent does not administer the Abbreviated Mental Test. amts_le_6 is a caller-assigned flag (AMTS ≤6/10).\n\ncomorbidities_ge_2 and malignancy (Maxwell 2008: active malignancy within 20 years) are caller-assigned; magent does not enumerate comorbidities or take a cancer history.\n\nHemoglobin ≤10 g/dL scores 1 (10.0 scores; 10.1 does not). Provide hemoglobin_g_dl or hemoglobin_g_l, not both. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). ≤65 scores 0; 66-85 scores 3; ≥86 scores 4 (Maxwell 2008).","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"sex","description":"female or male. Male scores 1; female scores 0.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"hemoglobin_g_dl","description":"Hemoglobin in g/dL (3-22). Provide this or hemoglobin_g_l, not both. ≤10 g/dL scores 1 (10.0 scores; 10.1 does not).","required":false,"schema":{"type":"number"},"example":"12"},{"in":"query","name":"hemoglobin_g_l","description":"Hemoglobin in g/L (30-220). Converted as hemoglobin_g_dl = hemoglobin_g_l / 10. Provide this or hemoglobin_g_dl, not both.","required":false,"schema":{"type":"number"},"example":"120"},{"in":"query","name":"amts_le_6","description":"Abbreviated Mental Test Score ≤6/10 as assigned by the caller (Maxwell 2008). true or false. magent does not administer AMTS. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"lives_in_institution","description":"Lives in an institution as assigned by the caller (Maxwell 2008). true or false. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"comorbidities_ge_2","description":"Two or more comorbidities as defined in Maxwell 2008, as assigned by the caller. true or false. magent does not enumerate comorbidities. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"malignancy","description":"Active malignancy (Maxwell 2008: within 20 years) as assigned by the caller. true or false. magent does not take a cancer history. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"NHFS","operationId":"get_api_calc_nhfs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, age_years, sex, hemoglobin_g_dl, amts_le_6, lives_in_institution, comorbidities_ge_2, malignancy, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nhfs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"NHFS (bulk)","operationId":"post_api_calc_nhfs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nhfs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"70","amts_le_6":"false","comorbidities_ge_2":"false","hemoglobin_g_dl":"12","lives_in_institution":"false","malignancy":"false","sex":"female"},{"age":"70","amts_le_6":"false","comorbidities_ge_2":"false","hemoglobin_g_dl":"12","lives_in_institution":"false","malignancy":"false","sex":"female"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-child-abdominal-migraine":{"get":{"description":"Apply the Hyams 2016 Rome IV H2c child/adolescent abdominal migraine diagnostic criteria and return associated_features_met (0-6) and whether the published H2c box holds (rome_iv_child_abdominal_migraine).\n\nWhen an agent already has the caller-assigned Hyams 2016 Rome IV H2c flags (four core episode flags, six associated features, not explained by another condition, and 6-month fulfillment) and needs whether the published child abdominal migraine box holds. magent does not examine the child.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose abdominal migraine.\n\nThe caller assigns the twelve flags. magent does not examine the child.\n\nThe published H2c box requires all features occurring at least twice; that frequency is assigned in fulfilled_at_least_6_months. magent does not parse a separate episode-count integer.\n\nPain should be the most severe and distressing symptom in the published box; that is not a separate parsed flag.\n\nThis tool is Hyams 2016 Rome IV H2c child/adolescent abdominal migraine only. Not Hyams 2016 H1a child cyclic vomiting. Not adult migraine scores. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"paroxysmal_intense_periumbilical_midline_or_diffuse_pain_lasting_1_hour_or_more","description":"Paroxysmal episodes of intense, acute periumbilical, midline, or diffuse abdominal pain lasting 1 hour or more, as assigned (Hyams 2016 Rome IV H2c). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"episodes_separated_weeks_to_months","description":"Episodes are separated by weeks to months, as assigned (Hyams 2016 Rome IV H2c). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"pain_incapacitating","description":"The pain is incapacitating and interferes with normal activities, as assigned (Hyams 2016 Rome IV H2c). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"stereotypical_pattern","description":"Stereotypical pattern and symptoms in the individual patient, as assigned (Hyams 2016 Rome IV H2c). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"anorexia","description":"Anorexia during episodes (one of six associated features; at least two required). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"nausea","description":"Nausea during episodes (one of six associated features; at least two required). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"vomiting","description":"Vomiting during episodes (one of six associated features; at least two required). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"headache","description":"Headache during episodes (one of six associated features; at least two required). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"photophobia","description":"Photophobia during episodes (one of six associated features; at least two required). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pallor","description":"Pallor during episodes (one of six associated features; at least two required). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"not_explained_by_another_condition","description":"After appropriate evaluation, the symptoms cannot be fully explained by another medical condition, as assigned (Hyams 2016 Rome IV H2c). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"fulfilled_at_least_6_months","description":"Criteria fulfilled for at least 6 months, including that all features occurred at least twice, as assigned (Hyams 2016 Rome IV H2c). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV child abdominal migraine","operationId":"get_api_calc_rome_iv_child_abdominal_migraine","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, associated_features_met, rome_iv_child_abdominal_migraine, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_child_abdominal_migraine: Rome IV child abdominal migraine needs the Hyams 2016 child/adolescent H2c flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-child-abdominal-migraine"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV child abdominal migraine (bulk)","operationId":"post_api_calc_rome_iv_child_abdominal_migraine","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_child_abdominal_migraine: Rome IV child abdominal migraine needs the Hyams 2016 child/adolescent H2c flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-child-abdominal-migraine"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"anorexia":"true","episodes_separated_weeks_to_months":"true","fulfilled_at_least_6_months":"true","headache":"false","nausea":"true","not_explained_by_another_condition":"true","pain_incapacitating":"true","pallor":"false","paroxysmal_intense_periumbilical_midline_or_diffuse_pain_lasting_1_hour_or_more":"true","photophobia":"false","stereotypical_pattern":"true","vomiting":"false"},{"anorexia":"true","episodes_separated_weeks_to_months":"true","fulfilled_at_least_6_months":"true","headache":"false","nausea":"true","not_explained_by_another_condition":"true","pain_incapacitating":"true","pallor":"false","paroxysmal_intense_periumbilical_midline_or_diffuse_pain_lasting_1_hour_or_more":"true","photophobia":"false","stereotypical_pattern":"true","vomiting":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/shock-index":{"get":{"description":"Compute the Allgöwer–Burri shock index as heart rate in bpm divided by cuff systolic pressure in mm Hg.\n\nWhen an agent needs the published heart-rate / systolic-pressure ratio and must not invent a shock cutoff or a MAP-based index.\n\nNot a diagnosis and not a treatment target. The original index is the ratio of heart rate to systolic pressure; magent does not diagnose shock.\n\nDoes not apply a shock or no-shock cutoff.\n\nDoes not use MAP or diastolic pressure in this tool. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats per minute (integer 30-220).","required":true,"schema":{"type":"integer"},"example":"80"},{"in":"query","name":"systolic_mm_hg","description":"Cuff systolic blood pressure in mm Hg (50-250).","required":true,"schema":{"type":"number"},"example":"120"}],"summary":"Shock index","operationId":"get_api_calc_shock_index","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, heart_rate_bpm, systolic_mm_hg, shock_index, citation, disclaimer."},"400":{"description":"invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/shock-index"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Shock index (bulk)","operationId":"post_api_calc_shock_index","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/shock-index"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"heart_rate_bpm":"80","systolic_mm_hg":"120"},{"heart_rate_bpm":"80","systolic_mm_hg":"120"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ivt-contraindications":{"get":{"description":"Apply Powers 2018 Table 6 Class III: Harm caller flags and return whether intravenous alteplase (IVT) is contraindicated. contraindicated is true iff any of the 15 published Harm flags is true.\n\nWhen an agent already has caller-assigned Powers 2018 Table 6 Class III Harm flags and needs the published any-flag combination. magent does not read CT, assay coagulation, or examine the patient. Not Class I eligibility, not a time window, and not a dose.\n\nNot a medical device and not a treatment order.\n\nEncodes Powers 2018 Table 6 Class III: Harm rows only. Does not encode Class III No Benefit rows (unclear/wake-up onset windows, extensive CT hypoattenuation), Class I eligibility, 0-3h vs 3-4.5h windows, or a dose.\n\nmagent does not read CT, assay coagulation, or examine the patient. Each flag is caller-assigned.\n\nNot eligibility for tenecteplase. Intravenous alteplase (IVT) Harm flags only.\n\nCoagulopathy is one caller-assigned flag (platelets <100000/mm3 or INR >1.7 or aPTT >40 s or PT >15 s as in Table 6). magent does not assay labs.\n\nDOAC not cleared is caller-assigned from that Table 6 row (direct thrombin or factor Xa inhibitor AND labs not documented normal AND last dose not >48 h with normal renal function). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ct_ich","description":"CT reveals acute intracranial hemorrhage as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not read CT.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ischemic_stroke_within_3_mo","description":"Prior ischemic stroke within 3 months as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not date prior strokes.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"severe_head_trauma_within_3_mo","description":"Recent severe head trauma within 3 months as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"posttraumatic_infarction_in_hospital","description":"Posttraumatic infarction in the acute in-hospital phase as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"intracranial_spinal_surgery_within_3_mo","description":"Intracranial or spinal surgery within 3 months as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not read an operative note.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"history_ich","description":"History of intracranial hemorrhage as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not read prior imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"sah_presentation","description":"Presentation most consistent with subarachnoid hemorrhage as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"gi_malignancy_or_gi_bleed_21d","description":"Structural GI malignancy or GI bleed within 21 days as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"coagulopathy","description":"Caller-assigned coagulopathy as in Table 6 (platelets <100000/mm3 or INR >1.7 or aPTT >40 s or PT >15 s). One flag. true or false. magent does not assay labs.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"lmwh_treatment_dose_within_24h","description":"Treatment-dose LMWH within the previous 24 h as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not read a medication list.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"doac_not_cleared","description":"Taking a direct thrombin or factor Xa inhibitor AND labs not documented normal AND last dose not >48 h with normal renal function, as assigned by the caller from that Table 6 row. true or false. magent does not assay labs.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"gp2b3a_concurrent","description":"Concurrent GP IIb/IIIa inhibitor as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not read a medication list.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"infective_endocarditis","description":"Symptoms consistent with infective endocarditis as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"aortic_arch_dissection","description":"Known or suspected aortic arch dissection as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"intra_axial_neoplasm","description":"Intra-axial intracranial neoplasm as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"IVT contraindications","operationId":"get_api_calc_ivt_contraindications","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, ct_ich, ischemic_stroke_within_3_mo, severe_head_trauma_within_3_mo, posttraumatic_infarction_in_hospital, intracranial_spinal_surgery_within_3_mo, history_ich, sah_presentation, gi_malignancy_or_gi_bleed_21d, coagulopathy, lmwh_treatment_dose_within_24h, doac_not_cleared, gp2b3a_concurrent, infective_endocarditis, aortic_arch_dissection, intra_axial_neoplasm, contraindicated, criteria, citation, disclaimer."},"400":{"description":"invalid_ivt: IVT contraindication flags must each be true or false as published in Powers 2018 Table 6 Class III Harm rows. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ivt-contraindications"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"IVT contraindications (bulk)","operationId":"post_api_calc_ivt_contraindications","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ivt: IVT contraindication flags must each be true or false as published in Powers 2018 Table 6 Class III Harm rows. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ivt-contraindications"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"aortic_arch_dissection":"false","coagulopathy":"false","ct_ich":"false","doac_not_cleared":"false","gi_malignancy_or_gi_bleed_21d":"false","gp2b3a_concurrent":"false","history_ich":"false","infective_endocarditis":"false","intra_axial_neoplasm":"false","intracranial_spinal_surgery_within_3_mo":"false","ischemic_stroke_within_3_mo":"false","lmwh_treatment_dose_within_24h":"false","posttraumatic_infarction_in_hospital":"false","sah_presentation":"false","severe_head_trauma_within_3_mo":"false"},{"aortic_arch_dissection":"false","coagulopathy":"false","ct_ich":"false","doac_not_cleared":"false","gi_malignancy_or_gi_bleed_21d":"false","gp2b3a_concurrent":"false","history_ich":"false","infective_endocarditis":"false","intra_axial_neoplasm":"false","intracranial_spinal_surgery_within_3_mo":"false","ischemic_stroke_within_3_mo":"false","lmwh_treatment_dose_within_24h":"false","posttraumatic_infarction_in_hospital":"false","sah_presentation":"false","severe_head_trauma_within_3_mo":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/esas-r":{"get":{"description":"Sum nine caller-assigned Watanabe 2011 ESAS-r integers (0-10) and return the total (max 90). Does not invent severity classes for the sum.\n\nWhen an agent has already assigned Watanabe 2011 ESAS-r 0-10 integers for the nine core items (now) and needs the published total, not a diagnosis, treatment order, Bruera 1991 ESAS, or ESAS-r Renal.\n\nNot a medical device and not a diagnosis or treatment order.\n\nEach of the nine items is a caller-assigned integer 0-10 (0 none/best, 10 worst) for how the person feels now. magent does not administer the form.\n\nThis is Watanabe 2011 ESAS-r only (nine core items; max 90). magent does not score Bruera 1991 original ESAS. Itch, sleep, and restless legs are not core ESAS-r items (those appear on ESAS-r Renal). The optional other-problem line is not a required input.\n\nWatanabe 2011 published the nine 0-10 ratings and did not publish severity classes for a summed total. This tool returns score and max_score only. It does not invent mild, moderate, or severe bands. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"pain","description":"Caller-assigned Watanabe 2011 ESAS-r pain (integer 0-10): 0 no pain, 10 worst possible pain; how the person feels now. magent does not administer the form.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"tiredness","description":"Caller-assigned Watanabe 2011 ESAS-r tiredness (integer 0-10): 0 no tiredness, 10 worst possible tiredness (tiredness = lack of energy); how the person feels now. magent does not administer the form.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"drowsiness","description":"Caller-assigned Watanabe 2011 ESAS-r drowsiness (integer 0-10): 0 no drowsiness, 10 worst possible drowsiness (drowsiness = feeling sleepy); how the person feels now. magent does not administer the form.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"nausea","description":"Caller-assigned Watanabe 2011 ESAS-r nausea (integer 0-10): 0 no nausea, 10 worst possible nausea; how the person feels now. magent does not administer the form.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"lack_of_appetite","description":"Caller-assigned Watanabe 2011 ESAS-r lack of appetite (integer 0-10): 0 no lack of appetite, 10 worst possible lack of appetite; how the person feels now. magent does not administer the form.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"shortness_of_breath","description":"Caller-assigned Watanabe 2011 ESAS-r shortness of breath (integer 0-10): 0 no shortness of breath, 10 worst possible shortness of breath; how the person feels now. magent does not administer the form.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"depression","description":"Caller-assigned Watanabe 2011 ESAS-r depression (integer 0-10): 0 no depression, 10 worst possible depression (depression = feeling sad); how the person feels now. magent does not administer the form.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"anxiety","description":"Caller-assigned Watanabe 2011 ESAS-r anxiety (integer 0-10): 0 no anxiety, 10 worst possible anxiety (anxiety = feeling nervous); how the person feels now. magent does not administer the form.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"wellbeing","description":"Caller-assigned Watanabe 2011 ESAS-r wellbeing (integer 0-10): 0 best wellbeing, 10 worst possible wellbeing (wellbeing = how you feel overall); how the person feels now. magent does not administer the form.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"ESAS-r","operationId":"get_api_calc_esas_r","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_esas_item: each ESAS-r item must be an integer from 0 to 10 (Watanabe 2011). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/esas-r"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ESAS-r (bulk)","operationId":"post_api_calc_esas_r","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_esas_item: each ESAS-r item must be an integer from 0 to 10 (Watanabe 2011). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/esas-r"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"anxiety":"0","depression":"0","drowsiness":"0","lack_of_appetite":"0","nausea":"0","pain":"0","shortness_of_breath":"0","tiredness":"0","wellbeing":"0"},{"anxiety":"0","depression":"0","drowsiness":"0","lack_of_appetite":"0","nausea":"0","pain":"0","shortness_of_breath":"0","tiredness":"0","wellbeing":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/circ":{"get":{"description":"Compute Garibaldi 2020 CIRC probabilities of progression to severe disease or death at hospital days 2, 4, and 7 from admission age, nursing-home residence, caller-assigned race term, Charlson CCI, BMI, symptoms, vitals, and listed laboratories using Appendix Table 1 coefficients on the published reference-patient cumulative incidences.\n\nWhen an agent already has the Appendix Table 1 admission profile assigned and needs the printed CIRC day-2/4/7 probabilities, not 4C, VACO, or COVID-GRAM, and not the death-only Appendix Table 2 model.\n\nNot a medical device and not a diagnosis. Not a triage, treatment, isolation, or disposition order.\n\nmagent does not assign race. The Non-White vs White term is caller-assigned as published; magent does not determine race or ethnicity.\n\nmagent does not assign Charlson diagnoses, read a chest film, or measure the patient. CCI, symptoms, fever, troponin detectability, and the D-dimer threshold flag are caller-assigned.\n\nThis tool applies Appendix Table 1 estimates to the printed reference cumulative incidences (day 2 10%, day 4 13%, day 7 15%). The competing-risk discharge Cox coefficients were not printed and are not used. Not the Appendix Table 2 death-only model. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120). Appendix Table 1 bands: <60 (term -0.61), 60-74 (reference 0), >=75 (term -0.71). Derivation excluded ages under 18.","required":true,"schema":{"type":"integer"},"example":65},{"in":"query","name":"sex","description":"Sex as assigned by the caller. female is the Appendix Table 1 reference (0). male adds 0.31 if age<60, -0.47 if age 60-74, 0.10 if age>=75. magent does not assign sex.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"race","description":"Caller-assigned Garibaldi 2020 paper term Non-White race vs White race. white is the reference (0). nonwhite adds 0.08. magent does not assign race.","required":true,"schema":{"type":"string","enum":["white","nonwhite"]},"example":"white"},{"in":"query","name":"nursing_home","description":"Admitted from a nursing home as assigned by the caller. false is the reference (0). true adds -0.24 if age<75, -0.22 if age>=75.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"bmi","description":"Body mass index in kg/m2 (10-80). Appendix Table 1: 0.17 per increment of 5 kg/m2 versus the reference BMI of 30. obesity in the response is BMI >= 30.","required":true,"schema":{"type":"number"},"example":30},{"in":"query","name":"cci","description":"Caller-assigned Charlson comorbidity index (integer 0-37). Appendix Table 1 per 1-point: 0.19 if age<60, -0.23 if age 60-74, 0.14 if age>=75. Reference CCI 0. magent does not assign Charlson diagnoses.","required":true,"schema":{"type":"integer"},"example":0},{"in":"query","name":"respiratory_symptoms","description":"Respiratory symptoms present vs absent as assigned by the caller. false is the reference. true adds 0.81.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"gastrointestinal_symptoms","description":"Gastrointestinal symptoms present vs absent as assigned by the caller. false is the reference. true adds -0.14.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"constitutional_symptoms","description":"Constitutional symptoms present vs absent as assigned by the caller. false is the reference. true adds -0.57.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"loss_of_taste_smell","description":"Loss of taste and smell present vs absent as assigned by the caller. false is the reference. true adds -0.30.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"fever","description":"Temperature >38.0 C within 24 hours of admission as assigned by the caller. false is the reference. true adds 0.56.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"pulse","description":"Pulse in beats/min (30-220). Appendix Table 1: -0.02 per increment of 10 versus the reference pulse of 85.","required":true,"schema":{"type":"number"},"example":85},{"in":"query","name":"respiratory_rate","description":"Respiratory rate in breaths/min (6-60). Appendix Table 1 linear spline with knot at 18: -0.25 per unit below 18, 0.13 per unit at or above 18. Reference RR 21.","required":true,"schema":{"type":"number"},"example":21},{"in":"query","name":"leukocyte_k","description":"Leukocyte count in K cells/mm3 (0.5-100). Appendix Table 1: -0.06 times the natural log. Reference 6.8.","required":true,"schema":{"type":"number"},"example":6.8},{"in":"query","name":"lymphocyte_k","description":"Absolute lymphocyte count in K cells/mm3 (0.1-10). Appendix Table 1: -0.29 times the natural log. Reference 1.0.","required":true,"schema":{"type":"number"},"example":1.0},{"in":"query","name":"alt_u_l","description":"Alanine aminotransferase in U/L (1-2000). Appendix Table 1: 0.02 times the natural log. Reference 30.0.","required":true,"schema":{"type":"number"},"example":30},{"in":"query","name":"hemoglobin_g_dl","description":"Hemoglobin in g/dL (4-20). Appendix Table 1: 0.04 per 1-point decrease versus the reference 12.9 g/dL.","required":true,"schema":{"type":"number"},"example":12.9},{"in":"query","name":"albumin_g_dl","description":"Albumin in g/dL (1-6). Appendix Table 1: 0.23 per 0.5 g/dL decrease below 4 g/dL (no term when albumin >= 4). Reference 3.7.","required":true,"schema":{"type":"number"},"example":3.7},{"in":"query","name":"gfr","description":"GFR in mL/min per 1.73 m2 (5-150). Appendix Table 1: -0.03 per increase of 10 versus the reference 71.","required":true,"schema":{"type":"number"},"example":71},{"in":"query","name":"crp_mg_dl","description":"C-reactive protein in mg/dL (0.1-50). Appendix Table 1: 0.20 times the natural log. Reference 5.7.","required":true,"schema":{"type":"number"},"example":5.7},{"in":"query","name":"ferritin_ng_ml","description":"Ferritin in ng/mL (10-20000). Appendix Table 1: 0.11 times the natural log. Reference 545.","required":true,"schema":{"type":"number"},"example":545},{"in":"query","name":"troponin_detectable","description":"Detectable troponin vs not as assigned by the caller. false is the reference. true adds 0.19 if age<60, 1.36 if age 60-74, 0.35 if age>=75.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"d_dimer_gt_1","description":"D-dimer above the Appendix Table 1 threshold (>1 mg/dL FEU) as assigned by the caller. false is the reference. true adds 0.24.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"CIRC (Garibaldi 2020)","operationId":"get_api_calc_circ","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age, sex, race, nursing_home, bmi, cci, respiratory_symptoms, gastrointestinal_symptoms, constitutional_symptoms, loss_of_taste_smell, fever, pulse, respiratory_rate, leukocyte_k, lymphocyte_k, alt_u_l, hemoglobin_g_dl, albumin_g_dl, gfr, crp_mg_dl, ferritin_ng_ml, troponin_detectable, d_dimer_gt_1, age_band, obesity, logit_delta, day_2_percent, day_4_percent, day_7_percent, citation, disclaimer."},"400":{"description":"invalid_circ: CIRC inputs must match Garibaldi 2020 admission age, nursing-home residence, comorbidities, obesity, respiratory findings, and listed laboratory bands. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/circ"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CIRC (Garibaldi 2020) (bulk)","operationId":"post_api_calc_circ","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_circ: CIRC inputs must match Garibaldi 2020 admission age, nursing-home residence, comorbidities, obesity, respiratory findings, and listed laboratory bands. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/circ"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"65","albumin_g_dl":"3.7","alt_u_l":"30","bmi":"30","cci":"0","constitutional_symptoms":"false","crp_mg_dl":"5.7","d_dimer_gt_1":"false","ferritin_ng_ml":"545","fever":"false","gastrointestinal_symptoms":"false","gfr":"71","hemoglobin_g_dl":"12.9","leukocyte_k":"6.8","loss_of_taste_smell":"false","lymphocyte_k":"1.0","nursing_home":"false","pulse":"85","race":"white","respiratory_rate":"21","respiratory_symptoms":"false","sex":"female","troponin_detectable":"false"},{"age":"65","albumin_g_dl":"3.7","alt_u_l":"30","bmi":"30","cci":"0","constitutional_symptoms":"false","crp_mg_dl":"5.7","d_dimer_gt_1":"false","ferritin_ng_ml":"545","fever":"false","gastrointestinal_symptoms":"false","gfr":"71","hemoglobin_g_dl":"12.9","leukocyte_k":"6.8","loss_of_taste_smell":"false","lymphocyte_k":"1.0","nursing_home":"false","pulse":"85","race":"white","respiratory_rate":"21","respiratory_symptoms":"false","sex":"female","troponin_detectable":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/acr-eular-sjogren":{"get":{"description":"Apply the 2016 ACR/EULAR classification criteria for primary Sjögren's syndrome (Shiboski Table 3): require published inclusion and no exclusion, then return the five-item weighted score and whether the ≥4 cut point classifies primary Sjögren's syndrome. Not a diagnosis.\n\nWhen an agent already has caller-assigned Shiboski 2016 inclusion, exclusion, and the five criteria items and needs the published primary Sjögren classification result for research, not a diagnosis.\n\nNot a medical device and not a diagnosis of Sjögren's syndrome. Classification criteria for research, not AECG 2002 and not 2012 ACR-only criteria.\n\nInclusion (inclusion_met true) and exclusion (exclusion_present false) must be met or the request is HTTP 400 and is not scored.\n\nmagent does not stain eyes, measure saliva, assay anti-SSA/Ro, or read labial salivary gland biopsies. Anti-SSB/La without SSA is not an item.\n\nClassification criteria for research, not a treatment decision. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"inclusion_met","description":"Must be true. Shiboski 2016 inclusion as assigned by the caller: at least one AECG ocular or oral dryness question positive, or suspicion of Sjögren's syndrome from ESSDAI with at least one positive domain item. false is invalid and is not scored. magent does not take a dryness history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"exclusion_present","description":"Must be false. Shiboski 2016 exclusion as assigned by the caller: none of head and neck radiation, active HCV with PCR confirmation, AIDS, sarcoidosis, amyloidosis, graft-versus-host disease, or IgG4-related disease. true is invalid and is not scored. magent does not diagnose exclusion conditions.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"labial_biopsy_fs_ge_1","description":"Labial salivary gland with focal lymphocytic sialadenitis and focus score ≥1 foci/4 mm² (Shiboski 2016 Table 3). true scores 3; false scores 0. magent does not read biopsies.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"anti_ssa_ro","description":"Anti-SSA/Ro positive as assigned by the caller (Shiboski 2016 Table 3). true scores 3; false scores 0. Anti-SSB/La without SSA is not an item. magent does not assay autoantibodies.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ocular_staining","description":"Ocular staining score ≥5 or van Bijsterveld ≥4 in at least one eye (Shiboski 2016 Table 3). true scores 1; false scores 0. magent does not stain eyes.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"schirmer","description":"Schirmer's test ≤5 mm/5 minutes in at least one eye (Shiboski 2016 Table 3). true scores 1; false scores 0. magent does not perform Schirmer testing.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"uws","description":"Unstimulated whole saliva flow rate ≤0.1 ml/minute (Shiboski 2016 Table 3). true scores 1; false scores 0. magent does not measure saliva.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"ACR/EULAR Sjögren","operationId":"get_api_calc_acr_eular_sjogren","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, classified, components, citation, disclaimer."},"400":{"description":"invalid_sjogren: inclusion_met must be true and exclusion_present must be false (Shiboski 2016 ACR/EULAR primary Sjögren inclusion and exclusion). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/acr-eular-sjogren"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ACR/EULAR Sjögren (bulk)","operationId":"post_api_calc_acr_eular_sjogren","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_sjogren: inclusion_met must be true and exclusion_present must be false (Shiboski 2016 ACR/EULAR primary Sjögren inclusion and exclusion). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/acr-eular-sjogren"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"anti_ssa_ro":"false","exclusion_present":"false","inclusion_met":"true","labial_biopsy_fs_ge_1":"true","ocular_staining":"true","schirmer":"false","uws":"false"},{"anti_ssa_ro":"false","exclusion_present":"false","inclusion_met":"true","labial_biopsy_fs_ge_1":"true","ocular_staining":"true","schirmer":"false","uws":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/scarf":{"get":{"description":"Sum the four Hardin 2019 Sequential Clinical Assessment of Respiratory Function (SCARF) flags and return the integer total 0-4 plus whether the score is greater than the paper's proposed threshold of 2.\n\nWhen an agent already has caller-assigned Hardin 2019 SCARF flags for a single snapshot (admission or daily value) after rib fracture and needs the published 0-4 total and score-greater-than-2 flag without inventing named risk classes, serial day-1 versus day-2 inputs, or an analgesia or SSRF order.\n\nNot a medical device.\n\nNot an analgesia, epidural, or surgical stabilization of rib fractures (SSRF) order.\n\nmagent does not measure incentive spirometry, count respiratory rate, score pain, or examine the chest. The caller assigns the four Hardin 2019 flags (incentive spirometry <50% predicted, respiratory rate >20 breaths/min, numeric pain score ≥5, and inadequate cough unable to clear secretions).\n\nThis is a single snapshot (admission or daily value the caller supplies). It does not require serial day-1 versus day-2 inputs.\n\nHardin 2019 proposed a threshold of score greater than 2. magent does not invent 0 = low / 1–2 = intermediate / 3–4 = high classes. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"incentive_spirometry_lt_50_predicted","description":"Incentive spirometry volume <50% of predicted as assigned by the caller (Hardin 2019). true or false. magent does not measure incentive spirometry.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"respiratory_rate_gt_20","description":"Respiratory rate >20 breaths/min as assigned by the caller (Hardin 2019). true or false. magent does not count respiratory rate.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pain_score_ge_5","description":"Numeric pain score ≥5 as assigned by the caller (Hardin 2019). true or false. magent does not score pain.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"inadequate_cough","description":"Inadequate cough (unable to clear secretions) as assigned by the caller (Hardin 2019). true or false. magent does not examine the chest or cough.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"SCARF","operationId":"get_api_calc_scarf","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, scarf_gt_2, components, citation, disclaimer."},"400":{"description":"invalid_scarf: SCARF needs Hardin 2019 incentive-spirometry, respiratory-rate, pain, and cough flags. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/scarf"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SCARF (bulk)","operationId":"post_api_calc_scarf","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_scarf: SCARF needs Hardin 2019 incentive-spirometry, respiratory-rate, pain, and cough flags. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/scarf"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"inadequate_cough":"false","incentive_spirometry_lt_50_predicted":"false","pain_score_ge_5":"false","respiratory_rate_gt_20":"false"},{"inadequate_cough":"false","incentive_spirometry_lt_50_predicted":"false","pain_score_ge_5":"false","respiratory_rate_gt_20":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/twist":{"get":{"description":"Sum the five Barbosa 2013 TWIST flags for an already-examined acute scrotum and return the 0–7 score and published risk band (low 0–2, intermediate 3–4, high 5–7).\n\nWhen an agent has already assigned the five Barbosa 2013 TWIST flags and needs the published point total and risk band. magent does not examine the patient and does not diagnose torsion or order ultrasound or surgery.\n\nNot a medical device.\n\nNot a testicular torsion diagnosis.\n\nNot an ultrasound order or an operative order.\n\nmagent does not examine the patient.\n\nBarbosa 2013 derived the score in children with acute scrotum. The score has no age points.\n\nRisk bands use published cutoffs 2 and 5 (low 0–2, intermediate 3–4, high 5–7). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"testicular_swelling","description":"Testicular swelling as assigned by the caller (Barbosa 2013). true scores 2. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hard_testicle","description":"Hard testicle as assigned by the caller (Barbosa 2013). true scores 2. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"absent_cremasteric_reflex","description":"Absent cremasteric reflex as assigned by the caller (Barbosa 2013). true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"nausea_or_vomiting","description":"Nausea or vomiting as assigned by the caller (Barbosa 2013). true scores 1. magent does not take a symptom history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"high_riding_testis","description":"High-riding testis as assigned by the caller (Barbosa 2013). true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"TWIST","operationId":"get_api_calc_twist","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/twist"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"TWIST (bulk)","operationId":"post_api_calc_twist","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/twist"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"absent_cremasteric_reflex":"false","hard_testicle":"false","high_riding_testis":"false","nausea_or_vomiting":"false","testicular_swelling":"false"},{"absent_cremasteric_reflex":"false","hard_testicle":"false","high_riding_testis":"false","nausea_or_vomiting":"false","testicular_swelling":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/boston-syncope":{"get":{"description":"Apply the Grossman 2007 Boston Syncope criteria from eight caller-assigned flags and return whether any high-risk (Boston-positive) flag is present.\n\nWhen an agent already has the eight Grossman 2007 flags for an adult (paper enrolled ages 18 and older) with syncope and needs whether the published criteria are high-risk (Boston-positive) or low-risk. magent does not examine the patient, interpret an ECG, or assay hematocrit.\n\nNot a medical device.\n\nNot a disposition or admission order.\n\nmagent does not examine the patient or interpret ECG or hematocrit. The caller assigns the eight flags.\n\nAdult tool (Grossman 2007 enrolled patients 18 years and older). Age is not a parameter.\n\nNot San Francisco Syncope, EGSYS, ROSE, or OESIL. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"acs_signs_symptoms","description":"Signs and symptoms of acute coronary syndrome as assigned by the caller (Grossman 2007). true is a Boston-positive flag. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"conduction_disease","description":"Signs of conduction disease as assigned by the caller (Grossman 2007). true is a Boston-positive flag. magent does not interpret an ECG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"worrisome_cardiac_history","description":"Worrisome cardiac history as assigned by the caller (Grossman 2007). true is a Boston-positive flag. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"valvular_heart_disease","description":"Valvular heart disease by history or physical examination as assigned by the caller (Grossman 2007). true is a Boston-positive flag. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"family_history_sudden_death","description":"Family history of sudden death as assigned by the caller (Grossman 2007). true is a Boston-positive flag. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"persistent_abnormal_vitals","description":"Persistent abnormal vital signs in the ED as assigned by the caller (Grossman 2007). true is a Boston-positive flag. magent does not measure vital signs.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"volume_depletion","description":"Volume depletion (persistent dehydration, GI bleeding, or hematocrit <30) as assigned by the caller (Grossman 2007). true is a Boston-positive flag. magent does not assay hematocrit.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"primary_cns_event","description":"Primary central nervous system event as assigned by the caller (Grossman 2007). true is a Boston-positive flag. magent does not interpret imaging.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Boston Syncope","operationId":"get_api_calc_boston_syncope","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, high_risk, low_risk, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/boston-syncope"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Boston Syncope (bulk)","operationId":"post_api_calc_boston_syncope","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/boston-syncope"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"acs_signs_symptoms":"false","conduction_disease":"false","family_history_sudden_death":"false","persistent_abnormal_vitals":"false","primary_cns_event":"false","valvular_heart_disease":"false","volume_depletion":"false","worrisome_cardiac_history":"false"},{"acs_signs_symptoms":"false","conduction_disease":"false","family_history_sudden_death":"false","persistent_abnormal_vitals":"false","primary_cns_event":"false","valvular_heart_disease":"false","volume_depletion":"false","worrisome_cardiac_history":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/chalice":{"get":{"description":"Apply the Dunning 2006 CHALICE rule and return whether CT is required from caller-assigned history, examination, and mechanism findings after head injury in a child younger than 16.\n\nWhen an agent has caller-assigned findings after head injury in a child 0-15 years and needs the Dunning 2006 CHALICE CT rule, not PECARN, CATCH, or Canadian CT Head.\n\nNot a medical device. Not a diagnosis. magent does not examine the child.\n\nThis tool is the Dunning 2006 CHALICE rule only. It is not PECARN, not CATCH, and not the Canadian CT Head Rule.\n\nAge is integer years 0-15 (children younger than 16). GCS is an integer 3-15 as assigned by the caller.\n\nThe GCS criterion is GCS <14, or GCS <15 if age <1 year. Bruise, swelling, or laceration >5 cm requires CT only when age <1 year; the flag is parsed but does not score at age 1-15.\n\nMechanism findings are caller-assigned (paper: high-speed RTA >40 mph as occupant, pedestrian, or cyclist; fall >3 m; high-speed injury from a projectile or object). magent does not classify mechanism.\n\nSuspicion of non-accidental injury is caller-assigned. magent does not diagnose NAI. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in whole years (0-15). CHALICE is for children younger than 16. Age 0 is younger than 1 year (GCS <15 and bruise >5 cm apply). Age 1-15 uses GCS <14. Age 16 is rejected.","required":true,"schema":{"type":"integer"},"example":"10"},{"in":"query","name":"gcs","description":"Glasgow Coma Scale total, integer 3-15 as assigned by the caller. Examination criterion: GCS <14, or GCS <15 if age <1 year.","required":true,"schema":{"type":"integer"},"example":"15"},{"in":"query","name":"loc_gt_5_min","description":"Witnessed loss of consciousness >5 minutes. true or false as assigned by the caller. History criterion. magent does not take a duration integer.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"amnesia_gt_5_min","description":"Amnesia (anterograde or retrograde) >5 minutes. true or false as assigned by the caller. History criterion. magent does not take a duration integer.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"abnormal_drowsiness","description":"Abnormal drowsiness. true or false as assigned by the caller. History criterion. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"vomits_ge_3","description":"Three or more vomits after the head injury. true or false as assigned by the caller. History criterion.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"suspicion_nai","description":"Suspicion of non-accidental injury as assigned by the caller. true or false. History criterion. magent does not diagnose NAI.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"seizure_no_epilepsy","description":"Seizure after the head injury in a child with no history of epilepsy. true or false as assigned by the caller. History criterion.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"penetrating_depressed_or_tense_fontanelle","description":"Suspicion of penetrating or depressed skull injury or tense fontanelle. true or false as assigned by the caller. Examination criterion. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"basal_skull_fracture","description":"Signs of basal skull fracture. true or false as assigned by the caller. Examination criterion. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"focal_neurology","description":"Positive focal neurology. true or false as assigned by the caller. Examination criterion. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bruise_swelling_laceration_gt_5cm","description":"Bruise, swelling, or laceration >5 cm. true or false as assigned by the caller. Examination criterion that scores only when age <1 year; parsed but not scored when age >= 1. magent does not measure the lesion.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"high_speed_rta","description":"High-speed road traffic accident as occupant, pedestrian, or cyclist as assigned by the caller (paper: speed >40 mph). true or false. Mechanism criterion. magent does not classify mechanism.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"fall_gt_3m","description":"Fall >3 m as assigned by the caller. true or false. Mechanism criterion. magent does not classify mechanism or take a height integer.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"high_speed_projectile_or_object","description":"High-speed injury from a projectile or object as assigned by the caller. true or false. Mechanism criterion. magent does not classify mechanism.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"CHALICE","operationId":"get_api_calc_chalice","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, gcs, chalice_ct_required, chalice_low_risk, criteria, citation, disclaimer."},"400":{"description":"invalid_chalice_age: age must be an integer from 0 to 15 (Dunning 2006 CHALICE, children younger than 16). Returned before settlement; you are not charged.; invalid_gcs_total: gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/chalice"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CHALICE (bulk)","operationId":"post_api_calc_chalice","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_chalice_age: age must be an integer from 0 to 15 (Dunning 2006 CHALICE, children younger than 16). Returned before settlement; you are not charged.; invalid_gcs_total: gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/chalice"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"abnormal_drowsiness":"false","age":"10","amnesia_gt_5_min":"false","basal_skull_fracture":"false","bruise_swelling_laceration_gt_5cm":"false","fall_gt_3m":"false","focal_neurology":"false","gcs":"15","high_speed_projectile_or_object":"false","high_speed_rta":"false","loc_gt_5_min":"false","penetrating_depressed_or_tense_fontanelle":"false","seizure_no_epilepsy":"false","suspicion_nai":"false","vomits_ge_3":"false"},{"abnormal_drowsiness":"false","age":"10","amnesia_gt_5_min":"false","basal_skull_fracture":"false","bruise_swelling_laceration_gt_5cm":"false","fall_gt_3m":"false","focal_neurology":"false","gcs":"15","high_speed_projectile_or_object":"false","high_speed_rta":"false","loc_gt_5_min":"false","penetrating_depressed_or_tense_fontanelle":"false","seizure_no_epilepsy":"false","suspicion_nai":"false","vomits_ge_3":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/stop-bang":{"get":{"description":"Compute Chung 2008 Appendix 2 STOP-Bang from four STOP flags and computed BANG (BMI >35, age >50, neck >40 cm, male) and return the published 0-2 / >=3 OSA-risk band.\n\nWhen an agent needs the published Chung 2008 STOP-Bang total and two-tier band and must not invent a sleep-study order or the Chung 2012 three-tier scheme.\n\nNot a medical device. magent does not diagnose obstructive sleep apnea.\n\nNot a sleep-study (polysomnography) order and not an airway-management protocol.\n\nThis is Chung 2008 Appendix 2 STOP-Bang with two bands (yes to fewer than three items = 0-2; yes to three or more = >=3). It is not the Chung 2012 three-tier 0-2 / 3-4 / 5-8 scheme.\n\nBANG items are computed from bmi_kg_m2, age, neck_cm, and sex. magent does not accept BANG as caller flags.\n\nBMI 35, age 50, and neck 40 cm do not score (strict greater-than). Percents and AHI sensitivities are not returned. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"snoring","description":"Loud snoring heard through closed doors (Chung 2008 Appendix 2 STOP). true or false. Caller-assigned. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"tired","description":"Daytime tiredness, fatigue, or sleepiness (Chung 2008 Appendix 2 STOP). true or false. Caller-assigned. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"observed_apnea","description":"Anyone observed the patient stop breathing during sleep (Chung 2008 Appendix 2 STOP). true or false. Caller-assigned. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypertension","description":"Has or is being treated for high blood pressure (Chung 2008 Appendix 2 STOP). true or false. Caller-assigned. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bmi_kg_m2","description":"Body-mass index in kg/m^2 (10-80). Chung 2008 Appendix 2 BANG: scores 1 when >35. BMI 35 does not score. Caller-supplied; magent does not compute BMI from height and weight.","required":true,"schema":{"type":"number"},"example":"30"},{"in":"query","name":"age","description":"Age in years (18-120). Chung 2008 Appendix 2 BANG: scores 1 when >50. Age 50 does not score.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"neck_cm","description":"Neck circumference in cm (20-80). Chung 2008 Appendix 2 BANG: scores 1 when >40. Neck 40 does not score.","required":true,"schema":{"type":"number"},"example":"38"},{"in":"query","name":"sex","description":"female or male. Chung 2008 Appendix 2 BANG: male scores 1. Female scores 0.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"}],"summary":"STOP-Bang","operationId":"get_api_calc_stop_bang","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, stop_bang_band, snoring, tired, observed_apnea, hypertension, bmi_kg_m2, age_years, neck_cm, sex, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_neck_cm: neck_cm must be a number from 20 to 80 (Chung 2008 STOP-Bang). Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/stop-bang"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"STOP-Bang (bulk)","operationId":"post_api_calc_stop_bang","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_bmi_kg_m2: bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_neck_cm: neck_cm must be a number from 20 to 80 (Chung 2008 STOP-Bang). Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/stop-bang"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","bmi_kg_m2":"30","hypertension":"false","neck_cm":"38","observed_apnea":"false","sex":"female","snoring":"false","tired":"false"},{"age":"40","bmi_kg_m2":"30","hypertension":"false","neck_cm":"38","observed_apnea":"false","sex":"female","snoring":"false","tired":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/aims65":{"get":{"description":"Compute the Saltzman 2011 AIMS65 score for in-hospital mortality in acute upper GI bleeding from albumin, INR, caller-assigned altered mental status, systolic blood pressure, and age.\n\nWhen an agent needs the published AIMS65 total and must not invent Glasgow-Blatchford, Rockall, or mortality percentages.\n\nNot a diagnosis. magent does not diagnose the cause or severity of bleeding.\n\nNot Glasgow-Blatchford and not Rockall. This tool is the Saltzman 2011 AIMS65 score only.\n\nmagent does not assess mental status. altered_mental_status is a caller-assigned flag.\n\nAlbumin <3.0 g/dL, INR >1.5, and age >65 are strict inequalities: albumin 3.0, INR 1.5, and age 65 do not score. Systolic BP ≤90 mm Hg includes 90. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Scores 1 when age >65; 65 does not score.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"albumin_g_dl","description":"Albumin in g/dL (1-6). Provide this or albumin_g_l, not both. Scores 1 when <3.0; 3.0 does not score.","required":false,"schema":{"type":"number"},"example":"4.0"},{"in":"query","name":"albumin_g_l","description":"Albumin in g/L (10-60). Converted as g/dL = g/L / 10. Provide this or albumin_g_dl, not both.","required":false,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"inr","description":"INR (0.8-10). Scores 1 when >1.5; 1.5 does not score.","required":true,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"altered_mental_status","description":"Altered mental status as assigned by the caller. true or false. magent does not assess mental status. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"systolic_mm_hg","description":"Cuff systolic blood pressure in mm Hg (50-250). Scores 1 when ≤90; 90 scores.","required":true,"schema":{"type":"number"},"example":"120"}],"summary":"AIMS65","operationId":"get_api_calc_aims65","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, age_years, albumin_g_dl, inr, systolic_mm_hg, components, citation, disclaimer."},"400":{"description":"invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_inr: inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/aims65"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"AIMS65 (bulk)","operationId":"post_api_calc_aims65","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_inr: inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/aims65"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","albumin_g_dl":"4.0","altered_mental_status":"false","inr":"1.0","systolic_mm_hg":"120"},{"age":"50","albumin_g_dl":"4.0","altered_mental_status":"false","inr":"1.0","systolic_mm_hg":"120"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/bacterial-meningitis":{"get":{"description":"Sum the Nigrovic 2002 Bacterial Meningitis Score weights for children with CSF pleocytosis and return very_low_risk (0) or not_low_risk (≥1).\n\nWhen an agent needs the published Bacterial Meningitis Score point total and band and must not invent a later numeric cutoff, a meningitis diagnosis, or an antibiotic or LP order.\n\nNot a medical device and not a meningitis diagnosis or an antibiotic/LP order. magent does not examine the patient.\n\nApplies to children with CSF pleocytosis as in Nigrovic 2002. It is not a neonatal meningitis score.\n\nmagent does not stain CSF, count neutrophils, assay protein, or witness a seizure. All five inputs are caller-assigned flags.\n\nCSF Gram stain true scores 2 points in Nigrovic 2002. It does not score 1.\n\nvery_low_risk is score 0 (lack all criteria). not_low_risk is score ≥1. Do not apply a later numeric cutoff. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"csf_gram_stain","description":"Positive CSF Gram stain as assigned by the caller (Nigrovic 2002). true scores 2, not 1. magent does not stain CSF.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"csf_anc_ge_1000","description":"CSF ANC ≥1000 cells/µL as assigned by the caller (Nigrovic 2002). true scores 1. magent does not count neutrophils.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"csf_protein_ge_80","description":"CSF protein ≥80 mg/dL as assigned by the caller (Nigrovic 2002). true scores 1. magent does not assay protein.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"peripheral_anc_ge_10000","description":"Peripheral ANC ≥10 000 cells/µL as assigned by the caller (Nigrovic 2002). true scores 1. magent does not count neutrophils.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"seizure","description":"Seizure at or before presentation as assigned by the caller (Nigrovic 2002). true scores 1. magent does not witness a seizure.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Bacterial Meningitis Score","operationId":"get_api_calc_bacterial_meningitis","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, bacterial_meningitis_band, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bacterial-meningitis"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Bacterial Meningitis Score (bulk)","operationId":"post_api_calc_bacterial_meningitis","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bacterial-meningitis"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"csf_anc_ge_1000":"false","csf_gram_stain":"false","csf_protein_ge_80":"false","peripheral_anc_ge_10000":"false","seizure":"false"},{"csf_anc_ge_1000":"false","csf_gram_stain":"false","csf_protein_ge_80":"false","peripheral_anc_ge_10000":"false","seizure":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ascvd-vhr":{"get":{"description":"Apply AHA/ACC 2018 Table 4 and return whether known clinical ASCVD is very high-risk from caller-assigned major events and high-risk conditions.\n\nWhen an agent already has known clinical ASCVD and needs the 2018 AHA/ACC Table 4 very-high-risk classifier, and must not use the 2013 PCE, SCORE2, or a statin, ezetimibe, or PCSK9 order.\n\nNot a medical device. Not a prescription. magent does not diagnose ASCVD or measure ABI or LDL-C.\n\nNot a statin, ezetimibe, or PCSK9 order. Does not apply Figure 1 LDL-C ≥70 mg/dL treatment thresholds. Does not compute PCE 10-year risk (that is ascvd-pce).\n\nVery high-risk iff ≥2 major ASCVD events or 1 major event and ≥2 high-risk conditions (Table 4 “multiple”). Zero major events is not very high-risk even with many conditions.\n\nCKD is the printed eGFR 15–59 mL/min/1.73 m² band as a caller-assigned flag. Flags are caller-supplied. magent does not compute eGFR, assay LDL-C, or measure ABI. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). ≥65 is an AHA/ACC 2018 Table 4 high-risk condition. magent does not assign age.","required":true,"schema":{"type":"integer"},"example":70},{"in":"query","name":"recent_acs","description":"Recent ACS within the past 12 months as assigned by the caller (AHA/ACC 2018 Table 4 major ASCVD event). true or false. magent does not date ACS.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"history_mi","description":"History of MI other than a caller-assigned recent ACS as assigned by the caller (AHA/ACC 2018 Table 4 major ASCVD event). true or false. magent does not diagnose MI.","required":true,"schema":{"type":"boolean"},"example":true},{"in":"query","name":"ischemic_stroke","description":"History of ischemic stroke as assigned by the caller (AHA/ACC 2018 Table 4 major ASCVD event). true or false. magent does not diagnose stroke.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"symptomatic_pad","description":"Symptomatic PAD as assigned by the caller from the Table 4 row (claudication with ABI <0.85, or previous revascularization or amputation). true or false. magent does not measure ABI.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"heterozygous_fh","description":"Heterozygous familial hypercholesterolemia as assigned by the caller (AHA/ACC 2018 Table 4 high-risk condition). true or false. magent does not diagnose FH.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"prior_cabg_or_pci_outside_major","description":"Prior CABG or PCI outside the major ASCVD event(s) as assigned by the caller (AHA/ACC 2018 Table 4 high-risk condition). true or false. magent does not read an operative note.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"diabetes","description":"Diabetes mellitus as assigned by the caller (AHA/ACC 2018 Table 4 high-risk condition). true or false. magent does not diagnose diabetes.","required":true,"schema":{"type":"boolean"},"example":true},{"in":"query","name":"hypertension","description":"Hypertension as assigned by the caller (AHA/ACC 2018 Table 4 high-risk condition). true or false. magent does not measure blood pressure.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"ckd_egfr_15_to_59","description":"CKD with eGFR 15–59 mL/min/1.73 m² as assigned by the caller (AHA/ACC 2018 Table 4 printed band). true or false. magent does not compute eGFR.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"current_smoking","description":"Current smoking as assigned by the caller (AHA/ACC 2018 Table 4 high-risk condition). true or false. magent does not assign smoking status.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"ldl_c_ge_100_on_max_statin_ezetimibe","description":"Persistently elevated LDL-C ≥100 mg/dL (≥2.6 mmol/L) despite maximally tolerated statin and ezetimibe as assigned by the caller (AHA/ACC 2018 Table 4 high-risk condition). true or false. magent does not assay LDL-C.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"congestive_hf","description":"History of congestive HF as assigned by the caller (AHA/ACC 2018 Table 4 high-risk condition). true or false. magent does not diagnose HF.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"Very high-risk ASCVD (AHA/ACC 2018)","operationId":"get_api_calc_ascvd_vhr","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age, very_high_risk, major_event_count, high_risk_condition_count, classifying_rule, criteria, citation, disclaimer."},"400":{"description":"invalid_ascvd_vhr: Very high-risk ASCVD inputs must match AHA/ACC 2018 major ASCVD events and high-risk conditions. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ascvd-vhr"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Very high-risk ASCVD (AHA/ACC 2018) (bulk)","operationId":"post_api_calc_ascvd_vhr","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ascvd_vhr: Very high-risk ASCVD inputs must match AHA/ACC 2018 major ASCVD events and high-risk conditions. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ascvd-vhr"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"70","ckd_egfr_15_to_59":"false","congestive_hf":"false","current_smoking":"false","diabetes":"true","heterozygous_fh":"false","history_mi":"true","hypertension":"false","ischemic_stroke":"false","ldl_c_ge_100_on_max_statin_ezetimibe":"false","prior_cabg_or_pci_outside_major":"false","recent_acs":"false","symptomatic_pad":"false"},{"age":"70","ckd_egfr_15_to_59":"false","congestive_hf":"false","current_smoking":"false","diabetes":"true","heterozygous_fh":"false","history_mi":"true","hypertension":"false","ischemic_stroke":"false","ldl_c_ge_100_on_max_statin_ezetimibe":"false","prior_cabg_or_pci_outside_major":"false","recent_acs":"false","symptomatic_pad":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/precise-dapt":{"get":{"description":"Sum Costa 2017 Figure 1 PRECISE-DAPT nomogram points from age, caller-assigned creatinine clearance, hemoglobin, white-blood-cell count, and previous spontaneous bleeding, and return whether the total is in the published high-bleeding-risk stratum (score >=25).\n\nWhen an agent needs the published Costa 2017 PRECISE-DAPT integer after PCI and must not invent a dual antiplatelet duration, Yeh DAPT points, or extra cutoffs besides score >=25.\n\nNot a medical device and not a prescription for dual antiplatelet therapy duration.\n\nNot a diagnosis. magent does not assay hemoglobin or WBC, does not compute Cockcroft-Gault, and does not take a bleeding history; creatinine clearance and previous spontaneous bleeding are caller-assigned.\n\nNot the Yeh 2016 DAPT score. PRECISE-DAPT is the Costa 2017 five-item out-of-hospital bleeding nomogram at the time of stenting.\n\nTable 1 truncations: age 50-90, hemoglobin 10-12 g/dL, CrCl capped at 100 mL/min, WBC 5-20 x10^3/uL. Values beyond those bounds use the truncated nomogram ends.\n\nhigh_bleeding_risk is true only when score >=25, the paper's high-risk stratum used to compare DAPT duration. This tool does not return quartile labels or TIMI bleeding percents. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Costa 2017 Table 1 truncates below 50 and above 90. Figure 1: <=50 scores 0; >=90 scores 19; linear between. Age 18 and age 50 both score 0.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"crcl_ml_min","description":"Creatinine clearance in mL/min (0-300) as assigned by the caller. Costa 2017 Figure 1 uses CrCl, not raw creatinine. magent does not compute Cockcroft-Gault. Truncated above 100: >=100 scores 0; 0 mL/min scores 25; linear between.","required":true,"schema":{"type":"number"},"example":"100"},{"in":"query","name":"hemoglobin_g_dl","description":"Hemoglobin in g/dL (4-22). Table 1 truncates above 12 and below 10. Figure 1: >=12.0 scores 0; <=10.0 scores 15; linear between. magent does not assay hemoglobin.","required":true,"schema":{"type":"number"},"example":"12"},{"in":"query","name":"wbc_k_ul","description":"White-blood-cell count in x10^3 cells per uL, same as x10^9/L (0.1-100). Table 1 truncates below 5 and above 20. Figure 1: <=5 scores 0; >=20 scores 15; linear between. magent does not assay WBC.","required":true,"schema":{"type":"number"},"example":"5"},{"in":"query","name":"previous_spontaneous_bleeding","description":"Previous spontaneous bleeding as assigned by the caller (Costa 2017). true scores 26; false scores 0. magent does not take a bleeding history.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"PRECISE-DAPT","operationId":"get_api_calc_precise_dapt","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, high_bleeding_risk, age_years, crcl_ml_min, hemoglobin_g_dl, wbc_k_ul, previous_spontaneous_bleeding, components, citation, disclaimer."},"400":{"description":"invalid_precise_dapt: PRECISE-DAPT needs Costa 2017 age, creatinine clearance, hemoglobin, WBC, and prior spontaneous bleeding in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/precise-dapt"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PRECISE-DAPT (bulk)","operationId":"post_api_calc_precise_dapt","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_precise_dapt: PRECISE-DAPT needs Costa 2017 age, creatinine clearance, hemoglobin, WBC, and prior spontaneous bleeding in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/precise-dapt"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","crcl_ml_min":"100","hemoglobin_g_dl":"12","previous_spontaneous_bleeding":"false","wbc_k_ul":"5"},{"age":"50","crcl_ml_min":"100","hemoglobin_g_dl":"12","previous_spontaneous_bleeding":"false","wbc_k_ul":"5"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/v1/tools/ping":{"get":{"description":"Confirms the x402 gate and PAYMENT-RESPONSE. Returns {ok: true, service: magent} after settle.\n\nOnly to verify payment plumbing. Do not call this for production clinical work.\n\nNot a product tool.\n\nNot listed on Bazaar.\n\nTakes no clinical input. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"probe","description":"Ignored. Payment smoke test takes no input.","required":false,"schema":{"type":"string"},"example":"ok"}],"summary":"Payment smoke","operationId":"get_v1_tools_ping","responses":{"200":{"description":"200 JSON fields: ok, service."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/tools/ping"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}}},"/api/calc/medped":{"get":{"description":"Apply the Williams 1993 US MEDPED total cholesterol tables and return whether caller-supplied total cholesterol exceeds the cutoff for that age and relative degree. Not a diagnosis.\n\nWhen an agent already has age, a caller-assigned relative degree (first, second, third, or general population), and one total cholesterol value, and needs the published US MEDPED cutoff comparison. magent does not assay lipids or take a pedigree.\n\nNot a medical device. Not a diagnosis of familial hypercholesterolemia.\n\nWilliams 1993 US MEDPED total cholesterol tables only. Does not implement Dutch Lipid Clinic Network or Simon Broome criteria.\n\nDoes not use LDL cholesterol cutoffs from later reprints. Total cholesterol only.\n\nmagent does not assay lipids or take a pedigree. The caller assigns relative_degree and supplies exactly one total cholesterol value. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 1-120). Selects the Williams 1993 US MEDPED total cholesterol row: <20, 20-29, 30-39, or >=40.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"relative_degree","description":"Relative degree as assigned by the caller: first, second, third, or general_population (Williams 1993). magent does not take a pedigree.","required":true,"schema":{"type":"string"},"example":"general_population"},{"in":"query","name":"total_cholesterol_mg_dl","description":"Total cholesterol in mg/dL (50-800). Provide exactly one of total_cholesterol_mg_dl or total_cholesterol_mmol_l. Meets the published cutoff iff this value is greater than the age- and relative-degree-specific mg/dL cutoff. magent does not assay lipids.","required":false,"schema":{"type":"number"},"example":"200"},{"in":"query","name":"total_cholesterol_mmol_l","description":"Total cholesterol in mmol/L (1.3-20). Converted as mg/dL = mmol/L * 38.67, then compared with the US MEDPED mg/dL cutoff. Provide exactly one lipid parameter.","required":false,"schema":{"type":"number"},"example":"10.0"}],"summary":"MEDPED","operationId":"get_api_calc_medped","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age, relative_degree, total_cholesterol_mg_dl, cutoff_mg_dl, meets_criteria, classification, criteria, citation, disclaimer."},"400":{"description":"invalid_medped_age: age must be an integer from 1 to 120 (Williams 1993). Returned before settlement; you are not charged.; invalid_medped_relation: relative_degree must be first, second, third, or general_population (Williams 1993). Returned before settlement; you are not charged.; invalid_medped_lipid: provide exactly one of total_cholesterol_mg_dl (50-800) or total_cholesterol_mmol_l (1.3-20). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/medped"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"MEDPED (bulk)","operationId":"post_api_calc_medped","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_medped_age: age must be an integer from 1 to 120 (Williams 1993). Returned before settlement; you are not charged.; invalid_medped_relation: relative_degree must be first, second, third, or general_population (Williams 1993). Returned before settlement; you are not charged.; invalid_medped_lipid: provide exactly one of total_cholesterol_mg_dl (50-800) or total_cholesterol_mmol_l (1.3-20). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/medped"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","relative_degree":"general_population","total_cholesterol_mg_dl":"200"},{"age":"50","relative_degree":"general_population","total_cholesterol_mg_dl":"200"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/.well-known/x402":{"get":{"description":"version + resource URLs for x402scan and agents.","summary":"x402 discovery manifest","operationId":"get_well_known_x402","responses":{"200":{"description":"application/json"}},"security":[]}},"/api/calc/dsi":{"get":{"description":"Compute the Ospina-Tascón diastolic shock index as heart rate in bpm divided by cuff diastolic pressure in mm Hg.\n\nWhen an agent needs the published heart-rate / diastolic-pressure ratio and must not invent a DSI cutoff or copy systolic shock-index bands.\n\nNot a medical device. Not a diagnosis of shock and not a treatment target.\n\nOspina-Tascón 2020 did not include a control group of normal subjects, so recognizing a DSI cutoff to identify abnormality could be misleading.\n\nThis is heart rate divided by diastolic pressure, not the Allgöwer–Burri shock index (HR/SBP). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats per minute (integer 30-220).","required":true,"schema":{"type":"integer"},"example":"80"},{"in":"query","name":"diastolic_mm_hg","description":"Cuff diastolic blood pressure in mm Hg (20-160).","required":true,"schema":{"type":"number"},"example":"80"}],"summary":"Diastolic shock index","operationId":"get_api_calc_dsi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, heart_rate_bpm, diastolic_mm_hg, dsi, citation, disclaimer."},"400":{"description":"invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_diastolic_bp: diastolic_mm_hg must be a number from 20 to 160. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dsi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Diastolic shock index (bulk)","operationId":"post_api_calc_dsi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_diastolic_bp: diastolic_mm_hg must be a number from 20 to 160. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dsi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"diastolic_mm_hg":"80","heart_rate_bpm":"80"},{"diastolic_mm_hg":"80","heart_rate_bpm":"80"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/impede-vte":{"get":{"description":"Compute the Sanfilippo 2019 IMPEDE VTE score for venous thromboembolism in multiple myeloma from caller-assigned Table 3 factors and return the published 6-month risk group.\n\nWhen an agent needs the published Sanfilippo 2019 IMPEDE VTE score for a patient with multiple myeloma and must not substitute Khorana or SAVED, invent a prophylaxis order, or assign race or ethnicity.\n\nNot a medical device.\n\nNot a diagnosis of VTE. magent does not diagnose venous thromboembolism.\n\nNot a prophylaxis order. This tool does not recommend a drug or start thromboprophylaxis.\n\nNot SAVED. Not Khorana. This tool is Sanfilippo 2019 Table 3 IMPEDE VTE only.\n\nCaller-assigned Asian/Pacific Islander as used in Sanfilippo 2019. magent does not assign race or ethnicity.\n\nbmi_ge_25 is a caller-assigned BMI ≥25 kg/m2 flag; magent does not compute BMI from height or weight.\n\nDexamethasone high is total monthly dosing >160 mg as in Sanfilippo 2019; not the NCCN ≥480 mg definition. none is not on dexamethasone (0 points).\n\nScore is not clamped at zero. Risk groups are derivation 6-month cumulative incidence: ≤3 low 3.3%, 4-7 intermediate 8.3%, ≥8 high 15.2%. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"imid","description":"Immunomodulatory drug (IMiD) as assigned by the caller (Sanfilippo 2019 Table 3). true or false. 4 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bmi_ge_25","description":"BMI ≥25 kg/m2 as assigned by the caller (Sanfilippo 2019 Table 3). true or false. magent does not compute BMI from height or weight. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pelvic_hip_femur_fracture","description":"Pelvic, hip, or femur fracture as assigned by the caller (Sanfilippo 2019 Table 3). true or false. 4 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"esa","description":"Erythropoiesis-stimulating agent as assigned by the caller (Sanfilippo 2019 Table 3). true or false. 1 point if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"doxorubicin","description":"Doxorubicin as assigned by the caller (Sanfilippo 2019 Table 3). true or false. 3 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"dexamethasone","description":"Dexamethasone as assigned by the caller (Sanfilippo 2019 Table 3). none (not on dexamethasone) scores 0; low (dexamethasone used at total monthly dosing ≤160 mg) scores 2; high (total monthly dosing >160 mg) scores 4. Not the NCCN ≥480 mg definition.","required":true,"schema":{"type":"string","enum":["none","low","high"]},"example":"none"},{"in":"query","name":"asian_pacific_islander","description":"Caller-assigned ethnicity/race Asian/Pacific Islander as used in Sanfilippo 2019. true or false. magent does not assign race or ethnicity. −3 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"vte_history","description":"History of VTE before multiple myeloma as assigned by the caller (Sanfilippo 2019 Table 3). true or false. 5 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"tunneled_line","description":"Tunneled line / central venous catheter as assigned by the caller (Sanfilippo 2019 Table 3). true or false. 2 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"thromboprophylaxis","description":"Existing thromboprophylaxis as assigned by the caller (Sanfilippo 2019 Table 3). Mutually exclusive. none scores 0; prophylactic (prophylactic LMWH or aspirin) scores −3; therapeutic (therapeutic LMWH or warfarin) scores −4.","required":true,"schema":{"type":"string","enum":["none","prophylactic","therapeutic"]},"example":"none"}],"summary":"IMPEDE VTE","operationId":"get_api_calc_impede_vte","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk, six_month_vte_percent, imid, bmi_ge_25, pelvic_hip_femur_fracture, esa, doxorubicin, dexamethasone, asian_pacific_islander, vte_history, tunneled_line, thromboprophylaxis, components, citation, disclaimer."},"400":{"description":"invalid_impede_vte: IMPEDE-VTE inputs must match Sanfilippo 2019 Table 3 flags, dexamethasone none/low/high, and thromboprophylaxis none/prophylactic/therapeutic. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/impede-vte"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"IMPEDE VTE (bulk)","operationId":"post_api_calc_impede_vte","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_impede_vte: IMPEDE-VTE inputs must match Sanfilippo 2019 Table 3 flags, dexamethasone none/low/high, and thromboprophylaxis none/prophylactic/therapeutic. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/impede-vte"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"asian_pacific_islander":"false","bmi_ge_25":"false","dexamethasone":"none","doxorubicin":"false","esa":"false","imid":"false","pelvic_hip_femur_fracture":"false","thromboprophylaxis":"none","tunneled_line":"false","vte_history":"false"},{"asian_pacific_islander":"false","bmi_ge_25":"false","dexamethasone":"none","doxorubicin":"false","esa":"false","imid":"false","pelvic_hip_femur_fracture":"false","thromboprophylaxis":"none","tunneled_line":"false","vte_history":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/chads-65":{"get":{"description":"Apply the CCS 2014 CHADS-65 algorithm and return oac, asa, or none from age and caller-assigned CHF, hypertension, diabetes, prior stroke/TIA, and vascular disease.\n\nWhen an agent needs the CCS 2014 CHADS-65 stroke-prevention algorithm for nonvalvular AF/AFL from caller-assigned age and flags, and must not use CHADS2, CHA2DS2-VASc, or HAS-BLED.\n\nNot a medical device. Not an anticoagulation order. magent does not examine the patient.\n\nThis is the Canadian CCS 2014 algorithm for nonvalvular AF/AFL stroke-prevention discussion. It is not CHADS2, not CHA2DS2-VASc, not HAS-BLED, and not a valve or AF diagnosis.\n\nAge ≥75 is subsumed by age ≥65. There is no separate age≥75 input.\n\nFlags are caller-supplied booleans. magent does not infer CHF, stroke, or vascular disease from text. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). ≥65 indicates oral anticoagulant (OAC). Age ≥75 is subsumed by ≥65; there is no separate age≥75 input. 64 does not indicate OAC on age alone.","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"chf","description":"Congestive heart failure as assigned by the caller. true or false. Any true CHADS2 factor other than age≥75 (CHF, hypertension, diabetes, prior stroke/TIA) indicates OAC.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypertension","description":"Hypertension history as assigned by the caller. true or false. Indicates OAC when true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"diabetes","description":"Diabetes mellitus as assigned by the caller. true or false. Indicates OAC when true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"stroke_tia","description":"Prior stroke or TIA as assigned by the caller. true or false. Indicates OAC when true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"vascular_disease","description":"Coronary, aortic, or peripheral arterial disease as assigned by the caller. true or false. Indicates ASA only when OAC is not indicated.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"CHADS-65","operationId":"get_api_calc_chads_65","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, recommendation, oac_indicated, criteria, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/chads-65"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CHADS-65 (bulk)","operationId":"post_api_calc_chads_65","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/chads-65"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"70","chf":"false","diabetes":"false","hypertension":"false","stroke_tia":"false","vascular_disease":"false"},{"age":"70","chf":"false","diabetes":"false","hypertension":"false","stroke_tia":"false","vascular_disease":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/geneva-prophylaxis":{"get":{"description":"Compute the Chopard 2006 Geneva risk score for VTE thromboprophylaxis in acutely ill medical inpatients from age and caller-assigned findings.\n\nWhen an agent needs the published Chopard 2006 Geneva prophylaxis point total (not the Revised Geneva PE diagnostic score, not Padua) for an acutely ill medical inpatient.\n\nNot a medical device and not a diagnosis of VTE. magent does not examine the patient; every flag is caller-assigned.\n\nChopard 2006 Geneva prophylaxis score for acutely ill medical inpatients only. Not the Revised Geneva PE diagnostic score (Le Gal 2006). Not Padua.\n\nObesity is a caller-applied BMI >30 flag; magent does not take height or weight.\n\nImmobilization is a caller-applied flag (walk <30 min/day for ≥3 days); magent does not observe walking time.\n\nDoes not return Padua points, PE probabilities, or a prophylaxis regimen. risk_group high means published score ≥3 (prophylaxis indicated in the letter), not an order. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Age >60 scores 1 (Chopard 2006). Age 60 is the ≤60 arm and scores 0.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"cardiac_failure","description":"Cardiac failure as assigned by the caller (Chopard 2006 Geneva prophylaxis table). true scores 2. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"respiratory_failure","description":"Respiratory failure as assigned by the caller (Chopard 2006). true scores 2. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"recent_stroke","description":"Recent stroke as assigned by the caller (Chopard 2006). true scores 2. magent does not diagnose stroke.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"recent_myocardial_infarction","description":"Recent myocardial infarction as assigned by the caller (Chopard 2006). true scores 2. magent does not diagnose myocardial infarction.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"acute_infectious_disease","description":"Acute infectious disease including sepsis as assigned by the caller (Chopard 2006). true scores 2. magent does not diagnose infection.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"acute_rheumatic_disease","description":"Acute rheumatic disease as assigned by the caller (Chopard 2006). true scores 2. magent does not diagnose rheumatic disease.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"malignancy","description":"Malignancy as assigned by the caller (Chopard 2006). true scores 2. magent does not diagnose cancer.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"myeloproliferative_syndrome","description":"Myeloproliferative syndrome as assigned by the caller (Chopard 2006). true scores 2. magent does not diagnose a myeloproliferative neoplasm.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"nephrotic_syndrome","description":"Nephrotic syndrome as assigned by the caller (Chopard 2006). true scores 2. magent does not diagnose nephrotic syndrome.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"history_of_vte","description":"History of VTE as assigned by the caller (Chopard 2006). true scores 2. magent does not diagnose VTE.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"known_hypercoagulable_state","description":"Known hypercoagulable state as assigned by the caller (Chopard 2006). true scores 2. magent does not interpret a thrombophilia panel.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"immobilization_ge_3d","description":"Immobilization as assigned by the caller (walk <30 min/day for ≥3 days, Chopard 2006). true scores 1. magent does not observe walking time.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"recent_travel_gt_6h","description":"Recent travel >6 hours as assigned by the caller (Chopard 2006). true scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"obesity_bmi_gt_30","description":"Obesity as assigned by the caller (BMI >30, Chopard 2006). true scores 1. magent does not take height or weight.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"chronic_venous_insufficiency","description":"Chronic venous insufficiency as assigned by the caller (Chopard 2006). true scores 1. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pregnancy","description":"Pregnancy as assigned by the caller (Chopard 2006). true scores 1. magent does not confirm pregnancy.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hormonal_therapy","description":"Hormonal therapy as assigned by the caller (Chopard 2006). true scores 1.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"dehydration","description":"Dehydration as assigned by the caller (Chopard 2006). true scores 1. magent does not assay volume status.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Geneva prophylaxis score","operationId":"get_api_calc_geneva_prophylaxis","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk_group, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_geneva_prophylaxis: each Chopard 2006 Geneva prophylaxis flag must be true or false. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/geneva-prophylaxis"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Geneva prophylaxis score (bulk)","operationId":"post_api_calc_geneva_prophylaxis","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_geneva_prophylaxis: each Chopard 2006 Geneva prophylaxis flag must be true or false. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/geneva-prophylaxis"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"acute_infectious_disease":"false","acute_rheumatic_disease":"false","age":"50","cardiac_failure":"false","chronic_venous_insufficiency":"false","dehydration":"false","history_of_vte":"false","hormonal_therapy":"false","immobilization_ge_3d":"false","known_hypercoagulable_state":"false","malignancy":"false","myeloproliferative_syndrome":"false","nephrotic_syndrome":"false","obesity_bmi_gt_30":"false","pregnancy":"false","recent_myocardial_infarction":"false","recent_stroke":"false","recent_travel_gt_6h":"false","respiratory_failure":"false"},{"acute_infectious_disease":"false","acute_rheumatic_disease":"false","age":"50","cardiac_failure":"false","chronic_venous_insufficiency":"false","dehydration":"false","history_of_vte":"false","hormonal_therapy":"false","immobilization_ge_3d":"false","known_hypercoagulable_state":"false","malignancy":"false","myeloproliferative_syndrome":"false","nephrotic_syndrome":"false","obesity_bmi_gt_30":"false","pregnancy":"false","recent_myocardial_infarction":"false","recent_stroke":"false","recent_travel_gt_6h":"false","respiratory_failure":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/flipi24":{"get":{"description":"Compute the Maurer 2025 Table S5 probability of an event within 24 months (progression, transformation, second-line treatment, or death) in newly diagnosed follicular lymphoma from age, hemoglobin, WBC, LDH/ULN, and beta-2 microglobulin, assuming R-CHOP or B-R-like immunochemotherapy and a 50% likelihood of anti-CD20 maintenance.\n\nWhen an agent already has those five caller-assigned values and needs the locked FLIPI24 EFS24 probability and Table S5 low/intermediate/high groups. Not Solal-Céligny FLIPI 2004. magent does not assay labs or order immunochemotherapy.\n\nNot a medical device and not a diagnosis. Not a treatment order, trial-eligibility order, or immunochemotherapy prescription.\n\nTable S5 assumes first-line R-CHOP or B-R-like immunochemotherapy and a 50% likelihood of anti-CD20 maintenance. That maintenance term is already in the 0.7115 centering; magent does not take a maintenance flag.\n\nThis is Maurer 2025 FLIPI24 only. It is not original FLIPI (Solal-Céligny 2004).\n\nHemoglobin, WBC, LDH/ULN, and beta-2 microglobulin are caller-assigned. magent does not assay those labs or set the LDH upper limit of normal.\n\nContinuous inputs are clamped to Table S5 linear ranges (age 60-90 with extra years after 75 capped at 15; hemoglobin 8-17 g/dL; WBC 4-11 10^9/L; LDH/ULN 0.5-5; B2M 1-10 mg/L). Discrete groups are Table S5 low (<=0.10), intermediate (0.10-0.15], and high (>0.15). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120). Maurer 2025 Table S5: no additional age effect 18-60; HR 1.01 per year 60-75 (beta 0.01); HR 1.05 per year 75-90 (extra beta 0.038). Age is clamped to 90 for the linear predictor. magent does not assign age.","required":true,"schema":{"type":"integer"},"example":61},{"in":"query","name":"hemoglobin_g_dl","description":"Hemoglobin in g/dL (1-25). Table S5 linear 8-17 g/dL, HR 0.92 per unit (beta -0.081); values outside 8-17 are clamped. magent does not assay hemoglobin.","required":true,"schema":{"type":"number"},"example":13.0},{"in":"query","name":"wbc_10e9_l","description":"White blood cell count in 10^9/L (0.1-80), equal to k/µL. Table S5 linear 4-11, HR 1.08 per unit (beta 0.075); values outside 4-11 are clamped. magent does not assay WBC.","required":true,"schema":{"type":"number"},"example":7.0},{"in":"query","name":"ldh_uln_ratio","description":"Caller-assigned serum LDH divided by the local upper limit of normal (0.1-20). Table S5 linear 0.5-5, HR 1.44 per unit (beta 0.364); values outside 0.5-5 are clamped. magent does not measure LDH or set the ULN.","required":true,"schema":{"type":"number"},"example":1.0},{"in":"query","name":"b2m_mg_l","description":"Beta-2 microglobulin in mg/L (0.1-40). Table S5 linear 1-10 mg/L, HR 1.17 per unit (beta 0.159); values outside 1-10 are clamped. magent does not assay B2M.","required":true,"schema":{"type":"number"},"example":2.0}],"summary":"FLIPI24","operationId":"get_api_calc_flipi24","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age, hemoglobin_g_dl, wbc_10e9_l, ldh_uln_ratio, b2m_mg_l, linear_predictor, efs24_event_probability, risk_group, citation, disclaimer."},"400":{"description":"invalid_flipi24: FLIPI24 inputs must match Maurer 2025 age, hemoglobin, WBC, LDH over ULN, and beta-2 microglobulin. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/flipi24"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"FLIPI24 (bulk)","operationId":"post_api_calc_flipi24","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flipi24: FLIPI24 inputs must match Maurer 2025 age, hemoglobin, WBC, LDH over ULN, and beta-2 microglobulin. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/flipi24"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"61","b2m_mg_l":"2.0","hemoglobin_g_dl":"13.0","ldh_uln_ratio":"1.0","wbc_10e9_l":"7.0"},{"age":"61","b2m_mg_l":"2.0","hemoglobin_g_dl":"13.0","ldh_uln_ratio":"1.0","wbc_10e9_l":"7.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/dad-ckd":{"get":{"description":"Sum the Mocroft 2015 D:A:D Table 2 full integer CKD risk score from injecting drug use, hepatitis C, age, caller-assigned eGFR >60, sex, nadir CD4, hypertension, prior CVD, and diabetes.\n\nWhen an agent already has those caller-assigned values and needs the published full-score point total and low/medium/high band. magent does not compute eGFR, diagnose HIV or CKD, or order ART.\n\nNot a medical device. Not a CKD diagnosis and not an antiretroviral (ART) start or switch order.\n\nMocroft 2015 Table 2 full integer risk score only. This is not the short score, not the Poisson exact-probability model, not number needed to harm (NNTH), and not an ARV-start decision tool.\n\nDerivation required eGFR > 60 mL/min. eGFR ≤60 is invalid (not in that population).\n\neGFR is caller-assigned. magent does not compute CKD-EPI, MDRD, or Cockcroft–Gault.\n\nRace was not in the published score and is not an input.\n\nFlags are caller-supplied booleans. magent does not diagnose injecting drug use, hepatitis C, hypertension, CVD, or diabetes. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ivdu","description":"Caller-assigned injecting drug use (Mocroft 2015 Table 2). true scores 2. magent does not diagnose injecting drug use.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hepatitis_c","description":"Caller-assigned hepatitis C co-infection (Mocroft 2015 Table 2). true scores 1. magent does not diagnose hepatitis C.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"age_years","description":"Age in years (integer 16-120). Mocroft 2015 Table 2: ≤35 scores 0; >35 and ≤50 scores 4; >50 and ≤60 scores 7; >60 scores 10.","required":true,"schema":{"type":"integer"},"example":"38"},{"in":"query","name":"egfr_ml_min","description":"Caller-assigned eGFR in mL/min (0.1-250, must be >60). Mocroft 2015 Table 2: >90 scores −6; >70 and ≤90 scores 0; >60 and ≤70 scores 6. eGFR ≤60 is outside the derivation population. magent does not compute eGFR.","required":true,"schema":{"type":"number"},"example":"68"},{"in":"query","name":"sex","description":"Sex (Mocroft 2015 Table 2). female scores 1; male scores 0.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"nadir_cd4_cells_mm3","description":"Nadir CD4 count in cells/mm³ (integer 0-3000). Mocroft 2015 Table 2: ≤200 scores 0; >200 scores −1. magent does not assay CD4.","required":true,"schema":{"type":"integer"},"example":"250"},{"in":"query","name":"hypertension","description":"Caller-assigned hypertension (Mocroft 2015 Table 2). true scores 1. magent does not diagnose hypertension.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"prior_cvd","description":"Caller-assigned prior cardiovascular disease (Mocroft 2015 Table 2). true scores 1. magent does not diagnose CVD.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"diabetes","description":"Caller-assigned diabetes (Mocroft 2015 Table 2). true scores 2. magent does not diagnose diabetes.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"D:A:D CKD","operationId":"get_api_calc_dad_ckd","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk_band, age_years, egfr_ml_min, sex, nadir_cd4_cells_mm3, ivdu, hepatitis_c, hypertension, prior_cvd, diabetes, components, citation, disclaimer."},"400":{"description":"invalid_dad_ckd: D:A:D CKD score inputs must match Mocroft 2015 age, eGFR, CD4 nadir, and flag categories from that paper. Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dad-ckd"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"D:A:D CKD (bulk)","operationId":"post_api_calc_dad_ckd","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_dad_ckd: D:A:D CKD score inputs must match Mocroft 2015 age, eGFR, CD4 nadir, and flag categories from that paper. Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/dad-ckd"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_years":"38","diabetes":"true","egfr_ml_min":"68","hepatitis_c":"false","hypertension":"false","ivdu":"false","nadir_cd4_cells_mm3":"250","prior_cvd":"false","sex":"female"},{"age_years":"38","diabetes":"true","egfr_ml_min":"68","hepatitis_c":"false","hypertension":"false","ivdu":"false","nadir_cd4_cells_mm3":"250","prior_cvd":"false","sex":"female"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/nedocs":{"get":{"description":"Compute the Weiss 2004 NEDOCS reduced five-variable score from caller-supplied ED patients, ED beds, boarding patients, hospital beds, respirators, longest admitted-patient hours, and last-called registration-to-bed hours, and return the published ≥100 overcrowding cutoff.\n\nWhen an agent has the published snapshot counts and hours for an academic ED and needs the Weiss 2004 reduced-model NEDOCS score, not a diversion or ambulance-bypass order.\n\nNot a medical device. Not a diversion or ambulance-bypass order.\n\nmagent does not count beds, patients, respirators, or wait times. Caller supplies the published numeric inputs.\n\nWeiss 2004 reduced five-variable model for academic EDs. The paper omitted the patindex × reg_time interaction from the presented nomogram (about 1% extra variance).\n\nThe linear combination can fall below 0 or above 200. The paper's interpretation scale is 0-200 with 100 as the overcrowding cutoff. magent does not clamp the score and does not invent 0-20/21-60 interval cuts.\n\nPediatric-only EDs were not this model. Not a diagnosis of crowding-related harm. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ed_patients","description":"Total patients in the ED (integer 0-200). Weiss 2004 patindex numerator (full rooms + hallways + doubled-up). magent does not count patients.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"ed_beds","description":"Number of ED beds (integer 1-300). Weiss 2004 patindex denominator. The paper's average academic ED was 50 ED beds. magent does not count beds.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"boarding_patients","description":"Patients in the ED awaiting inpatient beds (integer 0-200). Weiss 2004 admit-index numerator. magent does not count boarding patients.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"hospital_beds","description":"Number of hospital beds (integer 1-3000). Weiss 2004 admit-index denominator. The paper's average academic hospital was 500 beds. magent does not count beds.","required":true,"schema":{"type":"integer"},"example":"500"},{"in":"query","name":"respirators","description":"Patients on respirators in the ED (integer 0-20). Weiss 2004 reduced-model respirators term. magent does not count ventilators.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"admit_time_hours","description":"Hours the longest-waiting admitted patient has been in the ED since registration (0-120). Weiss 2004 reduced-model admit time. Not time since the admission order (that bed-time variable was omitted). magent does not measure wait times.","required":true,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"reg_time_hours","description":"Hours from registration until the last patient called from the waiting room was called to a bed (0-48). Weiss 2004 reduced-model reg time. magent does not measure wait times.","required":true,"schema":{"type":"number"},"example":"0"}],"summary":"NEDOCS","operationId":"get_api_calc_nedocs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, ed_patients, ed_beds, boarding_patients, hospital_beds, respirators, admit_time_hours, reg_time_hours, patindex, admit_index, nedocs_score, overcrowded, citation, disclaimer."},"400":{"description":"invalid_nedocs: NEDOCS inputs must match Weiss 2004 census, bed, wait, boarding, and critical-care terms from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nedocs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"NEDOCS (bulk)","operationId":"post_api_calc_nedocs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_nedocs: NEDOCS inputs must match Weiss 2004 census, bed, wait, boarding, and critical-care terms from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nedocs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"admit_time_hours":"0","boarding_patients":"0","ed_beds":"50","ed_patients":"0","hospital_beds":"500","reg_time_hours":"0","respirators":"0"},{"admit_time_hours":"0","boarding_patients":"0","ed_beds":"50","ed_patients":"0","hospital_beds":"500","reg_time_hours":"0","respirators":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/lams":{"get":{"description":"Sum Llanes 2004 LAMS points from caller-assigned facial droop, arm drift, and grip (LAPSS motor items).\n\nWhen an agent needs the published Llanes 2004 field motor total and must not invent an LVO cutoff, NIHSS equivalent, or thrombolysis order.\n\nNot a medical device. magent does not examine the patient. Facial droop, arm drift, and grip are caller-assigned Llanes 2004 integers.\n\nNot NIHSS. Not a stroke diagnosis or thrombolysis order.\n\nLlanes 2004 constructed LAMS by assigning those point values to LAPSS motor items (max 5). It does not define an LVO cutoff, risk class, or probability; those are later papers and are not returned. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"facial_droop","description":"Llanes 2004 facial droop as assigned by the caller. 0 absent, 1 present. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1]},"example":"0"},{"in":"query","name":"arm_drift","description":"Llanes 2004 arm drift as assigned by the caller. 0 absent, 1 drifts down, 2 falls rapidly. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"grip","description":"Llanes 2004 grip as assigned by the caller. 0 normal, 1 weak, 2 no grip. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"}],"summary":"LAMS","operationId":"get_api_calc_lams","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, facial_droop, arm_drift, grip, components, citation, disclaimer."},"400":{"description":"invalid_lams_face: facial_droop must be 0 (absent) or 1 (present) (Llanes 2004 LAMS). Returned before settlement; you are not charged.; invalid_lams_arm: arm_drift must be 0 (absent), 1 (drifts down), or 2 (falls rapidly) (Llanes 2004 LAMS). Returned before settlement; you are not charged.; invalid_lams_grip: grip must be 0 (normal), 1 (weak), or 2 (no grip) (Llanes 2004 LAMS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/lams"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"LAMS (bulk)","operationId":"post_api_calc_lams","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_lams_face: facial_droop must be 0 (absent) or 1 (present) (Llanes 2004 LAMS). Returned before settlement; you are not charged.; invalid_lams_arm: arm_drift must be 0 (absent), 1 (drifts down), or 2 (falls rapidly) (Llanes 2004 LAMS). Returned before settlement; you are not charged.; invalid_lams_grip: grip must be 0 (normal), 1 (weak), or 2 (no grip) (Llanes 2004 LAMS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/lams"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"arm_drift":"0","facial_droop":"0","grip":"0"},{"arm_drift":"0","facial_droop":"0","grip":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/crafft":{"get":{"description":"Sum the six Knight 2002 CRAFFT items and return whether two or more answers are affirmative.\n\nWhen an agent needs the published CRAFFT point total and Knight 2002 ≥2 screen and must not invent a diagnosis or interview the patient.\n\nNot a medical device and not a diagnosis of a substance use disorder.\n\nmagent does not interview the patient.\n\nThe caller assigns each flag. magent does not interpret individual items.\n\nThis is Knight 2002 CRAFFT only (six yes/no flags; screen-positive at score ≥2). Not CAGE and not CRAFFT 2.1 / 2.0 quantity questions. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"car","description":"Have you ever ridden in a CAR driven by someone (including yourself) who was high or had been using alcohol or drugs? (Knight 2002). true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"relax","description":"Do you ever use alcohol or drugs to RELAX, feel better about yourself, or fit in? (Knight 2002). true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"alone","description":"Do you ever use alcohol or drugs while you are by yourself, or ALONE? (Knight 2002). true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"forget","description":"Do you ever FORGET things you did while using alcohol or drugs? (Knight 2002). true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"friends","description":"Do your family or FRIENDS ever tell you that you should cut down on your drinking or drug use? (Knight 2002). true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"trouble","description":"Have you gotten into TROUBLE while using alcohol or drugs? (Knight 2002). true or false as assigned by the caller. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"CRAFFT","operationId":"get_api_calc_crafft","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, screen_positive, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/crafft"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CRAFFT (bulk)","operationId":"post_api_calc_crafft","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/crafft"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"alone":"false","car":"false","forget":"false","friends":"false","relax":"false","trouble":"false"},{"alone":"false","car":"false","forget":"false","friends":"false","relax":"false","trouble":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/child-pugh":{"get":{"description":"Compute the Child–Turcotte–Pugh cirrhosis severity score from bilirubin, albumin, INR, encephalopathy, and ascites.\n\nWhen an agent needs the published Child–Pugh class and must not invent points from a chart narrative.\n\nNot a transplant listing protocol and not a MELD-Na substitute.\n\nEncephalopathy and ascites are caller-assigned grades. magent does not examine the patient.\n\nPugh 1973 scored coagulation as prothrombin time prolonged 1–4 / 4–6 / >6 seconds. This tool accepts INR <1.7 / 1.7–2.3 / >2.3 as the contemporary laboratory substitute. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"bilirubin_mg_dl","description":"Total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l. <2.0 scores 1; 2.0-3.0 scores 2; >3.0 scores 3.","required":false,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"bilirubin_umol_l","description":"Total bilirubin in µmol/L. Converted as mg/dL = µmol/L / 17.1.","required":false,"schema":{"type":"number"},"example":"17.1"},{"in":"query","name":"albumin_g_dl","description":"Albumin in g/dL (1-6). Provide this or albumin_g_l. >3.5 scores 1; 2.8-3.5 scores 2; <2.8 scores 3.","required":false,"schema":{"type":"number"},"example":"4.0"},{"in":"query","name":"albumin_g_l","description":"Albumin in g/L. Converted as g/dL = g/L / 10.","required":false,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"inr","description":"INR (0.8-10). Contemporary substitute for Pugh PT-prolongation seconds. <1.70 scores 1; 1.70-2.30 scores 2; >2.30 scores 3.","required":true,"schema":{"type":"number"},"example":"1.2"},{"in":"query","name":"encephalopathy","description":"Caller-assigned encephalopathy grade. none scores 1; grade_1_2 scores 2; grade_3_4 scores 3. magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["none","grade_1_2","grade_3_4"]},"example":"none"},{"in":"query","name":"ascites","description":"Caller-assigned ascites. none scores 1; slight scores 2; moderate scores 3. magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["none","slight","moderate"]},"example":"none"}],"summary":"Child–Pugh","operationId":"get_api_calc_child_pugh","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, child_pugh_class, bilirubin_mg_dl, albumin_g_dl, inr, encephalopathy, ascites, components, citation, disclaimer."},"400":{"description":"invalid_bilirubin: bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_inr: inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.; invalid_encephalopathy: encephalopathy must be none, grade_1_2, or grade_3_4. Returned before settlement; you are not charged.; invalid_ascites: ascites must be none, slight, or moderate. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/child-pugh"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Child–Pugh (bulk)","operationId":"post_api_calc_child_pugh","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_bilirubin: bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_inr: inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.; invalid_encephalopathy: encephalopathy must be none, grade_1_2, or grade_3_4. Returned before settlement; you are not charged.; invalid_ascites: ascites must be none, slight, or moderate. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/child-pugh"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"albumin_g_dl":"4.0","ascites":"none","bilirubin_mg_dl":"1.0","encephalopathy":"none","inr":"1.2"},{"albumin_g_dl":"4.0","ascites":"none","bilirubin_mg_dl":"1.0","encephalopathy":"none","inr":"1.2"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/lace":{"get":{"description":"Sum van Walraven 2010 Table 3 LACE points from length of stay, acute (emergent) admission, a caller-supplied Charlson integer, and ED visits in the previous 6 months.\n\nWhen an agent needs the published Table 3 LACE total (0–19) and must not invent a ≥10 high-risk class or treat the score as a discharge order.\n\nNot a medical device and not a discharge, admission, or follow-up order. magent does not examine the patient.\n\nDoes not compute the Charlson comorbidity index. The caller supplies the integer Charlson score (0–37); magent maps that integer to Table 3 points only.\n\nTable 3 returns a 0–19 point total only. magent does not invent a ≥10 high-risk class; that cutoff is later practice, not named classes in van Walraven 2010. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"length_of_stay_days","description":"Length of stay in days (integer 0-365). van Walraven 2010 Table 3 L: <1 → 0, 1 → 1, 2 → 2, 3 → 3, 4-6 → 4, 7-13 → 5, ≥14 → 7. 0 days is the <1 bin.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"acute_admission","description":"Acute (emergent) admission as assigned by the caller (true or false). van Walraven 2010 Table 3 A: true → 3, false → 0.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"charlson","description":"Caller-supplied Charlson comorbidity index (integer 0-37). magent does not compute Charlson. van Walraven 2010 Table 3 C: 0 → 0, 1 → 1, 2 → 2, 3 → 3, ≥4 → 5.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"ed_visits_6mo","description":"Emergency-department visits in the previous 6 months (integer 0-30). van Walraven 2010 Table 3 E: 0 → 0, 1 → 1, 2 → 2, 3 → 3, ≥4 → 4.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"LACE","operationId":"get_api_calc_lace","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, length_of_stay_days, acute_admission, charlson, ed_visits_6mo, components, citation, disclaimer."},"400":{"description":"invalid_length_of_stay: length_of_stay_days must be an integer from 0 to 365 (van Walraven 2010 LACE). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_charlson: charlson must be an integer from 0 to 37 (van Walraven 2010 LACE uses the Charlson score as input). Returned before settlement; you are not charged.; invalid_ed_visits: ed_visits_6mo must be an integer from 0 to 30 (van Walraven 2010 LACE). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/lace"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"LACE (bulk)","operationId":"post_api_calc_lace","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_length_of_stay: length_of_stay_days must be an integer from 0 to 365 (van Walraven 2010 LACE). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_charlson: charlson must be an integer from 0 to 37 (van Walraven 2010 LACE uses the Charlson score as input). Returned before settlement; you are not charged.; invalid_ed_visits: ed_visits_6mo must be an integer from 0 to 30 (van Walraven 2010 LACE). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/lace"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"acute_admission":"false","charlson":"0","ed_visits_6mo":"0","length_of_stay_days":"1"},{"acute_admission":"false","charlson":"0","ed_visits_6mo":"0","length_of_stay_days":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pecarn-febrile":{"get":{"description":"Apply the Kuppermann 2019 PECARN clinical prediction rule and return low_risk only when a febrile infant 60 days or younger has a caller-assigned negative urinalysis, ANC ≤4090/µL, and serum procalcitonin ≤1.71 ng/mL.\n\nWhen an agent already has age in days, a caller-assigned negative or positive urinalysis, ANC, and serum procalcitonin and needs the published three-variable low-risk boolean. magent does not assay UA, ANC, or PCT. Not Rochester, Boston, Philadelphia, Step-by-Step, or pecarn-head.\n\nNot a medical device.\n\nNot a diagnosis of serious bacterial infection (SBI) and not a discharge, admission, or lumbar-puncture order.\n\nThis tool is the Kuppermann 2019 three-variable PECARN rule only. Not Rochester, Boston, Philadelphia, or Step-by-Step criteria. Not the later AAP/PECARN neonatal cutoffs (ANC 4000 / PCT 0.5). Not pecarn-head.\n\nAge 0-60 days pins the published population (febrile infants 60 days and younger). Age is required but was not retained in the 3-variable tree.\n\nmagent does not assay urinalysis, ANC, or procalcitonin. The caller assigns negative_urinalysis and laboratory values. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_days","description":"Chronological age in days (integer 0-60). Kuppermann 2019 studied febrile infants 60 days and younger. Age pins the published population and is not a tree variable; age 0 and age 60 can both be low-risk when the three laboratory criteria hold.","required":true,"schema":{"type":"integer"},"example":"36"},{"in":"query","name":"negative_urinalysis","description":"Caller-assigned negative urinalysis as used in Kuppermann 2019. true means the UA is negative. true or false. magent does not assay UA.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"anc_per_ul","description":"Absolute neutrophil count in cells/µL. Range 0-100000. Low-risk requires ANC 4090/µL or less (4090 meets; 4091 does not). magent does not assay ANC.","required":true,"schema":{"type":"number"},"example":"3000"},{"in":"query","name":"pct_ng_ml","description":"Serum procalcitonin in ng/mL. Range 0.01-100. Low-risk requires 1.71 ng/mL or less (1.71 meets; 1.72 does not). magent does not assay procalcitonin.","required":true,"schema":{"type":"number"},"example":"0.5"}],"summary":"PECARN febrile infant","operationId":"get_api_calc_pecarn_febrile","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, low_risk, age_days, anc_per_ul, pct_ng_ml, criteria, citation, disclaimer."},"400":{"description":"invalid_pecarn_febrile: age_days must be an integer 0-60, anc_per_ul a number 0-100000, and pct_ng_ml a number 0.01-100 (Kuppermann 2019 PECARN febrile infants ≤60 days). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pecarn-febrile"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PECARN febrile infant (bulk)","operationId":"post_api_calc_pecarn_febrile","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pecarn_febrile: age_days must be an integer 0-60, anc_per_ul a number 0-100000, and pct_ng_ml a number 0.01-100 (Kuppermann 2019 PECARN febrile infants ≤60 days). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pecarn-febrile"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_days":"36","anc_per_ul":"3000","negative_urinalysis":"true","pct_ng_ml":"0.5"},{"age_days":"36","anc_per_ul":"3000","negative_urinalysis":"true","pct_ng_ml":"0.5"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/a1c-eag":{"get":{"description":"Convert A1C percent to estimated average glucose, or the reverse, using Nathan/ADAG.\n\nWhen an agent must apply 28.7×A1C−46.7 instead of inventing an eAG from training data.\n\nNot a diagnosis. Provide exactly one of a1c_percent or eAG (mg/dL or mmol/L).\n\nDoes not interpret a glucose meter log or diagnose diabetes. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"a1c_percent","description":"HbA1c in percent (4-15). Provide this or an eAG, not both.","required":false,"schema":{"type":"number"},"example":"7.0"},{"in":"query","name":"eag_mg_dl","description":"Estimated average glucose in mg/dL (50-500).","required":false,"schema":{"type":"number"},"example":"154"},{"in":"query","name":"eag_mmol_l","description":"Estimated average glucose in mmol/L. Converted as mg/dL = mmol/L * 18.","required":false,"schema":{"type":"number"},"example":"8.6"}],"summary":"A1C ↔ eAG","operationId":"get_api_calc_a1c_eag","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, direction, a1c_percent, eag_mg_dl, eag_mmol_l, citation, disclaimer."},"400":{"description":"invalid_a1c_input: provide a1c_percent or eag_mg_dl/eag_mmol_l, not both Returned before settlement; you are not charged.; invalid_a1c: a1c_percent must be a number from 4 to 15 Returned before settlement; you are not charged.; invalid_eag: eag_mg_dl (50-500) or eag_mmol_l (2.8-27.8) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/a1c-eag"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"A1C ↔ eAG (bulk)","operationId":"post_api_calc_a1c_eag","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_a1c_input: provide a1c_percent or eag_mg_dl/eag_mmol_l, not both Returned before settlement; you are not charged.; invalid_a1c: a1c_percent must be a number from 4 to 15 Returned before settlement; you are not charged.; invalid_eag: eag_mg_dl (50-500) or eag_mmol_l (2.8-27.8) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/a1c-eag"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"a1c_percent":"7.0"},{"a1c_percent":"7.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/sg-port":{"get":{"description":"Compute the Jacobs 2022 Table 3 multivariable Cox linear predictor for overall survival after resection of major salivary gland cancer from age, sex, Charlson-Deyo score, involved gland, pathologic T stage, grade, margin, nodal-positivity ratio band, and PORT yes or no.\n\nWhen an agent already has those caller-assigned clinicopathologic values and needs the published linear predictor, not a 2-, 5-, or 10-year OS percent and not a radiation order.\n\nNot a medical device. Not a radiation, dose, or treatment order. magent does not compute Charlson-Deyo, assign grade, read margins, or count nodes.\n\nMajor salivary gland cancers in the National Cancer Database. Not minor salivary gland tumors.\n\nJacobs 2022 Table 3 prints multivariable HRs. magent uses β = ln(HR). The paper does not print baseline survival S0, so this tool emits the linear predictor only and does not invent 2-, 5-, or 10-year OS percents.\n\nT-stage main-effect HRs were printed as dashes because of the PORT×T-stage interaction. T-stage enters the linear predictor only through the T-specific PORT HR when PORT is true.\n\nCharlson-Deyo, grade, and nodal-positivity ratio each have one Table 3 HR. magent applies that HR per published step (0/1/2/≥3; low/intermediate/high; 0% / 0.1–10% / 10.1–49.9% / ≥50%). Per-band dummy HRs were not printed.\n\nThe paper does not print a worked numeric example. The compiled example is Table 3 arithmetic on the locked age-65 male parotid T2 profile. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age at diagnosis in years (integer 18-120). Jacobs 2022 Table 3: per 10 years, HR 1.52 without PORT and HR 1.37 with PORT. magent does not assign age.","required":true,"schema":{"type":"integer"},"example":65},{"in":"query","name":"sex","description":"Caller-assigned sex. Table 3: male versus female HR 1.28. magent does not assign sex.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"charlson_deyo","description":"Caller-assigned Charlson-Deyo score as published (0, 1, 2, or ge_3). Table 3 prints a single HR 1.22; magent applies ln(1.22) per step 0/1/2/3. magent does not compute Charlson-Deyo.","required":true,"schema":{"type":"string","enum":["0","1","2","ge_3"]},"example":"0"},{"in":"query","name":"gland","description":"Involved major salivary gland. Table 3 versus parotid: submandibular HR 1.32; sublingual HR 0.72. magent does not assign the primary site.","required":true,"schema":{"type":"string","enum":["parotid","submandibular","sublingual"]},"example":"parotid"},{"in":"query","name":"t_stage","description":"AJCC pathologic T stage (t1, t2, t3, or t4) as recorded. Table 3 PORT HRs: pT1 1.03, pT2 0.83, pT3 0.68, pT4 0.55. T-stage main-effect HRs were printed as dashes because of the PORT×T interaction; without PORT the T term is 0. magent does not assign T stage.","required":true,"schema":{"type":"string","enum":["t1","t2","t3","t4"]},"example":"t2"},{"in":"query","name":"grade","description":"Caller-assigned grade (low, intermediate, or high). Table 3 prints a single HR 1.34; magent applies ln(1.34) per step from low. magent does not assign grade.","required":true,"schema":{"type":"string","enum":["low","intermediate","high"]},"example":"low"},{"in":"query","name":"margin","description":"Surgical margin. Table 3: positive versus negative HR 1.26. magent does not read the pathology report.","required":true,"schema":{"type":"string","enum":["negative","positive"]},"example":"negative"},{"in":"query","name":"nodal_positivity_ratio","description":"Caller-assigned nodal-positivity ratio band as published: 0 (0%), 0.1-10, 10.1-49.9, or ge_50 (≥50%). Table 3 prints a single HR 1.29; magent applies ln(1.29) per a priori band step 0/1/2/3. magent does not count nodes.","required":true,"schema":{"type":"string","enum":["0","0.1-10","10.1-49.9","ge_50"]},"example":"0"},{"in":"query","name":"port","description":"true if postoperative radiotherapy was given, false if not. Selects the Table 3 age HR and the T-stage-specific PORT HR. Not a radiation order.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"Salivary gland PORT survival (Jacobs 2022)","operationId":"get_api_calc_sg_port","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age, sex, charlson_deyo, gland, t_stage, grade, margin, nodal_positivity_ratio, port, linear_predictor, risk_score, citation, disclaimer."},"400":{"description":"invalid_sg_port: Salivary-gland PORT survival inputs must match Jacobs 2022 age, sex, Charlson-Deyo score, gland, pathologic T stage, grade, margin, nodal-positivity ratio, and PORT. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sg-port"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Salivary gland PORT survival (Jacobs 2022) (bulk)","operationId":"post_api_calc_sg_port","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_sg_port: Salivary-gland PORT survival inputs must match Jacobs 2022 age, sex, Charlson-Deyo score, gland, pathologic T stage, grade, margin, nodal-positivity ratio, and PORT. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sg-port"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"65","charlson_deyo":"0","gland":"parotid","grade":"low","margin":"negative","nodal_positivity_ratio":"0","port":"false","sex":"male","t_stage":"t2"},{"age":"65","charlson_deyo":"0","gland":"parotid","grade":"low","margin":"negative","nodal_positivity_ratio":"0","port":"false","sex":"male","t_stage":"t2"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/em-mdm":{"get":{"description":"Return the 2023 overall medical decision making level from caller-assigned problems, data, and risk using AMA CPT Table 1 as reprinted by ACEP (highest level at which at least 2 of 3 elements are met or exceeded).\n\nWhen an agent already has the three 2023 MDM element levels (straightforward, low, moderate, or high) and needs the overall MDM the table prints. magent does not examine the patient, count tests, or assign a CPT code.\n\nNot a medical device.\n\nNot a bill or CPT assignment. magent does not code the chart.\n\nThe caller assigns number and complexity of problems addressed, amount and/or complexity of data, and risk of complications and/or morbidity of management. magent does not count tests, review notes, or determine risk from the record.\n\nNot a diagnosis. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"problems","description":"Caller-assigned number and complexity of problems addressed using the printed 2023 MDM column labels straightforward, low, moderate, or high (AMA CPT 2023 Table 1 as reprinted by ACEP). straightforward is the table's minimal column (1 self-limited or minor problem). low includes 1 stable chronic illness, 2 or more self-limited or minor problems, or 1 acute uncomplicated illness or injury. magent does not code the chart.","required":true,"schema":{"type":"string","enum":["straightforward","low","moderate","high"]},"example":"low"},{"in":"query","name":"data","description":"Caller-assigned amount and/or complexity of data to be reviewed and analyzed using the printed 2023 MDM column labels straightforward, low, moderate, or high. straightforward is the table's minimal or none column; low is limited; moderate is moderate; high is extensive. magent does not count tests, notes, or independent historians.","required":true,"schema":{"type":"string","enum":["straightforward","low","moderate","high"]},"example":"low"},{"in":"query","name":"risk","description":"Caller-assigned risk of complications and/or morbidity of management using the printed 2023 MDM column labels straightforward, low, moderate, or high (straightforward is the table's minimal risk column). magent does not determine risk from the record.","required":true,"schema":{"type":"string","enum":["straightforward","low","moderate","high"]},"example":"low"}],"summary":"2023 emergency MDM (ACEP)","operationId":"get_api_calc_em_mdm","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, problems, data, risk, mdm, description, components, citation, disclaimer."},"400":{"description":"invalid_em_mdm: 2023 emergency MDM inputs must match the printed problems, data, and risk columns. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/em-mdm"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"2023 emergency MDM (ACEP) (bulk)","operationId":"post_api_calc_em_mdm","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_em_mdm: 2023 emergency MDM inputs must match the printed problems, data, and risk columns. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/em-mdm"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"data":"low","problems":"low","risk":"low"},{"data":"low","problems":"low","risk":"low"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/reticulocyte-index":{"get":{"description":"Compute corrected reticulocyte count, a Hillman 1969 maturation-shift reticulocyte index, and optional absolute reticulocyte count from percent reticulocytes, hematocrit, and RBC.\n\nWhen an agent needs CRC, RI, or ARC from a CBC and must not invent a marrow-production diagnosis.\n\nNot a diagnosis of hypoproliferative versus hemolytic anemia. Maturation days 1.0/1.5/2.0/2.5 are a discrete reading of Hillman 1969 shift versus hematocrit (≥40, ≥30, ≥20, else), not a measured marrow transit time.\n\nARC is omitted unless rbc_million_ul is provided. Does not convert an automated absolute reticulocyte count already reported by the lab. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"reticulocyte_percent","description":"Reticulocyte percent of RBC (0.1-30).","required":true,"schema":{"type":"number"},"example":"2.0"},{"in":"query","name":"hematocrit_percent","description":"Hematocrit as a percent (10-70). CRC uses Hct/45. Maturation days: ≥40 → 1.0; ≥30 → 1.5; ≥20 → 2.0; else 2.5 (Hillman 1969 shift discretized).","required":true,"schema":{"type":"number"},"example":"45"},{"in":"query","name":"rbc_million_ul","description":"RBC count in 10^6/µL (1.0-8.0). When provided, ARC_per_uL is returned. Omitted omits ARC.","required":false,"schema":{"type":"number"},"example":"5.0"}],"summary":"Reticulocyte index","operationId":"get_api_calc_reticulocyte_index","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, reticulocyte_percent, hematocrit_percent, corrected_reticulocyte_percent, maturation_days, reticulocyte_index, arc_per_ul, citation, disclaimer."},"400":{"description":"invalid_reticulocyte_percent: reticulocyte_percent must be a number from 0.1 to 30. Returned before settlement; you are not charged.; invalid_hematocrit: hematocrit_percent must be a number from 10 to 70. Returned before settlement; you are not charged.; invalid_rbc_million_ul: rbc_million_ul must be a number from 1.0 to 8.0. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/reticulocyte-index"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Reticulocyte index (bulk)","operationId":"post_api_calc_reticulocyte_index","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_reticulocyte_percent: reticulocyte_percent must be a number from 0.1 to 30. Returned before settlement; you are not charged.; invalid_hematocrit: hematocrit_percent must be a number from 10 to 70. Returned before settlement; you are not charged.; invalid_rbc_million_ul: rbc_million_ul must be a number from 1.0 to 8.0. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/reticulocyte-index"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"hematocrit_percent":"45","rbc_million_ul":"5.0","reticulocyte_percent":"2.0"},{"hematocrit_percent":"45","rbc_million_ul":"5.0","reticulocyte_percent":"2.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/action-icu":{"get":{"description":"Compute the Fanaroff 2018 ACTION ICU integer score (Table 3, max 19) from age, serum creatinine, heart rate, systolic BP, initial troponin × ULN, and caller-assigned heart-failure signs, ST depression, prior revascularization, and chronic lung disease.\n\nWhen an agent needs the published Fanaroff 2018 Table 3 ACTION ICU integer total for initially hemodynamically stable NSTEMI and must not invent an ICU triage order or read an ECG.\n\nNot a medical device and not a triage order, ICU-admission decision, or diagnosis.\n\nmagent does not read the ECG or assay labs. ST depression, troponin × ULN, heart-failure signs, prior revascularization, and chronic lung disease are caller-assigned.\n\nThis is the Fanaroff 2018 Table 3 integer score (0–19) only. Lower systolic BP scores more. Absence of prior revascularization scores 1.\n\nTable 3 lists overlapping inclusive bounds at heart rate 100 (85–100 and ≥100) and systolic BP 145 (125–145 and ≥145). magent assigns each overlapping bound to the ≥ row (100 → 3; 145 → 0).\n\nFanaroff 2018 describes score ≤2 as very low (<5% ICU-complication likelihood), ≤5 as <10%, and ≥12 as >30%. Those are published thresholds, not exclusive named bands. magent returns the integer score and does not invent a 4-band enum for the unnamed 6–11 remainder.\n\nDerivation was initially hemodynamically stable NSTEMI in the ACTION Registry. This is not a STEMI score and not HEART or TIMI. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Fanaroff 2018 Table 3: younger than 70 scores 0; 70 or older scores 1.","required":true,"schema":{"type":"integer"},"example":"66"},{"in":"query","name":"creatinine_mg_dl","description":"Serum creatinine in mg/dL (0.1-20), or creatinine_umol_l (9-1768) converted as mg/dL = µmol/L / 88.42. Table 3: <1.1 → 0; ≥1.1 → 1. magent does not assay labs.","required":true,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats per minute (integer 30-220). Table 3 lists <85 → 0; 85–100 → 1; ≥100 → 3. The overlapping bound at 100 uses the ≥100 row (3 points).","required":true,"schema":{"type":"integer"},"example":"80"},{"in":"query","name":"systolic_mm_hg","description":"Systolic blood pressure in mm Hg (50-250). Table 3: <125 → 3; 125–145 → 1; ≥145 → 0. Lower SBP scores more. The overlapping bound at 145 uses the ≥145 row (0 points).","required":true,"schema":{"type":"number"},"example":"150"},{"in":"query","name":"troponin_x_uln","description":"Initial troponin as a multiple of the local upper limit of normal (0-1000). Table 3: <12 → 0; ≥12 → 2. magent does not assay labs; the caller assigns the ratio.","required":true,"schema":{"type":"number"},"example":"1"},{"in":"query","name":"heart_failure","description":"Signs or symptoms of heart failure on first medical contact as assigned by the caller (Fanaroff 2018 Table 3). true or false. 5 points if true. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"st_depression","description":"ST-segment depression on the ECG as assigned by the caller (Fanaroff 2018 Table 3). true or false. 1 point if true. magent does not read an ECG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"prior_revascularization","description":"Prior coronary revascularization as assigned by the caller (Fanaroff 2018 Table 3). true or false. Absence of prior revascularization scores 1; presence scores 0.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"chronic_lung_disease","description":"Chronic lung disease as assigned by the caller (Fanaroff 2018 Table 3). true or false. 2 points if true.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"ACTION ICU score","operationId":"get_api_calc_action_icu","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, age_years, creatinine_mg_dl, heart_rate_bpm, systolic_mm_hg, troponin_x_uln, heart_failure, st_depression, prior_revascularization, chronic_lung_disease, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_troponin_uln: troponin_x_uln must be a number from 0 to 1000 (ratio to the local ULN). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/action-icu"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ACTION ICU score (bulk)","operationId":"post_api_calc_action_icu","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_troponin_uln: troponin_x_uln must be a number from 0 to 1000 (ratio to the local ULN). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/action-icu"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"66","chronic_lung_disease":"false","creatinine_mg_dl":"1.0","heart_failure":"false","heart_rate_bpm":"80","prior_revascularization":"true","st_depression":"false","systolic_mm_hg":"150","troponin_x_uln":"1"},{"age":"66","chronic_lung_disease":"false","creatinine_mg_dl":"1.0","heart_failure":"false","heart_rate_bpm":"80","prior_revascularization":"true","st_depression":"false","systolic_mm_hg":"150","troponin_x_uln":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/cha2ds2-vasc":{"get":{"description":"Agents must not invent CHA2DS2-VASc from model memory. This endpoint computes the published Lip 2010 CHA2DS2-VASc stroke-risk score from discrete clinical flags; pay per request with x402 USDC on Base.\n\nWhen an agent needs the cited Lip 2010 CHA2DS2-VASc stroke-risk score rather than a language-model guess, including for atrial fibrillation stroke-risk arithmetic. Pay per request with x402 USDC. Not a diagnosis or dosing recommendation.\n\nNot a medical device. Not a diagnosis and not a treatment or anticoagulation recommendation.\n\nFlags are caller-supplied booleans. magent does not infer CHF or vascular disease from text. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). ≥75 scores 2; 65-74 scores 1.","required":true,"schema":{"type":"integer"},"example":"78"},{"in":"query","name":"sex","description":"female scores 1 (Sc); male scores 0.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"chf","description":"Congestive heart failure or LV dysfunction. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypertension","description":"Hypertension history. true or false.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"diabetes","description":"Diabetes mellitus. true or false.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"stroke_tia","description":"Prior stroke, TIA, or thromboembolism. true or false (2 points).","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"vascular_disease","description":"Prior MI, peripheral artery disease, or aortic plaque. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"CHA2DS2-VASc","operationId":"get_api_calc_cha2ds2_vasc","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, sex, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cha2ds2-vasc"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CHA2DS2-VASc (bulk)","operationId":"post_api_calc_cha2ds2_vasc","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cha2ds2-vasc"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"78","chf":"false","diabetes":"true","hypertension":"true","sex":"female","stroke_tia":"false","vascular_disease":"false"},{"age":"78","chf":"false","diabetes":"true","hypertension":"true","sex":"female","stroke_tia":"false","vascular_disease":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/amt-4":{"get":{"description":"Sum the four Swain 1997 AMT-4 items from caller-assigned correct/incorrect flags and return whether the score is less than 4 (impaired).\n\nWhen an agent already has AMT-4 items assigned as correct or incorrect (age, date of birth, place, year) and needs the published 0–4 total and impaired flag, not a dementia diagnosis and not Hodkinson 1972 AMT-10.\n\nNot a medical device and not a dementia diagnosis. magent does not interview the patient.\n\nEach item is a caller-assigned boolean (age_correct, dob_correct, place_correct, year_correct). This API does not collect an age, date of birth, place name, or year.\n\nImpaired is true when the AMT-4 score is less than 4 (Swain 1997). Score 4 is not impaired. This is a screening total, not a diagnosis.\n\nThis is Swain 1997 AMT-4 only. It is not Hodkinson 1972 AMT-10. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_correct","description":"Caller-assigned flag: age stated correctly (Swain 1997 AMT-4). true scores 1; false scores 0. magent does not interview the patient and does not collect an age.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"dob_correct","description":"Caller-assigned flag: date of birth stated correctly (Swain 1997 AMT-4). true scores 1; false scores 0. magent does not collect a date of birth.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"place_correct","description":"Caller-assigned flag: place stated correctly (Swain 1997 AMT-4). true scores 1; false scores 0. magent does not collect a place name.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"year_correct","description":"Caller-assigned flag: current year stated correctly (Swain 1997 AMT-4). true scores 1; false scores 0. magent does not collect a year.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"AMT-4","operationId":"get_api_calc_amt_4","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, impaired, components, citation, disclaimer."},"400":{"description":"invalid_amt_4: each AMT-4 item must be true or false as assigned by the caller (Swain 1997). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/amt-4"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"AMT-4 (bulk)","operationId":"post_api_calc_amt_4","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_amt_4: each AMT-4 item must be true or false as assigned by the caller (Swain 1997). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/amt-4"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_correct":"true","dob_correct":"true","place_correct":"true","year_correct":"true"},{"age_correct":"true","dob_correct":"true","place_correct":"true","year_correct":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/finnegan":{"get":{"description":"Sum Maguire 2013 Table 1 modified Finnegan items from caller-assigned exclusive cry, sleep, Moro, tremor, fever, respiratory, and stool bands plus true/false CNS, vasomotor, and GI flags. Return the 0–46 total and at_or_above_8 (true iff score ≥ 8).\n\nWhen an agent already has Maguire 2013 Table 1 modified FNAS observations as assigned by the caller and needs that published total and ≥8 threshold. magent does not examine the infant, score Eat Sleep Console, score Maguire's 7-item short form, or issue a morphine order.\n\nNot a medical device and not a diagnosis of neonatal abstinence syndrome.\n\nmagent does not examine the infant. Each item is a caller-assigned Maguire 2013 Table 1 exclusive band or true/false flag.\n\nThis is the operational modified FNAS item table reprinted as Maguire 2013 Table 1, not a 31-item website variant and not Maguire's 7-item short form.\n\nNot Eat Sleep Console (Grossman 2018).\n\nNot a morphine or other pharmacologic dose. at_or_above_8 is the published ≥8 suspicion / treatment threshold only. This tool does not invent mild/moderate/severe stages. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"crying","description":"Caller-assigned Maguire 2013 Table 1 crying (none, excessive_high_pitched, or continuous_high_pitched). Exclusive. none 0, excessive_high_pitched 2, continuous_high_pitched 3. magent does not examine the infant.","required":true,"schema":{"type":"string","enum":["none","excessive_high_pitched","continuous_high_pitched"]},"example":"none"},{"in":"query","name":"sleep","description":"Caller-assigned Maguire 2013 Table 1 sleep after feeding (none, lt_3h, lt_2h, or lt_1h). Exclusive. Sleeps less than 3/2/1 h after feeding: lt_3h 1, lt_2h 2, lt_1h 3. magent does not observe sleep.","required":true,"schema":{"type":"string","enum":["none","lt_3h","lt_2h","lt_1h"]},"example":"none"},{"in":"query","name":"moro","description":"Caller-assigned Maguire 2013 Table 1 Moro reflex (none, hyperactive, or markedly_hyperactive). Exclusive. hyperactive 2, markedly_hyperactive 3. magent does not examine the infant.","required":true,"schema":{"type":"string","enum":["none","hyperactive","markedly_hyperactive"]},"example":"none"},{"in":"query","name":"tremors","description":"Caller-assigned Maguire 2013 Table 1 tremors (none, mild_disturbed, moderate_severe_disturbed, mild_undisturbed, or moderate_severe_undisturbed). Exclusive. mild_disturbed 1, moderate_severe_disturbed 2, mild_undisturbed 3, moderate_severe_undisturbed 4. magent does not examine the infant.","required":true,"schema":{"type":"string","enum":["none","mild_disturbed","moderate_severe_disturbed","mild_undisturbed","moderate_severe_undisturbed"]},"example":"none"},{"in":"query","name":"increased_muscle_tone","description":"Caller-assigned Maguire 2013 Table 1 increased muscle tone. true scores 2. magent does not examine the infant.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"myoclonic_jerk","description":"Caller-assigned Maguire 2013 Table 1 myoclonic jerks. true scores 3. magent does not examine the infant.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"generalized_convulsions","description":"Caller-assigned Maguire 2013 Table 1 generalized convulsions. true scores 5. magent does not examine the infant. Not a seizure diagnosis.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"excoriation","description":"Caller-assigned Maguire 2013 Table 1 excoriation. Single item (not per-site nose, knees, or toes). true scores 1. magent does not inspect the skin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"sweating","description":"Caller-assigned Maguire 2013 Table 1 sweating. true scores 1. magent does not examine the infant.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"fever","description":"Caller-assigned Maguire 2013 Table 1 fever (none, lt_101f, or gt_101f). Exclusive. Maguire <101°F scores 1; >101°F scores 2. magent does not take a temperature.","required":true,"schema":{"type":"string","enum":["none","lt_101f","gt_101f"]},"example":"none"},{"in":"query","name":"frequent_yawning","description":"Caller-assigned Maguire 2013 Table 1 frequent yawning (>3). true scores 1. magent does not observe yawning.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"mottling","description":"Caller-assigned Maguire 2013 Table 1 mottling. true scores 1. magent does not examine the infant.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"nasal_stuffiness","description":"Caller-assigned Maguire 2013 Table 1 nasal stuffiness. true scores 1. magent does not examine the infant.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"sneezing","description":"Caller-assigned Maguire 2013 Table 1 sneezing (>3). true scores 1. magent does not count sneezes.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"nasal_flaring","description":"Caller-assigned Maguire 2013 Table 1 nasal flaring. true scores 2. magent does not examine the infant.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"respiratory","description":"Caller-assigned Maguire 2013 Table 1 respiratory rate (none, gt_60, or gt_60_retractions). Exclusive. Rate >60/min scores 1; >60 with retractions scores 2. magent does not count respirations.","required":true,"schema":{"type":"string","enum":["none","gt_60","gt_60_retractions"]},"example":"none"},{"in":"query","name":"excessive_sucking","description":"Caller-assigned Maguire 2013 Table 1 excessive sucking. true scores 1. magent does not observe feeding.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"poor_feeding","description":"Caller-assigned Maguire 2013 Table 1 poor feeding. true scores 2. magent does not observe feeding.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"regurgitation","description":"Caller-assigned Maguire 2013 Table 1 regurgitation. true scores 2. magent does not observe feeding.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"projectile_vomiting","description":"Caller-assigned Maguire 2013 Table 1 projectile vomiting. true scores 3. magent does not observe feeding.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"stools","description":"Caller-assigned Maguire 2013 Table 1 stools (none, loose, or watery). Exclusive. loose 2, watery 3. magent does not inspect stools.","required":true,"schema":{"type":"string","enum":["none","loose","watery"]},"example":"none"}],"summary":"Finnegan","operationId":"get_api_calc_finnegan","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, at_or_above_8, components, citation, disclaimer."},"400":{"description":"invalid_finnegan: Finnegan inputs must match Maguire 2013 Table 1 modified FNAS exclusive bands and true/false items from that table. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/finnegan"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Finnegan (bulk)","operationId":"post_api_calc_finnegan","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_finnegan: Finnegan inputs must match Maguire 2013 Table 1 modified FNAS exclusive bands and true/false items from that table. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/finnegan"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"crying":"none","excessive_sucking":"false","excoriation":"false","fever":"none","frequent_yawning":"false","generalized_convulsions":"false","increased_muscle_tone":"false","moro":"none","mottling":"false","myoclonic_jerk":"false","nasal_flaring":"false","nasal_stuffiness":"false","poor_feeding":"false","projectile_vomiting":"false","regurgitation":"false","respiratory":"none","sleep":"none","sneezing":"false","stools":"none","sweating":"false","tremors":"none"},{"crying":"none","excessive_sucking":"false","excoriation":"false","fever":"none","frequent_yawning":"false","generalized_convulsions":"false","increased_muscle_tone":"false","moro":"none","mottling":"false","myoclonic_jerk":"false","nasal_flaring":"false","nasal_stuffiness":"false","poor_feeding":"false","projectile_vomiting":"false","regurgitation":"false","respiratory":"none","sleep":"none","sneezing":"false","stools":"none","sweating":"false","tremors":"none"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/nice-iv-maintenance":{"get":{"description":"Compute NICE CG174 adult hospital routine maintenance water (20, 25, or 30 mL/kg/day), approximately 1 mmol/kg/day sodium, potassium, and chloride each, and the fixed 50–100 g/day glucose range.\n\nWhen an agent needs CG174 recommendations 1.4.1 and 1.4.3 routine-maintenance arithmetic and must not invent intraoperative 4-2-1 rates, Holliday–Segar 100/50/20 volumes, or a fluid-type order.\n\nNot a medical device. Not a prescription or infusion-rate order.\n\nNot intraoperative 4-2-1. Not Holliday–Segar 100/50/20 pediatric maintenance water.\n\nDoes not choose 0.18% sodium chloride / 4% glucose or any other fluid type.\n\nObese dosing weight is caller-assigned ideal body weight (CG174 1.4.2); magent does not compute IBW. Volume over 2500 mL is flagged (1.4.4), not capped. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"weight_kg","description":"Dosing weight in kilograms (1-500). Provide weight_kg or weight_lb. For obesity, caller assigns ideal body weight (CG174 1.4.2); magent does not compute IBW.","required":false,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"weight_lb","description":"Dosing weight in pounds (2-1100). Converted as kg = lb * 0.45359237.","required":false,"schema":{"type":"number"},"example":"154.3236"},{"in":"query","name":"ml_per_kg_day","description":"Routine maintenance water rate: 30 (1.4.1 upper initial 25-30), 25 (1.4.1 lower or 1.4.3 reduced upper), or 20 (1.4.3 reduced initial). Integers 20, 25, or 30 only.","required":true,"schema":{"type":"integer"},"example":"25"}],"summary":"NICE adult IV maintenance","operationId":"get_api_calc_nice_iv_maintenance","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, weight_kg, ml_per_kg_day, water_ml_day, electrolyte_mmol_day, glucose_g_day_low, glucose_g_day_high, exceeds_2500_ml, citation, disclaimer."},"400":{"description":"invalid_nice_iv_maintenance: NICE CG174 adult maintenance inputs must match dosing weight and water rate 20, 25, or 30 mL/kg/day from that guideline. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nice-iv-maintenance"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"NICE adult IV maintenance (bulk)","operationId":"post_api_calc_nice_iv_maintenance","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_nice_iv_maintenance: NICE CG174 adult maintenance inputs must match dosing weight and water rate 20, 25, or 30 mL/kg/day from that guideline. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nice-iv-maintenance"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ml_per_kg_day":"25","weight_kg":"70"},{"ml_per_kg_day":"25","weight_kg":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pesi":{"get":{"description":"Compute the Aujesky 2005 Pulmonary Embolism Severity Index (PESI) from age, sex, comorbidities, vital signs, and altered mental status.\n\nWhen an agent already has a diagnosis of pulmonary embolism, as in the paper, and needs the published 11-variable PESI total and class I-V.\n\nNot a diagnosis or outpatient-treatment protocol. magent does not diagnose PE.\n\nOnly for patients with already diagnosed pulmonary embolism, as in Aujesky 2005.\n\nThis tool is original PESI (Aujesky 2005), not sPESI. Heart failure and chronic lung disease are separate items.\n\nThis is the 11-variable point score, not the 17-variable laboratory model.\n\nThe caller assigns age, sex, comorbidities, vital signs, and altered mental status. magent does not examine the patient. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Adds 1 point per year (the age integer itself).","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"sex","description":"Sex (female or male). Male scores +10.","required":true,"schema":{"type":"string"},"example":"female"},{"in":"query","name":"cancer","description":"Cancer as assigned by the caller. true or false. +30 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"heart_failure","description":"Heart failure as assigned by the caller (separate from chronic lung disease). true or false. +10 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"chronic_lung_disease","description":"Chronic lung disease as assigned by the caller (separate from heart failure). true or false. +10 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats per minute (integer 30-220). Scores +20 when ≥110; 109 does not score.","required":true,"schema":{"type":"integer"},"example":"80"},{"in":"query","name":"systolic_mm_hg","description":"Systolic blood pressure in mm Hg (50-250). Scores +30 when <100; 100 does not score.","required":true,"schema":{"type":"number"},"example":"120"},{"in":"query","name":"respiratory_rate","description":"Respiratory rate in breaths/min (integer 4-80). Scores +20 when ≥30; 29 does not score.","required":true,"schema":{"type":"integer"},"example":"16"},{"in":"query","name":"temperature_c","description":"Temperature in °C (30-45). Scores +20 when <36; 36.0 does not score.","required":true,"schema":{"type":"number"},"example":"37.0"},{"in":"query","name":"altered_mentation","description":"Altered mental status as assigned by the caller. true or false. +60 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"spo2_percent","description":"Arterial oxygen saturation percent (50-100). Scores +20 when <90; 90 does not score.","required":true,"schema":{"type":"number"},"example":"96"}],"summary":"PESI","operationId":"get_api_calc_pesi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, pesi_class, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_respiratory_rate: respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.; invalid_temperature: temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pesi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PESI (bulk)","operationId":"post_api_calc_pesi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_respiratory_rate: respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.; invalid_temperature: temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pesi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","altered_mentation":"false","cancer":"false","chronic_lung_disease":"false","heart_failure":"false","heart_rate_bpm":"80","respiratory_rate":"16","sex":"female","spo2_percent":"96","systolic_mm_hg":"120","temperature_c":"37.0"},{"age":"50","altered_mentation":"false","cancer":"false","chronic_lung_disease":"false","heart_failure":"false","heart_rate_bpm":"80","respiratory_rate":"16","sex":"female","spo2_percent":"96","systolic_mm_hg":"120","temperature_c":"37.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-rumination":{"get":{"description":"Apply the Stanghellini 2016 Rome IV rumination syndrome (B4) diagnostic criteria and return whether the published rumination box holds (rome_iv_rumination).\n\nWhen an agent already has the four caller-assigned Stanghellini 2016 Rome IV rumination syndrome flags and needs whether the published rumination box holds. magent does not observe regurgitation.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose rumination syndrome.\n\nThe caller assigns the four flags. magent does not observe regurgitation.\n\nThis tool is Stanghellini 2016 Rome IV rumination syndrome (B4) only. Supportive remarks (effortless regurgitation, not preceded by nausea, recognizable food, ceases when acidic) are copy-only and are not parsed. Not cannabinoid hyperemesis syndrome (CHS). Not cyclic vomiting syndrome (CVS). Not GERD. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"persistent_or_recurrent_regurgitation_of_recently_ingested_food","description":"Persistent or recurrent regurgitation of recently ingested food into the mouth with subsequent spitting or remastication and swallowing (Stanghellini 2016 Rome IV rumination syndrome B4). true or false as assigned by the caller. magent does not observe regurgitation.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"regurgitation_not_preceded_by_retching","description":"Regurgitation is not preceded by retching (Stanghellini 2016). true or false as assigned by the caller. magent does not observe regurgitation.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"fulfilled_last_3_months","description":"Criteria fulfilled for the last 3 months, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"onset_at_least_6_months","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV rumination","operationId":"get_api_calc_rome_iv_rumination","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, rome_iv_rumination, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_rumination: Rome IV rumination needs the Stanghellini 2016 gastroduodenal rumination flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-rumination"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV rumination (bulk)","operationId":"post_api_calc_rome_iv_rumination","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_rumination: Rome IV rumination needs the Stanghellini 2016 gastroduodenal rumination flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-rumination"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"fulfilled_last_3_months":"true","onset_at_least_6_months":"true","persistent_or_recurrent_regurgitation_of_recently_ingested_food":"true","regurgitation_not_preceded_by_retching":"true"},{"fulfilled_last_3_months":"true","onset_at_least_6_months":"true","persistent_or_recurrent_regurgitation_of_recently_ingested_food":"true","regurgitation_not_preceded_by_retching":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/bmi":{"get":{"description":"Compute Keys/Quetelet body-mass index from height and weight, plus a WHO adult band.\n\nWhen an agent needs BMI for GLP-1 or bariatric prior-auth arithmetic and must not invent kg/m^2.\n\nNot a diagnosis. WHO adult cut-points are labels, not a clinical assessment.\n\nDoes not apply pediatric or ethnicity-specific BMI charts. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"height_cm","description":"Height in centimeters. Provide height_cm or height_in.","required":false,"schema":{"type":"number"},"example":"170"},{"in":"query","name":"weight_kg","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"height_in","description":"Height in inches. Converted as cm = in * 2.54.","required":false,"schema":{"type":"number"},"example":"67"},{"in":"query","name":"weight_lb","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"schema":{"type":"number"},"example":"154"}],"summary":"BMI","operationId":"get_api_calc_bmi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, height_cm, weight_kg, bmi, who_adult_category, citation, disclaimer."},"400":{"description":"invalid_height: height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bmi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"BMI (bulk)","operationId":"post_api_calc_bmi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_height: height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bmi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"height_cm":"170","weight_kg":"70"},{"height_cm":"170","weight_kg":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pons":{"get":{"description":"Sum the four Wischmeyer 2018 Perioperative Nutrition Screen (PONS) flags and return whether any item is positive (high nutritional risk).\n\nWhen an agent has caller-assigned Wischmeyer 2018 PONS questions and needs the published point total and high-risk flag, not a diet order, not a malnutrition diagnosis, and without computing BMI or assaying albumin.\n\nNot a medical device.\n\nNot a diet order or malnutrition diagnosis.\n\nmagent does not weigh the patient, compute BMI, or assay albumin. The caller assigns each flag. magent does not take height, weight, age, or albumin as numeric inputs.\n\nAlbumin cutoff is <3.0 g/dL (Wischmeyer 2018), not 3 g/L.\n\nThis is not NRS-2002, not NUTRIC, and not MUST. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"bmi_low","description":"Caller-assigned Wischmeyer 2018 PONS low-BMI flag: BMI <18.5 kg/m² if age ≤65, or BMI <20 kg/m² if age >65. true or false. magent does not take age, weigh the patient, or compute BMI.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"weight_loss_gt_10pct_6mo","description":"Caller-assigned Wischmeyer 2018 PONS flag: weight loss >10% in the past 6 months. true or false. magent does not weigh the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"oral_intake_reduced_gt_50pct_week","description":"Caller-assigned Wischmeyer 2018 PONS flag: reduced oral intake by >50% in the past week. true or false. magent does not measure intake.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"albumin_lt_3_g_dl","description":"Caller-assigned Wischmeyer 2018 PONS flag: preoperative serum albumin <3.0 g/dL (not 3 g/L). true or false. magent does not assay albumin.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"PONS","operationId":"get_api_calc_pons","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, high_risk, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pons"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PONS (bulk)","operationId":"post_api_calc_pons","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pons"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"albumin_lt_3_g_dl":"false","bmi_low":"false","oral_intake_reduced_gt_50pct_week":"false","weight_loss_gt_10pct_6mo":"false"},{"albumin_lt_3_g_dl":"false","bmi_low":"false","oral_intake_reduced_gt_50pct_week":"false","weight_loss_gt_10pct_6mo":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/newsom":{"get":{"description":"Apply the Newsom 2014 modified Rothrock rule and return whether a chest radiograph is indicated from caller-assigned age and five history or exam flags.\n\nWhen an agent has caller-assigned findings for an adult with nontraumatic chest pain in the emergency department and needs the published 2014 modified Rothrock CXR-indicated result. magent does not examine the patient or read a radiograph. Not the original Rothrock 2002 rule and not the 2018 prospective refinement.\n\nNot a medical device. Not a diagnosis. magent does not examine the patient or read a radiograph.\n\nThis tool is the Newsom 2014 modified Rothrock rule only. It does not include hypoxia, rales, hemoptysis, history of tuberculosis, or thromboembolic disease (removed in the 2014 modification). It is not the original Rothrock 2002 ten-item rule and not the 2018 Academic Emergency Medicine prospective refinement.\n\nAge is an integer 18-120; the age criterion is met at 65 or older. CHF, alcohol abuse, decreased breath sounds, fever, and tachypnea are caller-assigned booleans. magent does not measure temperature or respiratory rate or auscultate the chest.\n\nPresence of a criterion does not order a chest radiograph. A negative rule does not exclude all clinically significant radiographic findings. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120). The Newsom 2014 age criterion is met at 65 or older; 64 does not meet.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"chf","description":"History of congestive heart failure as assigned by the caller. true or false. true means the Newsom 2014 CXR criterion is met. magent does not diagnose heart failure.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"alcohol_abuse","description":"History of alcohol abuse as assigned by the caller. true or false. true means the Newsom 2014 CXR criterion is met.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"decreased_breath_sounds","description":"Decreased breath sounds on exam as assigned by the caller. true or false. true means the Newsom 2014 CXR criterion is met. magent does not auscultate the chest.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"fever","description":"Fever as assigned by the caller (paper: temperature greater than 100.4 F). true or false. true means the Newsom 2014 CXR criterion is met. magent does not measure temperature.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"tachypnea","description":"Tachypnea as assigned by the caller (original Rothrock: respiratory rate greater than 24 breaths/min; retained as tachypnea in the 2014 modification). true or false. true means the Newsom 2014 CXR criterion is met. magent does not measure respiratory rate.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Newsom CXR rule","operationId":"get_api_calc_newsom","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, cxr_indicated, criteria, citation, disclaimer."},"400":{"description":"invalid_newsom: Newsom CXR-rule inputs must be the six caller-assigned 2014 modified flags (age 65 or older, CHF, alcohol abuse, decreased breath sounds, fever, tachypnea). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/newsom"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Newsom CXR rule (bulk)","operationId":"post_api_calc_newsom","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_newsom: Newsom CXR-rule inputs must be the six caller-assigned 2014 modified flags (age 65 or older, CHF, alcohol abuse, decreased breath sounds, fever, tachypnea). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/newsom"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","alcohol_abuse":"false","chf":"false","decreased_breath_sounds":"false","fever":"false","tachypnea":"false"},{"age":"40","alcohol_abuse":"false","chf":"false","decreased_breath_sounds":"false","fever":"false","tachypnea":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rsbi":{"get":{"description":"Compute the Yang and Tobin rapid shallow breathing index as respiratory rate in breaths/min divided by tidal volume in liters.\n\nWhen an agent needs f/VT with VT in liters and must not invent a wean order or perform an SBT.\n\nNot a wean order and not a diagnosis.\n\nMeasured during spontaneous breathing as published (Yang and Tobin 1991).\n\nNot a ventilator-derived index unless the caller supplies frequency (f) and tidal volume (VT).\n\nMagent does not perform a spontaneous breathing trial (SBT). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"respiratory_rate","description":"Respiratory rate in breaths/min (integer 4-80).","required":true,"schema":{"type":"integer"},"example":"20"},{"in":"query","name":"tidal_volume_ml","description":"Tidal volume in milliliters (50-2000). Converted as tidal_volume_l = tidal_volume_ml / 1000. Provide this or tidal_volume_l, not both.","required":false,"schema":{"type":"number"},"example":"400"},{"in":"query","name":"tidal_volume_l","description":"Tidal volume in liters (0.05-2.0). Yang and Tobin RSBI uses VT in liters. Provide this or tidal_volume_ml, not both.","required":false,"schema":{"type":"number"},"example":"0.4"}],"summary":"Rapid shallow breathing index","operationId":"get_api_calc_rsbi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, respiratory_rate, tidal_volume_l, rsbi, rsbi_gt_105, citation, disclaimer."},"400":{"description":"invalid_respiratory_rate: respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.; invalid_tidal_volume: tidal_volume_ml (50-2000) or tidal_volume_l (0.05-2.0) is required, not both. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rsbi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rapid shallow breathing index (bulk)","operationId":"post_api_calc_rsbi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_respiratory_rate: respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.; invalid_tidal_volume: tidal_volume_ml (50-2000) or tidal_volume_l (0.05-2.0) is required, not both. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rsbi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"respiratory_rate":"20","tidal_volume_ml":"400"},{"respiratory_rate":"20","tidal_volume_ml":"400"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ipi":{"get":{"description":"Sum the Shipp 1993 five-factor International Prognostic Index (all ages) and return low (0–1), low_intermediate (2), high_intermediate (3), or high (4–5).\n\nWhen an agent needs the published IPI 1993 point total and risk group and must not invent a lymphoma diagnosis or treatment choice, and must not substitute age-adjusted IPI, R-IPI, or NCCN-IPI.\n\nNot a medical device and not a lymphoma diagnosis or treatment choice. magent does not examine the patient.\n\nThis is the five-factor International Prognostic Index for all ages (Shipp / NEJM 1993), not the age-adjusted three-factor IPI for patients ≤60, not R-IPI (Sehn 2007), and not NCCN-IPI.\n\nmagent does not stage lymphoma, count extranodal sites, assign ECOG, or assay LDH. stage_iii_or_iv, extranodal_gt_1, and ldh_gt_uln are caller-assigned flags; ECOG is a caller-assigned integer 0–4. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Age >60 scores 1 (Shipp 1993). Age 60 is the ≤60 arm and scores 0.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"stage_iii_or_iv","description":"Ann Arbor stage III or IV as assigned by the caller (Shipp 1993). true scores 1. magent does not stage lymphoma.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"extranodal_gt_1","description":"More than one extranodal site as assigned by the caller (Shipp 1993). true scores 1. magent does not count extranodal sites.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ecog","description":"ECOG performance status 0-4 as assigned by the caller (Shipp 1993). ≥2 scores 1. magent does not assign ECOG.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"ldh_gt_uln","description":"Serum LDH above the upper limit of normal as assigned by the caller (Shipp 1993). true scores 1. magent does not assay LDH.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"IPI","operationId":"get_api_calc_ipi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, ipi_risk, age_years, ecog, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_ecog: ecog must be an integer from 0 to 4 (Shipp 1993 IPI). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ipi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"IPI (bulk)","operationId":"post_api_calc_ipi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_ecog: ecog must be an integer from 0 to 4 (Shipp 1993 IPI). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ipi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","ecog":"0","extranodal_gt_1":"false","ldh_gt_uln":"false","stage_iii_or_iv":"false"},{"age":"50","ecog":"0","extranodal_gt_1":"false","ldh_gt_uln":"false","stage_iii_or_iv":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/nincds-adrda":{"get":{"description":"Echo the caller-assigned McKhann 1984 NINCDS-ADRDA diagnostic category (definite, probable, possible, or unlikely) with the published defining-features description. magent does not examine the patient. Not NIA-AA 2011/2018. Not DSM.\n\nWhen an agent already has a McKhann 1984 NINCDS-ADRDA category as assigned by the caller and needs the published category description. magent does not examine the patient, apply NIA-AA 2011/2018, apply DSM, or diagnose Alzheimer's disease.\n\nNot a medical device. magent does not examine the patient.\n\nThe caller assigns McKhann 1984 NINCDS-ADRDA category definite, probable, possible, or unlikely. magent does not apply the criteria to raw findings, read histopathology, or diagnose Alzheimer's disease.\n\nMcKhann 1984 NINCDS-ADRDA tokens only. Not NIA-AA 2011 or 2018. Not DSM. This tool does not convert NINCDS-ADRDA to NIA-AA or DSM.\n\nNot an Alzheimer's diagnosis. Not a treatment order. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"category","description":"McKhann 1984 NINCDS-ADRDA diagnostic category as assigned by the caller (definite: clinical criteria for probable Alzheimer's disease and histopathologic confirmation; probable: dementia, deficits in two or more areas of cognition, progressive worsening, no disturbance of consciousness, onset between 40 and 90, absence of other diseases that could account for the deficits; possible: dementia syndrome with atypical onset, presentation, or course, or a second systemic or brain disease capable of producing dementia but not thought to be the cause; unlikely: sudden onset, early focal neurologic findings, or seizures or gait disturbance at onset). Token definite, probable, possible, or unlikely only; case-insensitive. Reject NIA-AA, DSM, and probable AD. Not NIA-AA 2011/2018. Not DSM. magent does not examine the patient.","required":true,"schema":{"type":"string"},"example":"probable"}],"summary":"NINCDS-ADRDA","operationId":"get_api_calc_nincds_adrda","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, category, description, components, citation, disclaimer."},"400":{"description":"invalid_nincds_adrda: NINCDS-ADRDA needs the McKhann 1984 category token definite, probable, possible, or unlikely. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nincds-adrda"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"NINCDS-ADRDA (bulk)","operationId":"post_api_calc_nincds_adrda","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_nincds_adrda: NINCDS-ADRDA needs the McKhann 1984 category token definite, probable, possible, or unlikely. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nincds-adrda"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"category":"probable"},{"category":"probable"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/icc-pmf":{"get":{"description":"Apply the Arber 2022 International Consensus Classification prefibrotic and overt primary myelofibrosis criteria and return whether all three majors and at least one applicable minor are met. Leukoerythroblastosis counts only for overt PMF.\n\nWhen an agent already has caller-assigned ICC 2022 PMF phenotype and major/minor flags and needs the published criteria result. magent does not diagnose PMF, does not read fibrosis grade, and does not sequence JAK2, CALR, or MPL.\n\nNot a medical device.\n\nNot a diagnosis. Criteria met is not a primary myelofibrosis diagnosis without the rest of the ICC 2022 workup.\n\nNot DIPSS, DIPSS Plus, MIPSS70, or MIPSS70-plus. This tool is ICC 2022 diagnostic criteria, not a prognostic score.\n\nNot WHO 5th edition / Khoury 2022 classification.\n\nNot post-PV or post-ET myelofibrosis. This tool is ICC 2022 primary myelofibrosis only (prefibrotic and overt).\n\nmagent does not read a biopsy or fibrosis grade. megakaryocyte_morphology is assigned by the caller for the chosen phenotype.\n\nmagent does not sequence JAK2, CALR, MPL, or other clonal markers. clonal_or_no_reactive is caller-assigned. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"phenotype","description":"pre (prefibrotic/early PMF) or overt (overt fibrotic PMF) as assigned by the caller (Arber 2022 ICC). Required. magent does not assign phenotype from a biopsy.","required":true,"schema":{"type":"string","enum":["pre","overt"]},"example":"pre"},{"in":"query","name":"megakaryocyte_morphology","description":"Megakaryocytic proliferation and atypia for the chosen phenotype, as assigned by the caller (Arber 2022 ICC PMF major). For pre: without reticulin fibrosis grade >1, with increased age-adjusted cellularity, granulocytic proliferation, and often decreased erythropoiesis. For overt: accompanied by reticulin and/or collagen fibrosis grade 2 or 3. true or false. magent does not read a biopsy.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"not_other_myeloid","description":"Does not meet ICC/WHO criteria for BCR::ABL1-positive CML, PV, ET, MDS, or another defined myeloid neoplasm, as assigned by the caller (Arber 2022 ICC PMF major). true or false. magent does not diagnose those neoplasms.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"clonal_or_no_reactive","description":"JAK2, CALR, or MPL mutation, or another clonal marker, or absence of reactive bone-marrow fibrosis, as assigned by the caller (Arber 2022 ICC PMF major). true or false. magent does not sequence.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"anemia_not_comorbid","description":"Anemia not attributed to a comorbid condition, as assigned by the caller (Arber 2022 ICC PMF minor). true or false. magent does not assay hemoglobin.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"leukocytosis_ge_11","description":"Leukocytosis ≥11 × 10^9/L as assigned by the caller (Arber 2022 ICC PMF minor). true or false. magent does not assay WBC.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"splenomegaly","description":"Palpable splenomegaly as assigned by the caller (Arber 2022 ICC PMF minor). true or false. magent does not examine the spleen.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ldh_above_uln","description":"LDH above the institutional upper limit of normal as assigned by the caller (Arber 2022 ICC PMF minor). true or false. magent does not assay LDH.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"leukoerythroblastosis","description":"Leukoerythroblastosis as assigned by the caller (Arber 2022 ICC overt-PMF minor). Counts toward minor_count only when phenotype is overt; echoed but not counted when phenotype is pre. true or false. magent does not read a smear.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"ICC 2022 PMF criteria","operationId":"get_api_calc_icc_pmf","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, phenotype, diagnosed, major_count, minor_count, megakaryocyte_morphology, not_other_myeloid, clonal_or_no_reactive, anemia_not_comorbid, leukocytosis_ge_11, splenomegaly, ldh_above_uln, leukoerythroblastosis, criteria, citation, disclaimer."},"400":{"description":"invalid_pmf_phenotype: phenotype must be pre or overt (Arber 2022 ICC prefibrotic versus overt primary myelofibrosis). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/icc-pmf"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ICC 2022 PMF criteria (bulk)","operationId":"post_api_calc_icc_pmf","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pmf_phenotype: phenotype must be pre or overt (Arber 2022 ICC prefibrotic versus overt primary myelofibrosis). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/icc-pmf"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"anemia_not_comorbid":"true","clonal_or_no_reactive":"true","ldh_above_uln":"false","leukocytosis_ge_11":"false","leukoerythroblastosis":"false","megakaryocyte_morphology":"true","not_other_myeloid":"true","phenotype":"pre","splenomegaly":"false"},{"anemia_not_comorbid":"true","clonal_or_no_reactive":"true","ldh_above_uln":"false","leukocytosis_ge_11":"false","leukoerythroblastosis":"false","megakaryocyte_morphology":"true","not_other_myeloid":"true","phenotype":"pre","splenomegaly":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/bps":{"get":{"description":"Sum three caller-assigned Payen 2001 BPS integers (1-4) and return the published total (range 3-12).\n\nWhen an agent has already assigned Payen 2001 1-4 integers for facial expression, upper limbs, and compliance with ventilation and needs the published total, not a pain diagnosis, analgesic order, or later pain-present cutoff.\n\nNot a medical device and not a pain diagnosis or analgesic order.\n\nEach of the three items is a caller-assigned integer 1, 2, 3, or 4 from Payen 2001 Table 1. magent does not observe the patient.\n\nNot CPOT (CPOT items are 0-2). Total is 3-12. magent does not add pain-present cutoffs that are not in Payen 2001. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"facial_expression","description":"Caller-assigned Payen 2001 BPS facial expression (integer 1-4): 1 relaxed; 2 partially tightened (e.g. brow lowering); 3 fully tightened (e.g. eyelid closing); 4 grimacing. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"upper_limbs","description":"Caller-assigned Payen 2001 BPS upper limbs (integer 1-4): 1 no movement; 2 partially bent; 3 fully bent with finger flexion; 4 permanently retracted. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"ventilator_compliance","description":"Caller-assigned Payen 2001 BPS compliance with ventilation (integer 1-4): 1 tolerating movement; 2 coughing but tolerating ventilation most of the time; 3 fighting ventilator; 4 unable to control ventilation. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"1"}],"summary":"BPS","operationId":"get_api_calc_bps","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, facial_expression, upper_limbs, ventilator_compliance, components, citation, disclaimer."},"400":{"description":"invalid_bps: facial_expression, upper_limbs, and ventilator_compliance must each be an integer 1, 2, 3, or 4 (Payen 2001). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bps"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"BPS (bulk)","operationId":"post_api_calc_bps","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_bps: facial_expression, upper_limbs, and ventilator_compliance must each be an integer 1, 2, 3, or 4 (Payen 2001). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bps"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"facial_expression":"1","upper_limbs":"1","ventilator_compliance":"1"},{"facial_expression":"1","upper_limbs":"1","ventilator_compliance":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/aims":{"get":{"description":"Sum Guy 1976 AIMS movement items 1-7 (each caller-assigned integer 0-4) and return the dyskinesia total (max 28). Overall severity, incapacitation, awareness, dental problems, and dentures are recorded only.\n\nWhen an agent already has Guy 1976 AIMS item integers and dental flags and needs the published dyskinesia total. magent does not examine the patient, diagnose tardive dyskinesia, subtract for activation-only movements, or apply Schooler-Kane criteria.\n\nNot a medical device. magent does not examine the patient. Each item is a caller-assigned Guy 1976 integer or yes/no.\n\nNot a diagnosis of tardive dyskinesia. Guy 1976 published no total-score TD cutoffs. magent does not apply Schooler-Kane research diagnostic criteria.\n\nItems 8-12 (overall_severity, incapacitation, awareness, dental_problems, wears_dentures) are required and returned and are not added to the dyskinesia total.\n\nmagent does not subtract 1 for activation-only movements. Rate highest severity observed as assigned by the caller.\n\nNot AIMS65 (Saltzman 2011 upper GI bleed). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"facial_expression","description":"Caller-assigned Guy 1976 AIMS item 1 muscles of facial expression (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Rate highest severity observed. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"2"},{"in":"query","name":"lips_perioral","description":"Caller-assigned Guy 1976 AIMS item 2 lips and perioral area (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Rate highest severity observed. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"jaw","description":"Caller-assigned Guy 1976 AIMS item 3 jaw (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Rate highest severity observed. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"tongue","description":"Caller-assigned Guy 1976 AIMS item 4 tongue (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Rate increase in movement, not inability to sustain. Rate highest severity observed. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"1"},{"in":"query","name":"upper_extremities","description":"Caller-assigned Guy 1976 AIMS item 5 upper extremities (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Include choreic and athetoid movements. Do not include tremor. Rate highest severity observed. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"lower_extremities","description":"Caller-assigned Guy 1976 AIMS item 6 lower extremities (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Rate highest severity observed. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"trunk","description":"Caller-assigned Guy 1976 AIMS item 7 neck, shoulders, hips (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Rate highest severity observed. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"overall_severity","description":"Caller-assigned Guy 1976 AIMS item 8 overall severity of abnormal movements (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Recorded only; not added to the dyskinesia total. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"2"},{"in":"query","name":"incapacitation","description":"Caller-assigned Guy 1976 AIMS item 9 incapacitation due to abnormal movements (integer 0-4): 0 none, 1 minimal, 2 mild, 3 moderate, 4 severe. Recorded only; not added to the dyskinesia total. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"1"},{"in":"query","name":"awareness","description":"Caller-assigned Guy 1976 AIMS item 10 patient's awareness of abnormal movements (integer 0-4): 0 no awareness, 1 aware no distress, 2 aware mild distress, 3 aware moderate distress, 4 aware severe distress. Rate only the patient's report. Recorded only; not added to the dyskinesia total. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"1"},{"in":"query","name":"dental_problems","description":"Caller-assigned Guy 1976 AIMS item 11 current problems with teeth and/or dentures (true or false). Recorded only; not added to the dyskinesia total. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"wears_dentures","description":"Caller-assigned Guy 1976 AIMS item 12 does the patient usually wear dentures (true or false). Recorded only; not added to the dyskinesia total. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"AIMS","operationId":"get_api_calc_aims","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, overall_severity, incapacitation, awareness, dental_problems, wears_dentures, components, citation, disclaimer."},"400":{"description":"invalid_aims: AIMS needs Guy 1976 movement items 1-7 as integers 0-4 plus global and dental items 8-12. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/aims"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"AIMS (bulk)","operationId":"post_api_calc_aims","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_aims: AIMS needs Guy 1976 movement items 1-7 as integers 0-4 plus global and dental items 8-12. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/aims"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"awareness":"1","dental_problems":"false","facial_expression":"2","incapacitation":"1","jaw":"0","lips_perioral":"0","lower_extremities":"0","overall_severity":"2","tongue":"1","trunk":"0","upper_extremities":"0","wears_dentures":"false"},{"awareness":"1","dental_problems":"false","facial_expression":"2","incapacitation":"1","jaw":"0","lips_perioral":"0","lower_extremities":"0","overall_severity":"2","tongue":"1","trunk":"0","upper_extremities":"0","wears_dentures":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/milan":{"get":{"description":"Apply Mazzaferro 1996 Milan criteria and return whether the published size, count, vascular-invasion, and extrahepatic rules all hold (meets_milan).\n\nWhen an agent already has tumor count, largest diameter in centimetres, and preoperative vascular-invasion and extrahepatic flags as in Mazzaferro 1996, and needs the published eligibility result. magent does not interpret imaging.\n\nNot a medical device.\n\nNot a transplant listing or organ-allocation order.\n\nmagent does not interpret imaging. tumor_count and largest_cm are caller-assigned.\n\nThis tool is Mazzaferro 1996 Milan criteria only. Not UCSF criteria, not up-to-7, and not OPTN downstaging. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"tumor_count","description":"Number of HCC nodules (integer 1-20) as assigned by the caller. A single tumor may be up to 5 cm; two or three nodules must each be 3 cm or less. Four or more nodules fail Milan. magent does not interpret imaging.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"largest_cm","description":"Largest tumor diameter in centimetres (0.1-30). Single tumor meets at 5.0 cm and fails at 5.1. Two or three nodules meet at 3.0 cm and fail at 3.1. magent does not interpret imaging.","required":true,"schema":{"type":"number"},"example":"5"},{"in":"query","name":"vascular_invasion","description":"Preoperative vascular (vessel) invasion as assigned by the caller. true fails Milan (Mazzaferro 1996 excluded preoperative vessel invasion). true or false. magent does not interpret imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"extrahepatic","description":"Evident or suspected extrahepatic or lymph-node disease as assigned by the caller. true fails Milan (Mazzaferro 1996 excluded extrahepatic disease). true or false. magent does not interpret imaging.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Milan","operationId":"get_api_calc_milan","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, meets_milan, tumor_count, largest_cm, vascular_invasion, extrahepatic, criteria, citation, disclaimer."},"400":{"description":"invalid_tumor_count: tumor_count must be an integer from 1 to 20 (Mazzaferro 1996). Returned before settlement; you are not charged.; invalid_largest_cm: largest_cm must be a number from 0.1 to 30 (Mazzaferro 1996). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/milan"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Milan (bulk)","operationId":"post_api_calc_milan","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_tumor_count: tumor_count must be an integer from 1 to 20 (Mazzaferro 1996). Returned before settlement; you are not charged.; invalid_largest_cm: largest_cm must be a number from 0.1 to 30 (Mazzaferro 1996). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/milan"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"extrahepatic":"false","largest_cm":"5","tumor_count":"1","vascular_invasion":"false"},{"extrahepatic":"false","largest_cm":"5","tumor_count":"1","vascular_invasion":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/cahp":{"get":{"description":"Sum Maupain 2016 Figure 2 CAHP nomogram integer points from age, arrest location, initial rhythm, no-flow, low-flow, epinephrine tertile, and arterial pH, and return Table 3 low/medium/high strata.\n\nWhen an agent needs the published CAHP nomogram total after OHCA and must not invent a withdrawal-of-care order, extra mortality labels, or an epinephrine scale other than Table 2 tertiles.\n\nNot a medical device and not a diagnosis or withdrawal-of-care order.\n\nmagent does not measure pH, collapse-to-BLS time, BLS-to-ROSC time, or epinephrine dose; those values and arrest location and initial rhythm are caller-assigned.\n\nTable 3 strata are low <150, medium 150-200, and high >200. The abstract also prints ≤150 / ≥200; 150 and 200 are medium.\n\nFigure 2B prints 88% poor outcome at total 177. This tool returns that printed percent only at 177 and does not invent other mortality labels.\n\nEpinephrine uses Table 2 tertiles (0 / 1-2 / ≥3 mg). Age, no-flow, low-flow, and pH follow the Figure 2 caption integers with linear nomogram ticks; values beyond age 10-100, no-flow 0-30 min, low-flow 0-60 min, and pH 6.5-7.5 use those truncated ends. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Figure 2 caption: 30 years → 22. Linear nomogram: round(1.1*(age-10)); truncated below 10 and above 100.","required":true,"schema":{"type":"integer"},"example":"30"},{"in":"query","name":"arrest_at_home","description":"Cardiac arrest at home versus public, as assigned by the caller. true scores 25 (Figure 2 caption); false (public) scores 0.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"shockable_rhythm","description":"Initial shockable rhythm (VF or pulseless VT) as assigned by the caller. true scores 0; false (non-shockable) scores 27 (Figure 2 caption).","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"no_flow_min","description":"Collapse-to-BLS (no-flow) minutes (integer 0-90). Figure 2 caption: 5 min → 14. Linear nomogram: round(2.8*minutes); truncated above 30.","required":true,"schema":{"type":"integer"},"example":"5"},{"in":"query","name":"low_flow_min","description":"BLS-to-ROSC (low-flow) minutes (integer 0-180). Figure 2 caption: 10 min → 8. Linear nomogram: round(0.8*minutes); truncated above 60.","required":true,"schema":{"type":"integer"},"example":"10"},{"in":"query","name":"epinephrine_mg","description":"Total pre-ROSC epinephrine in mg (integer 0-30). Table 2 tertiles on the nomogram: 0 → 0; 1-2 → 27; ≥3 → 43 (Figure 2 caption 3 mg → 43).","required":true,"schema":{"type":"integer"},"example":"3"},{"in":"query","name":"arterial_ph","description":"Admission arterial pH (6.5-7.8). Figure 2 caption: 7.10 → 38. Linear nomogram: round(585-77*pH); truncated to 6.5-7.5. magent does not measure pH.","required":true,"schema":{"type":"number"},"example":"7.10"}],"summary":"CAHP","operationId":"get_api_calc_cahp","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, cahp_risk, nomogram_poor_outcome_percent, age_years, arrest_at_home, shockable_rhythm, no_flow_min, low_flow_min, epinephrine_mg, arterial_ph, components, citation, disclaimer."},"400":{"description":"invalid_cahp: CAHP inputs must match Maupain 2016 age, arrest location, initial rhythm, no-flow and low-flow times, epinephrine dose, and arterial pH. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cahp"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CAHP (bulk)","operationId":"post_api_calc_cahp","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_cahp: CAHP inputs must match Maupain 2016 age, arrest location, initial rhythm, no-flow and low-flow times, epinephrine dose, and arterial pH. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cahp"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"30","arrest_at_home":"true","arterial_ph":"7.10","epinephrine_mg":"3","low_flow_min":"10","no_flow_min":"5","shockable_rhythm":"false"},{"age":"30","arrest_at_home":"true","arterial_ph":"7.10","epinephrine_mg":"3","low_flow_min":"10","no_flow_min":"5","shockable_rhythm":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mcmahon":{"get":{"description":"Sum McMahon 2013 Table 3 derivation points from age, sex, initial creatinine, calcium, CPK, etiology, phosphate, and bicarbonate and return the numeric total (max 19).\n\nWhen an agent needs the published McMahon rhabdomyolysis point total and must not invent a dialysis order, diagnosis, or named risk class.\n\nNot a medical device and not a diagnosis or dialysis order. magent does not assay labs.\n\nAdults with rhabdomyolysis as in McMahon 2013. Age is an integer 18-120. Labs and origin are caller-supplied.\n\nHalf-points follow Table 3 derivation. Theoretical max is 19 (sum of published maxima); the paper observed 0–17.5.\n\nDerivation stratified the composite of kidney failure or death at score <5 versus >10. magent returns the numeric total only and does not emit named risk classes. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120). McMahon 2013 Table 3: ≤50 → 0, >50 to ≤70 → 1.5, >70 to ≤80 → 2.5, >80 → 3. magent does not assign age.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"sex","description":"Caller-assigned sex. Female scores 1 (McMahon 2013 Table 3). magent does not assign sex.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"creatinine_mg_dl","description":"Initial serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l. McMahon 2013 Table 3: <1.4 → 0, 1.4 to 2.2 inclusive → 1.5, >2.2 → 3. magent does not assay creatinine.","required":false,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"creatinine_umol_l","description":"Initial serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42. magent does not assay creatinine.","required":false,"schema":{"type":"number"},"example":"88.4"},{"in":"query","name":"calcium_mg_dl","description":"Initial calcium in mg/dL (4-16). McMahon 2013 Table 3: <7.5 → 2. 7.5 is not <7.5. magent does not assay calcium.","required":true,"schema":{"type":"number"},"example":"9.0"},{"in":"query","name":"cpk_u_l","description":"Initial CPK in U/L (1-500000). McMahon 2013 Table 3: >40000 → 2. 40000 is not >40000. magent does not assay CPK.","required":true,"schema":{"type":"number"},"example":"2000"},{"in":"query","name":"low_risk_origin","description":"true when the cause is seizure, syncope, exercise, statin, or myositis (0 points). false otherwise (3 points; McMahon 2013 Table 3 origin not those causes). magent does not assign etiology.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"phosphate_mg_dl","description":"Initial phosphate in mg/dL (0.5-20). McMahon 2013 Table 3: <4.0 → 0, 4.0 to 5.4 inclusive → 1.5, >5.4 → 3. magent does not assay phosphate.","required":true,"schema":{"type":"number"},"example":"3.5"},{"in":"query","name":"bicarbonate_mmol_l","description":"Initial bicarbonate in mEq/L or mmol/L (2-45). McMahon 2013 Table 3: <19 → 2. 19 is not <19. magent does not assay bicarbonate.","required":true,"schema":{"type":"number"},"example":"24"}],"summary":"McMahon score","operationId":"get_api_calc_mcmahon","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, age, sex, creatinine_mg_dl, calcium_mg_dl, cpk_u_l, low_risk_origin, phosphate_mg_dl, bicarbonate_mmol_l, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_mcmahon_calcium: calcium_mg_dl must be a number from 4 to 16. Returned before settlement; you are not charged.; invalid_cpk: cpk_u_l must be a number from 1 to 500000 (McMahon 2013). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_phosphate: phosphate_mg_dl must be a number from 0.5 to 20 (McMahon 2013). Returned before settlement; you are not charged.; invalid_bicarbonate: bicarbonate_mmol_l must be a number from 2 to 45. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mcmahon"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"McMahon score (bulk)","operationId":"post_api_calc_mcmahon","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_mcmahon_calcium: calcium_mg_dl must be a number from 4 to 16. Returned before settlement; you are not charged.; invalid_cpk: cpk_u_l must be a number from 1 to 500000 (McMahon 2013). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_phosphate: phosphate_mg_dl must be a number from 0.5 to 20 (McMahon 2013). Returned before settlement; you are not charged.; invalid_bicarbonate: bicarbonate_mmol_l must be a number from 2 to 45. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mcmahon"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","bicarbonate_mmol_l":"24","calcium_mg_dl":"9.0","cpk_u_l":"2000","creatinine_mg_dl":"1.0","low_risk_origin":"true","phosphate_mg_dl":"3.5","sex":"male"},{"age":"40","bicarbonate_mmol_l":"24","calcium_mg_dl":"9.0","cpk_u_l":"2000","creatinine_mg_dl":"1.0","low_risk_origin":"true","phosphate_mg_dl":"3.5","sex":"male"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/vacs-1":{"get":{"description":"Sum the Tate 2013 VACS Index 1.0 points after one year of antiretroviral therapy from age, CD4, HIV-1 RNA, hemoglobin, caller-assigned FIB-4 and eGFR, and hepatitis C.\n\nWhen an agent already has those seven caller-assigned values and needs the published VACS 1.0 point total. magent does not assay labs, compute FIB-4 or eGFR, or order ART.\n\nNot a medical device and not a diagnosis of HIV, liver disease, kidney disease, or anemia. Not an antiretroviral, hepatitis C, or transfusion order.\n\nThis is Tate 2013 VACS Index 1.0 only. It is not VACS 2.0 and does not use albumin, WBC, or BMI.\n\nFIB-4 and eGFR are caller-assigned. magent does not recompute FIB-4 and does not compute MDRD or CKD-EPI. Race is not an input.\n\nTate 2013 does not name low, intermediate, or high mortality bands. The response is a point total (0–164), not a risk stratum or a patient-specific probability. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 18-120). Tate 2013 VACS Index: <50 scores 0; 50-64 scores 12; ≥65 scores 27.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"cd4_cells_mm3","description":"CD4 count in cells/mm³ (integer 1-2000). Tate 2013: ≥500 scores 0; 350-499 scores 6; 200-349 scores 6; 100-199 scores 10; 50-99 scores 28; <50 scores 29. magent does not assay CD4.","required":true,"schema":{"type":"integer"},"example":"600"},{"in":"query","name":"hiv_rna_copies_ml","description":"HIV-1 RNA in copies/mL (0-10000000). Tate 2013: <500 scores 0; 500-99999 scores 7; ≥100000 scores 14. magent does not assay viral load.","required":true,"schema":{"type":"number"},"example":"200"},{"in":"query","name":"hemoglobin_g_dl","description":"Hemoglobin in g/dL (3-22). Tate 2013: ≥14 scores 0; 12-13.9 scores 10; 10-11.9 scores 22; <10 scores 38. magent does not assay hemoglobin.","required":true,"schema":{"type":"number"},"example":"15"},{"in":"query","name":"fib4","description":"Caller-assigned FIB-4 (0.1-20). Tate 2013: <1.45 scores 0; 1.45-3.25 scores 6; >3.25 scores 25. magent does not recompute FIB-4.","required":true,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"egfr_ml_min_1_73m2","description":"Caller-assigned eGFR in mL/min/1.73m² (5-200). Tate 2013: ≥60 scores 0; 45-59.9 scores 6; 30-44.9 scores 8; <30 scores 26. magent does not compute MDRD or CKD-EPI.","required":true,"schema":{"type":"number"},"example":"90"},{"in":"query","name":"hepatitis_c","description":"Caller-assigned hepatitis C co-infection (Tate 2013). true scores 5. magent does not diagnose hepatitis C.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"VACS 1.0","operationId":"get_api_calc_vacs_1","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, age, cd4_cells_mm3, hiv_rna_copies_ml, hemoglobin_g_dl, fib4, egfr_ml_min_1_73m2, hepatitis_c, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_cd4: cd4_cells_mm3 must be an integer from 1 to 2000 (Tate 2013 VACS 1.0 CD4 count). Returned before settlement; you are not charged.; invalid_hiv_rna: hiv_rna_copies_ml must be a number from 0 to 10000000 (Tate 2013 VACS 1.0 HIV-1 RNA copies/mL). Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_fib4: fib4 must be a number from 0.1 to 20 (Tate 2013 VACS 1.0 caller-assigned FIB-4; magent does not recompute FIB-4). Returned before settlement; you are not charged.; invalid_egfr: egfr_ml_min_1_73m2 must be a number from 5 to 200 (caller-assigned eGFR; magent does not compute MDRD or CKD-EPI). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/vacs-1"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"VACS 1.0 (bulk)","operationId":"post_api_calc_vacs_1","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_cd4: cd4_cells_mm3 must be an integer from 1 to 2000 (Tate 2013 VACS 1.0 CD4 count). Returned before settlement; you are not charged.; invalid_hiv_rna: hiv_rna_copies_ml must be a number from 0 to 10000000 (Tate 2013 VACS 1.0 HIV-1 RNA copies/mL). Returned before settlement; you are not charged.; invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_fib4: fib4 must be a number from 0.1 to 20 (Tate 2013 VACS 1.0 caller-assigned FIB-4; magent does not recompute FIB-4). Returned before settlement; you are not charged.; invalid_egfr: egfr_ml_min_1_73m2 must be a number from 5 to 200 (caller-assigned eGFR; magent does not compute MDRD or CKD-EPI). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/vacs-1"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","cd4_cells_mm3":"600","egfr_ml_min_1_73m2":"90","fib4":"1.0","hemoglobin_g_dl":"15","hepatitis_c":"false","hiv_rna_copies_ml":"200"},{"age":"40","cd4_cells_mm3":"600","egfr_ml_min_1_73m2":"90","fib4":"1.0","hemoglobin_g_dl":"15","hepatitis_c":"false","hiv_rna_copies_ml":"200"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rule-of-nines":{"get":{"description":"Sum Wallace 1951 adult region percents from caller-assigned none/half/full fractions to a percent TBSA.\n\nWhen an agent needs adult Wallace rule-of-nines TBSA arithmetic and must not apply Lund-Browder pediatric percents or invent a Parkland fluid volume.\n\nNot a medical device. Deterministic Wallace 1951 adult percent arithmetic only.\n\nAdult chart only. Not Lund-Browder (pediatric) percentages.\n\nmagent does not examine the burn. Region fractions are caller-assigned (0 none, 0.5 half, 1 full).\n\nNot a Parkland fluid order. Parkland takes tbsa_percent separately. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"head","description":"Caller-assigned Wallace 1951 adult head involvement (0 none, 0.5 half, 1 full). Full involvement is 9%. magent does not examine the burn.","required":true,"schema":{"type":"number","enum":[0,0.5,1]},"example":"0"},{"in":"query","name":"arm_left","description":"Caller-assigned Wallace 1951 adult arm_left involvement (0 none, 0.5 half, 1 full). Full involvement is 9%. magent does not examine the burn.","required":true,"schema":{"type":"number","enum":[0,0.5,1]},"example":"0"},{"in":"query","name":"arm_right","description":"Caller-assigned Wallace 1951 adult arm_right involvement (0 none, 0.5 half, 1 full). Full involvement is 9%. magent does not examine the burn.","required":true,"schema":{"type":"number","enum":[0,0.5,1]},"example":"0"},{"in":"query","name":"anterior_trunk","description":"Caller-assigned Wallace 1951 adult anterior_trunk involvement (0 none, 0.5 half, 1 full). Full involvement is 18%. magent does not examine the burn.","required":true,"schema":{"type":"number","enum":[0,0.5,1]},"example":"1"},{"in":"query","name":"posterior_trunk","description":"Caller-assigned Wallace 1951 adult posterior_trunk involvement (0 none, 0.5 half, 1 full). Full involvement is 18%. magent does not examine the burn.","required":true,"schema":{"type":"number","enum":[0,0.5,1]},"example":"0"},{"in":"query","name":"leg_left","description":"Caller-assigned Wallace 1951 adult leg_left involvement (0 none, 0.5 half, 1 full). Full involvement is 18%. magent does not examine the burn.","required":true,"schema":{"type":"number","enum":[0,0.5,1]},"example":"0"},{"in":"query","name":"leg_right","description":"Caller-assigned Wallace 1951 adult leg_right involvement (0 none, 0.5 half, 1 full). Full involvement is 18%. magent does not examine the burn.","required":true,"schema":{"type":"number","enum":[0,0.5,1]},"example":"0"},{"in":"query","name":"perineum","description":"Caller-assigned Wallace 1951 adult perineum involvement (0 none, 0.5 half, 1 full). Full involvement is 1%. magent does not examine the burn.","required":true,"schema":{"type":"number","enum":[0,0.5,1]},"example":"0"}],"summary":"Rule of nines","operationId":"get_api_calc_rule_of_nines","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, head, arm_left, arm_right, anterior_trunk, posterior_trunk, leg_left, leg_right, perineum, tbsa_percent, citation, disclaimer."},"400":{"description":"invalid_region_fraction: each burn region must be 0, 0.5, or 1 (Wallace 1951 adult rule of nines). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rule-of-nines"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rule of nines (bulk)","operationId":"post_api_calc_rule_of_nines","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_region_fraction: each burn region must be 0, 0.5, or 1 (Wallace 1951 adult rule of nines). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rule-of-nines"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"anterior_trunk":"1","arm_left":"0","arm_right":"0","head":"0","leg_left":"0","leg_right":"0","perineum":"0","posterior_trunk":"0"},{"anterior_trunk":"1","arm_left":"0","arm_right":"0","head":"0","leg_left":"0","leg_right":"0","perineum":"0","posterior_trunk":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/jones":{"get":{"description":"Apply Gewitz 2015 Table 7 Jones criteria and return whether jones_arf holds from caller-assigned episode, population_risk, evidence of preceding GAS, and major/minor flags.\n\nWhen an agent already has episode (initial or recurrent), population_risk (low or moderate_high), evidence of preceding group A streptococcus, and the published major and minor manifestations as assigned by the caller, and needs whether the published Jones episode rule holds. magent does not examine the patient or read an echocardiogram.\n\nNot a medical device and not a diagnosis of acute rheumatic fever.\n\nGewitz 2015 Table 7 only. Not Jones 1944. Not the 1992 AHA revision as a separate tool.\n\nDoes not implement the possible ARF 12-month prophylaxis pathway.\n\nmagent does not examine the patient or read an echocardiogram. The caller assigns evidence of preceding GAS, carditis (clinical and/or subclinical), joint manifestations, and the other flags.\n\npopulation_risk is caller-assigned (low versus moderate_high). magent does not compute ARF incidence or RHD prevalence. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"episode","description":"ARF episode: initial or recurrent (Gewitz 2015 Table 7). Recurrent also allows 3 minor manifestations. magent does not date prior ARF.","required":true,"schema":{"type":"string","enum":["initial","recurrent"]},"example":"initial"},{"in":"query","name":"population_risk","description":"Caller-assigned population risk. low means ARF incidence ≤2 per 100000 school-aged children or all-age RHD prevalence ≤1 per 1000 as already assigned by the caller; moderate_high otherwise. magent does not compute incidence.","required":true,"schema":{"type":"string","enum":["low","moderate_high"]},"example":"low"},{"in":"query","name":"evidence_of_preceding_gas","description":"Evidence of preceding group A streptococcal infection as assigned by the caller (Gewitz 2015). true or false. magent does not interpret serology or culture.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"carditis","description":"Clinical and/or subclinical carditis as assigned by the caller (subclinical = echocardiographic valvulitis). Counts as one major. When true, prolonged_pr does not count as a minor. magent does not examine the patient or read an echocardiogram.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"polyarthritis","description":"Polyarthritis as assigned by the caller. Counts as the arthritis major in low-risk and in moderate_high-risk populations. Joints count in major or minor, not both. magent does not examine the joints.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"monoarthritis","description":"Monoarthritis as assigned by the caller. Counts as the arthritis major only when population_risk is moderate_high (and polyarthritis is false). Does not count in low-risk. magent does not examine the joints.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"polyarthralgia","description":"Polyarthralgia as assigned by the caller. Low-risk: a minor only if polyarthritis is false. Moderate_high: a major only if neither polyarthritis nor monoarthritis is true. Not a second joint major. magent does not examine the joints.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"monoarthralgia","description":"Monoarthralgia as assigned by the caller. Counts as a minor only when population_risk is moderate_high and no arthritis or polyarthralgia major is counted. Does not count in low-risk. magent does not examine the joints.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"chorea","description":"Sydenham chorea as assigned by the caller (Gewitz 2015 major). true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"erythema_marginatum","description":"Erythema marginatum as assigned by the caller (Gewitz 2015 major). true or false. magent does not examine the skin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"subcutaneous_nodules","description":"Subcutaneous nodules as assigned by the caller (Gewitz 2015 major). true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"fever_ge_38_5","description":"Fever ≥38.5 C as assigned by the caller. Counts as a minor only when population_risk is low. Ignored for counting when population_risk is moderate_high. magent does not measure temperature.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"fever_ge_38","description":"Fever ≥38.0 C as assigned by the caller. Counts as a minor only when population_risk is moderate_high. Ignored for counting when population_risk is low. magent does not measure temperature.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"esr_ge_60_or_crp_ge_3","description":"ESR ≥60 mm/h or CRP ≥3.0 mg/dL as assigned by the caller. Counts as the acute-phase minor only when population_risk is low. Ignored for counting when population_risk is moderate_high. magent does not interpret laboratory values.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"esr_ge_30_or_crp_ge_3","description":"ESR ≥30 mm/h or CRP ≥3.0 mg/dL as assigned by the caller. Counts as the acute-phase minor only when population_risk is moderate_high. Ignored for counting when population_risk is low. magent does not interpret laboratory values.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"prolonged_pr","description":"Prolonged PR interval as assigned by the caller. Counts as a minor only when carditis is false. magent does not interpret an electrocardiogram.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Jones","operationId":"get_api_calc_jones","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, episode, population_risk, major_count, minor_count, jones_arf, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_population_risk: population_risk must be low or moderate_high (Gewitz 2015 AHA Jones criteria). Returned before settlement; you are not charged.; invalid_arf_episode: episode must be initial or recurrent (Gewitz 2015 AHA Jones criteria). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/jones"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Jones (bulk)","operationId":"post_api_calc_jones","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_population_risk: population_risk must be low or moderate_high (Gewitz 2015 AHA Jones criteria). Returned before settlement; you are not charged.; invalid_arf_episode: episode must be initial or recurrent (Gewitz 2015 AHA Jones criteria). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/jones"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"carditis":"true","chorea":"false","episode":"initial","erythema_marginatum":"false","esr_ge_30_or_crp_ge_3":"false","esr_ge_60_or_crp_ge_3":"false","evidence_of_preceding_gas":"true","fever_ge_38":"false","fever_ge_38_5":"false","monoarthralgia":"false","monoarthritis":"false","polyarthralgia":"false","polyarthritis":"true","population_risk":"low","prolonged_pr":"false","subcutaneous_nodules":"false"},{"carditis":"true","chorea":"false","episode":"initial","erythema_marginatum":"false","esr_ge_30_or_crp_ge_3":"false","esr_ge_60_or_crp_ge_3":"false","evidence_of_preceding_gas":"true","fever_ge_38":"false","fever_ge_38_5":"false","monoarthralgia":"false","monoarthritis":"false","polyarthralgia":"false","polyarthritis":"true","population_risk":"low","prolonged_pr":"false","subcutaneous_nodules":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/fisher":{"get":{"description":"Return the Fisher 1980 original CT group 1-4 from a caller-assigned grade, with the published group description.\n\nWhen an agent needs the original Fisher 1980 CT groups 1-4 and must not invent modified Fisher 2006 grades or a linear vasospasm-risk percentage.\n\nNot a diagnosis and not a medical device. magent does not read the CT.\n\nThis is Fisher 1980 original groups 1-4 only. It does not implement modified Fisher (Frontera 2006).\n\nGroup 3 (thick SAH: localized clots and/or vertical layers ≥1 mm) was the high-vasospasm group in 1980. Group 4 is diffuse or no subarachnoid blood with ICH or IVH — not a worse grade than 3. magent does not invent a linear vasospasm risk from the integer. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"grade","description":"Fisher 1980 original CT group 1-4 as assigned by the caller from CT. magent does not read the CT.","required":true,"schema":{"type":"integer"},"example":"1"}],"summary":"Fisher","operationId":"get_api_calc_fisher","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, grade, score, max_score, description, components, citation, disclaimer."},"400":{"description":"invalid_fisher_grade: grade must be an integer from 1 to 4 (Fisher 1980 groups). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/fisher"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Fisher (bulk)","operationId":"post_api_calc_fisher","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_fisher_grade: grade must be an integer from 1 to 4 (Fisher 1980 groups). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/fisher"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"grade":"1"},{"grade":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/beam":{"get":{"description":"Compute BeAM as bedtime glucose minus pre-breakfast (AM) glucose in mg/dL and return the Zisman 2016 analysis category (<0, 0-50, or >50).\n\nWhen an agent needs the published BeAM difference and must not invent a 45 or 55 mg/dL cutoff, order prandial insulin, or diagnose diabetes.\n\nNot a medical device. magent does not diagnose diabetes or order prandial insulin.\n\nZisman 2016 analysis categories only: <0, 0-50, and >50 mg/dL. A 45–55 mg/dL range to consider additional intervention is not a hard cutoff in this tool.\n\nGlucose is caller-supplied. magent does not measure capillary or laboratory glucose. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"bedtime_glucose_mg_dl","description":"Bedtime glucose in mg/dL (40-600). Provide this or bedtime_glucose_mmol_l, not both. Independent of the AM unit.","required":false,"schema":{"type":"number"},"example":"180"},{"in":"query","name":"bedtime_glucose_mmol_l","description":"Bedtime glucose in mmol/L (2.2-33.3). Converted as mg/dL = mmol/L × 18 (same factor as HOMA-IR). Provide this or bedtime_glucose_mg_dl, not both.","required":false,"schema":{"type":"number"},"example":"10.0"},{"in":"query","name":"am_glucose_mg_dl","description":"Pre-breakfast (AM) glucose in mg/dL (40-600). Provide this or am_glucose_mmol_l, not both. Independent of the bedtime unit.","required":false,"schema":{"type":"number"},"example":"120"},{"in":"query","name":"am_glucose_mmol_l","description":"Pre-breakfast (AM) glucose in mmol/L (2.2-33.3). Converted as mg/dL = mmol/L × 18. Provide this or am_glucose_mg_dl, not both.","required":false,"schema":{"type":"number"},"example":"6.67"}],"summary":"BeAM","operationId":"get_api_calc_beam","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, bedtime_glucose_mg_dl, am_glucose_mg_dl, beam_mg_dl, beam_band, citation, disclaimer."},"400":{"description":"invalid_beam: BeAM needs bedtime and pre-breakfast glucose (each as mg/dL or mmol/L), as used in Zisman 2016. Returned before settlement; you are not charged.; invalid_bedtime_glucose: bedtime_glucose_mg_dl (40-600) or bedtime_glucose_mmol_l (2.2-33.3) is required. Returned before settlement; you are not charged.; invalid_am_glucose: am_glucose_mg_dl (40-600) or am_glucose_mmol_l (2.2-33.3) is required. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/beam"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"BeAM (bulk)","operationId":"post_api_calc_beam","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_beam: BeAM needs bedtime and pre-breakfast glucose (each as mg/dL or mmol/L), as used in Zisman 2016. Returned before settlement; you are not charged.; invalid_bedtime_glucose: bedtime_glucose_mg_dl (40-600) or bedtime_glucose_mmol_l (2.2-33.3) is required. Returned before settlement; you are not charged.; invalid_am_glucose: am_glucose_mg_dl (40-600) or am_glucose_mmol_l (2.2-33.3) is required. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/beam"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"am_glucose_mg_dl":"120","bedtime_glucose_mg_dl":"180"},{"am_glucose_mg_dl":"120","bedtime_glucose_mg_dl":"180"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/duke-treadmill":{"get":{"description":"Compute the Mark 1991 Duke treadmill score from Bruce-protocol exercise duration in minutes, maximal net ST-segment deviation in millimetres, and angina index (0 none, 1 nonlimiting, 2 exercise-limiting), with the paper’s illustrative three-group cutoffs.\n\nWhen an agent needs the published Mark 1991 Duke treadmill score and must not invent a catheterization order, diagnose coronary artery disease, prescribe a Bruce protocol, or read the ECG.\n\nNot a medical device. magent does not diagnose coronary artery disease.\n\nNot a catheterization order and not a Bruce-protocol prescription.\n\nmagent does not read the ECG. Maximal net ST-segment deviation is supplied by the caller in millimetres.\n\nBands are the Mark 1991 illustrative groups only: high if score < -10, moderate if -10 ≤ score ≤ 4, low if score ≥ 5. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"exercise_min","description":"Bruce-protocol exercise duration in minutes (number 0-21). Mark 1991. Not a Bruce-protocol prescription.","required":true,"schema":{"type":"number"},"example":"10"},{"in":"query","name":"st_deviation_mm","description":"Maximal net ST-segment deviation during or after exercise in millimetres (number 0-10). Mark 1991. magent does not read the ECG.","required":true,"schema":{"type":"number"},"example":"1"},{"in":"query","name":"angina_index","description":"Mark 1991 angina index: 0 no angina during exercise, 1 nonlimiting angina, 2 exercise-limiting angina. Integer 0, 1, or 2.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"}],"summary":"Duke treadmill score","operationId":"get_api_calc_duke_treadmill","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, exercise_min, st_deviation_mm, angina_index, duke_treadmill_score, duke_band, citation, disclaimer."},"400":{"description":"invalid_exercise_min: exercise_min must be a number from 0 to 21 (Mark 1991 Bruce protocol minutes). Returned before settlement; you are not charged.; invalid_st_deviation_mm: st_deviation_mm must be a number from 0 to 10 (Mark 1991 maximal ST deviation in millimetres). Returned before settlement; you are not charged.; invalid_angina_index: angina_index must be 0 (none), 1 (nonlimiting), or 2 (exercise-limiting) (Mark 1991). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/duke-treadmill"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Duke treadmill score (bulk)","operationId":"post_api_calc_duke_treadmill","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_exercise_min: exercise_min must be a number from 0 to 21 (Mark 1991 Bruce protocol minutes). Returned before settlement; you are not charged.; invalid_st_deviation_mm: st_deviation_mm must be a number from 0 to 10 (Mark 1991 maximal ST deviation in millimetres). Returned before settlement; you are not charged.; invalid_angina_index: angina_index must be 0 (none), 1 (nonlimiting), or 2 (exercise-limiting) (Mark 1991). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/duke-treadmill"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"angina_index":"0","exercise_min":"10","st_deviation_mm":"1"},{"angina_index":"0","exercise_min":"10","st_deviation_mm":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/wifi":{"get":{"description":"Apply Mills 2014 SVS WIfI grades and return the three independent grades (wound 0-3, ischemia 0-3, foot_infection 0-3) plus a wifi label like W0-I0-fI0.\n\nWhen an agent already has caller-assigned Mills 2014 wound, ischemia, and foot infection grades for a threatened lower extremity and needs the published WIfI label. magent does not inspect wounds or measure ABI, ankle pressure, or toe pressure.\n\nNot a medical device.\n\nNot an amputation or revascularization order. This tool does not report clinical stage 1-4 or Delphi amputation-risk or revascularization-benefit tables.\n\nmagent does not inspect wounds. Wound grade is caller-assigned.\n\nmagent does not measure ABI, ankle pressure, or toe pressure. Ischemia grade is caller-assigned; this tool does not compute ischemia from pressures.\n\nThe three grades are independent. This tool does not return a summed WIfI total. Not PEDIS. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"wound","description":"Wound grade 0-3 as assigned by the caller (Mills 2014): 0 no ulcer and no gangrene; 1 small, shallow ulcer(s) on the distal leg or foot without gangrene; 2 deeper ulcer with exposed bone, joint, or tendon, or gangrene limited to digits; 3 extensive deep ulcer involving forefoot and/or midfoot, full-thickness heel ulcer, or extensive gangrene. magent does not inspect wounds.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"ischemia","description":"Ischemia grade 0-3 as assigned by the caller (Mills 2014): 0 none; 1 mild; 2 moderate; 3 severe. magent does not measure ABI, ankle pressure, or toe pressure and does not compute this grade from pressures.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"foot_infection","description":"Foot infection grade 0-3 as assigned by the caller (Mills 2014): 0 no signs of infection; 1 infection involving only skin and subcutaneous tissue; 2 infection deeper than skin (abscess, osteomyelitis, septic arthritis, fasciitis) without SIRS; 3 infection with SIRS. magent does not diagnose infection.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"WIfI","operationId":"get_api_calc_wifi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, wound, ischemia, foot_infection, wifi, criteria, citation, disclaimer."},"400":{"description":"invalid_wifi: wound, ischemia, and foot_infection must be integers 0-3 (Mills 2014 SVS WIfI caller-assigned grades). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/wifi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"WIfI (bulk)","operationId":"post_api_calc_wifi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_wifi: wound, ischemia, and foot_infection must be integers 0-3 (Mills 2014 SVS WIfI caller-assigned grades). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/wifi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"foot_infection":"0","ischemia":"0","wound":"0"},{"foot_infection":"0","ischemia":"0","wound":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/pack-years":{"get":{"description":"Compute NCI pack-year smoking exposure as packs_per_day × years_smoked. Caller supplies packs per day or cigarettes per day (20 cigarettes = 1 pack) and years smoked.\n\nWhen an agent already has packs per day or cigarettes per day and years smoked and must not take a smoking history interview, invent a pack size other than 20 cigarettes, or treat the product as a lung-cancer screening order.\n\nNot a medical device. Not a lung-cancer screening order, COPD diagnosis, or sleep-apnea screen. magent does not take a smoking history interview.\n\nNCI pack year is packs per day times years smoked. Does not convert cigar, pipe, or other tobacco to pack-years.\n\nProvide packs_per_day (0-10, magent clamp) or cigarettes_per_day (0-200; 20 cigarettes = 1 pack), not both. years_smoked is 0-80 (magent clamp). NCI does not publish an input band.\n\nDoes not return years since quit or current-versus-former status. Caller supplies the two NCI factors. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"packs_per_day","description":"Cigarette packs smoked per day (0-10, magent clamp; NCI does not publish an input band). Provide this or cigarettes_per_day, not both. NCI: 1 pack/day for 1 year = 1 pack-year.","required":false,"schema":{"type":"number"},"example":"1"},{"in":"query","name":"cigarettes_per_day","description":"Cigarettes smoked per day (0-200, magent clamp). Converted as packs_per_day = cigarettes_per_day / 20. Provide this or packs_per_day, not both.","required":false,"schema":{"type":"number"},"example":"10"},{"in":"query","name":"years_smoked","description":"Years smoked (0-80, magent clamp; NCI does not publish an input band). NCI: 2 packs/day for 0.5 year = 1 pack-year. magent does not take a smoking history interview.","required":true,"schema":{"type":"number"},"example":"1"}],"summary":"Pack-years","operationId":"get_api_calc_pack_years","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, packs_per_day, years_smoked, pack_years, citation, disclaimer."},"400":{"description":"invalid_pack_years: Pack-years need packs_per_day (or cigarettes_per_day) and years_smoked as non-negative numbers. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pack-years"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Pack-years (bulk)","operationId":"post_api_calc_pack_years","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_pack_years: Pack-years need packs_per_day (or cigarettes_per_day) and years_smoked as non-negative numbers. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/pack-years"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"packs_per_day":"1","years_smoked":"1"},{"packs_per_day":"1","years_smoked":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/metroticket-2":{"get":{"description":"Apply Mazzaferro 2018 Metroticket 2.0 AFP-adjusted-to-HCC-size criteria and return whether a published 70% 5-year HCC-specific survival band holds (meets_70pct_hcc_specific_survival).\n\nWhen an agent already has tumor count, largest diameter in centimetres, and serum AFP in ng/mL as in Mazzaferro 2018, and needs the published 70% HCC-specific survival eligibility result. magent does not interpret imaging or assay AFP.\n\nNot a medical device.\n\nNot a transplant listing or organ-allocation order.\n\nmagent does not interpret imaging or assay AFP. tumor_count, largest_cm, and afp_ng_ml are caller-assigned.\n\nThis tool is Mazzaferro 2018 AFP-adjusted-to-HCC-size 70% 5-year HCC-specific survival criteria only. Not Milan criteria, not UCSF criteria, and not Metroticket 1.0 contours.\n\nNot the online competing-risk survival percentages at hcc-olt-metroticket.org. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"tumor_count","description":"Number of HCC nodules (integer 1-20) as assigned by the caller. Added to largest_cm as size_number_sum (up-to-7 convention). magent does not interpret imaging.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"largest_cm","description":"Largest tumor diameter in centimetres (0.1-30) as assigned by the caller. Added to tumor_count as size_number_sum. magent does not interpret imaging.","required":true,"schema":{"type":"number"},"example":"3"},{"in":"query","name":"afp_ng_ml","description":"Serum AFP in ng/mL (1-100000) as assigned by the caller. Mazzaferro 2018 bands: <200 (sum <=7), 200 to <400 (sum <=5), 400 to 1000 (sum <=4); >1000 never meets. magent does not assay AFP.","required":true,"schema":{"type":"number"},"example":"50"}],"summary":"Metroticket 2.0","operationId":"get_api_calc_metroticket_2","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, meets_70pct_hcc_specific_survival, size_number_sum, afp_ng_ml, tumor_count, largest_cm, criteria, citation, disclaimer."},"400":{"description":"invalid_tumor_count: tumor_count must be an integer from 1 to 20 (Mazzaferro 1996). Returned before settlement; you are not charged.; invalid_largest_cm: largest_cm must be a number from 0.1 to 30 (Mazzaferro 1996). Returned before settlement; you are not charged.; invalid_afp_ng_ml: afp_ng_ml must be a number from 1 to 100000 (Mazzaferro 2018 AFP ng/mL). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/metroticket-2"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Metroticket 2.0 (bulk)","operationId":"post_api_calc_metroticket_2","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_tumor_count: tumor_count must be an integer from 1 to 20 (Mazzaferro 1996). Returned before settlement; you are not charged.; invalid_largest_cm: largest_cm must be a number from 0.1 to 30 (Mazzaferro 1996). Returned before settlement; you are not charged.; invalid_afp_ng_ml: afp_ng_ml must be a number from 1 to 100000 (Mazzaferro 2018 AFP ng/mL). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/metroticket-2"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"afp_ng_ml":"50","largest_cm":"3","tumor_count":"1"},{"afp_ng_ml":"50","largest_cm":"3","tumor_count":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/apache-ii":{"get":{"description":"Compute the Knaus 1985 APACHE II integer from 12 Acute Physiology Score items, age points, and chronic-health points.\n\nWhen an agent needs the published Knaus 1985 integer classification and must not invent APACHE III/IV points or a hospital-death percentage.\n\nNot a medical device. magent does not measure vitals and does not examine the patient.\n\nEach APS item is the worst value in 24 hours as assigned by the caller. magent does not choose the worst from a time series.\n\nNot APACHE III or APACHE IV. Table 1 bands only.\n\nDoes not compute predicted death risk. The Knaus 1985 logistic equation needs diagnostic category weights that this tool does not accept.\n\nVenous HCO3 substitution from Table 1 is not accepted; arterial_ph is required.\n\nOxygenation uses A-aDO2 when fio2 ≥ 0.5 and PaO2 when fio2 < 0.5. The unused gas parameter is ignored. magent does not compute A-aDO2.\n\nchronic_health is the paper's severe organ insufficiency or immunocompromise as assigned by the caller. elective_postop must be false when chronic_health is false. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"temperature_c","description":"Rectal temperature in °C (20-46) as assigned by the caller (Knaus 1985 Table 1). ≥41 → 4; 39-40.9 → 3; 38.5-38.9 → 1; 36-38.4 → 0; 34-35.9 → 1; 32-33.9 → 2; 30-31.9 → 3; ≤29.9 → 4. magent does not measure temperature or convert Fahrenheit.","required":true,"schema":{"type":"number"},"example":"37.0"},{"in":"query","name":"map_mm_hg","description":"Mean arterial pressure in mm Hg (20-250). ≥160 → 4; 130-159 → 3; 110-129 → 2; 70-109 → 0; 50-69 → 2; ≤49 → 4. magent does not measure blood pressure.","required":true,"schema":{"type":"number"},"example":"90"},{"in":"query","name":"heart_rate","description":"Heart rate, ventricular response, integer 20-250. ≥180 → 4; 140-179 → 3; 110-139 → 2; 70-109 → 0; 55-69 → 2; 40-54 → 3; ≤39 → 4.","required":true,"schema":{"type":"integer"},"example":"80"},{"in":"query","name":"respiratory_rate","description":"Respiratory rate, non-ventilated or ventilated, integer 0-80. ≥50 → 4; 35-49 → 3; 25-34 → 1; 12-24 → 0; 10-11 → 1; 6-9 → 2; ≤5 → 4.","required":true,"schema":{"type":"integer"},"example":"16"},{"in":"query","name":"fio2","description":"Inspired oxygen as a fraction 0.21-1.00, not a percent. If fio2 ≥ 0.5, oxygenation uses aa_gradient. If fio2 < 0.5, oxygenation uses pao2_mm_hg. The unused gas parameter is ignored.","required":true,"schema":{"type":"number"},"example":"0.21"},{"in":"query","name":"aa_gradient","description":"A-aDO2 in mm Hg (0-800). Required when fio2 ≥ 0.5. ≥500 → 4; 350-499 → 3; 200-349 → 2; <200 → 0. Ignored when fio2 < 0.5. magent does not compute A-aDO2 from PaO2.","required":false,"schema":{"type":"number"},"example":"100"},{"in":"query","name":"pao2_mm_hg","description":"Arterial PaO2 in mm Hg (20-700). Required when fio2 < 0.5. >70 → 0; 61-70 → 1; 55-60 → 3; <55 → 4. Ignored when fio2 ≥ 0.5.","required":false,"schema":{"type":"number"},"example":"90"},{"in":"query","name":"arterial_ph","description":"Arterial pH (6.5-8.0). ≥7.70 → 4; 7.60-7.69 → 3; 7.50-7.59 → 1; 7.33-7.49 → 0; 7.25-7.32 → 2; 7.15-7.24 → 3; <7.15 → 4. Venous HCO3 substitution from Table 1 is not accepted.","required":true,"schema":{"type":"number"},"example":"7.40"},{"in":"query","name":"sodium_mmol_l","description":"Serum sodium in mmol/L (90-200). ≥180 → 4; 160-179 → 3; 155-159 → 2; 150-154 → 1; 130-149 → 0; 120-129 → 2; 111-119 → 3; ≤110 → 4.","required":true,"schema":{"type":"number"},"example":"140"},{"in":"query","name":"potassium_mmol_l","description":"Serum potassium in mmol/L (1-12). ≥7.0 → 4; 6.0-6.9 → 3; 5.5-5.9 → 1; 3.5-5.4 → 0; 3.0-3.4 → 1; 2.5-2.9 → 2; <2.5 → 4.","required":true,"schema":{"type":"number"},"example":"4.0"},{"in":"query","name":"creatinine_mg_dl","description":"Serum creatinine in mg/dL (0.1-20). ≥3.5 → 4; 2.0-3.4 → 3; 1.5-1.9 → 2; 0.6-1.4 → 0; <0.6 → 2. Double that row when acute_renal_failure is true.","required":true,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"hematocrit_percent","description":"Hematocrit percent (5-80). ≥60 → 4; 50-59.9 → 2; 46-49.9 → 1; 30-45.9 → 0; 20-29.9 → 2; <20 → 4.","required":true,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"wbc_k_ul","description":"White blood count in thousands per mm^3 (0.1-100). ≥40 → 4; 20-39.9 → 2; 15-19.9 → 1; 3-14.9 → 0; 1-2.9 → 2; <1 → 4.","required":true,"schema":{"type":"number"},"example":"8.0"},{"in":"query","name":"gcs","description":"Glasgow Coma Scale total as assigned by the caller (integer 3-15). APS GCS points = 15 minus gcs. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"15"},{"in":"query","name":"age","description":"Age in years, integer 16-120. ≤44 → 0; 45-54 → 2; 55-64 → 3; 65-74 → 5; ≥75 → 6.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"chronic_health","description":"true if the caller assigns severe organ insufficiency or immunocompromise as defined in Knaus 1985. false → 0 chronic-health points and elective_postop must be false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"elective_postop","description":"true only for elective postoperative patients with chronic_health true (+2). false with chronic_health true is nonoperative or emergency postoperative (+5). Must be false when chronic_health is false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"acute_renal_failure","description":"true doubles the creatinine Table 1 points (Knaus 1985). false leaves creatinine points unchanged. magent does not diagnose renal failure.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"APACHE II","operationId":"get_api_calc_apache_ii","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_apache_ii: apache_ii must be an integer from 0 to 71 (Heyland 2011 NUTRIC); APACHE II needs Knaus 1985 physiologic, age, and chronic-health integers in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/apache-ii"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"APACHE II (bulk)","operationId":"post_api_calc_apache_ii","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_apache_ii: apache_ii must be an integer from 0 to 71 (Heyland 2011 NUTRIC); APACHE II needs Knaus 1985 physiologic, age, and chronic-health integers in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/apache-ii"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"acute_renal_failure":"false","age":"40","arterial_ph":"7.40","chronic_health":"false","creatinine_mg_dl":"1.0","elective_postop":"false","fio2":"0.21","gcs":"15","heart_rate":"80","hematocrit_percent":"40","map_mm_hg":"90","pao2_mm_hg":"90","potassium_mmol_l":"4.0","respiratory_rate":"16","sodium_mmol_l":"140","temperature_c":"37.0","wbc_k_ul":"8.0"},{"acute_renal_failure":"false","age":"40","arterial_ph":"7.40","chronic_health":"false","creatinine_mg_dl":"1.0","elective_postop":"false","fio2":"0.21","gcs":"15","heart_rate":"80","hematocrit_percent":"40","map_mm_hg":"90","pao2_mm_hg":"90","potassium_mmol_l":"4.0","respiratory_rate":"16","sodium_mmol_l":"140","temperature_c":"37.0","wbc_k_ul":"8.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/myxedema-coma":{"get":{"description":"Sum Popoveniuc 2014 myxedema coma diagnostic points from caller-assigned thermoregulatory, CNS, GI, precipitating-event, cardiovascular, and metabolic bands and return ≥60 potentially diagnostic or 45–59 at risk.\n\nWhen an agent already has the published Popoveniuc 2014 bands assigned and needs the point total and those conclusion cuts. magent does not measure temperature, GCS, or labs and must not invent a myxedema-coma diagnosis or a thyroid-hormone order.\n\nNot a medical device.\n\nNot a thyroid hormone order.\n\nNot a myxedema-coma diagnosis. A score ≥60 is potentially diagnostic in Popoveniuc 2014; 45–59 could classify patients at risk. Scores <45 are below that at-risk range; that paper does not name a third band.\n\nmagent does not measure temperature, GCS, heart rate, blood pressure, or labs. The caller assigns each published band.\n\nCardiovascular extras (other EKG changes, effusion, pulmonary edema, cardiomegaly, hypotension) and metabolic flags are additive as in that table. Thermoregulatory, CNS, GI, and bradycardia are mutually exclusive bands. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"thermoregulatory","description":"Caller-assigned Popoveniuc 2014 thermoregulatory band. gt_35 (>35 °C) scores 0; 32_to_35 (32–35 °C) scores 10; lt_32 (<32 °C) scores 20. magent does not measure temperature.","required":true,"schema":{"type":"string","enum":["gt_35","32_to_35","lt_32"]},"example":"gt_35"},{"in":"query","name":"cns_effects","description":"Caller-assigned Popoveniuc 2014 central-nervous-system band. absent scores 0; somnolent_lethargic 10; obtunded 15; stupor 20; coma_seizures 30. magent does not compute GCS or examine the patient.","required":true,"schema":{"type":"string","enum":["absent","somnolent_lethargic","obtunded","stupor","coma_seizures"]},"example":"absent"},{"in":"query","name":"gastrointestinal","description":"Caller-assigned Popoveniuc 2014 gastrointestinal band. absent scores 0; anorexia_pain_constipation (anorexia, abdominal pain, or constipation) scores 5; decreased_motility 15; paralytic_ileus 20. magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["absent","anorexia_pain_constipation","decreased_motility","paralytic_ileus"]},"example":"absent"},{"in":"query","name":"precipitating_event","description":"Precipitating event as assigned by the caller (true or false). Popoveniuc 2014: true → 10. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bradycardia","description":"Caller-assigned Popoveniuc 2014 bradycardia band. absent scores 0; 50_to_59 (heart rate 50–59) scores 10; 40_to_49 scores 20; lt_40 (<40) scores 30. magent does not measure heart rate.","required":true,"schema":{"type":"string","enum":["absent","50_to_59","40_to_49","lt_40"]},"example":"absent"},{"in":"query","name":"other_ekg_changes","description":"Other electrocardiogram changes as assigned by the caller (true or false): QT prolongation, low voltage, bundle-branch block, nonspecific ST-T changes, or heart block (Popoveniuc 2014). true → 10. magent does not read an ECG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pericardial_pleural_effusion","description":"Pericardial or pleural effusion as assigned by the caller (true or false). Popoveniuc 2014: true → 10. magent does not interpret imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulmonary_edema","description":"Pulmonary edema as assigned by the caller (true or false). Popoveniuc 2014: true → 15. magent does not interpret imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cardiomegaly","description":"Cardiomegaly as assigned by the caller (true or false). Popoveniuc 2014: true → 15. magent does not interpret imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypotension","description":"Hypotension or shock as assigned by the caller (true or false). Popoveniuc 2014: true → 20. magent does not measure blood pressure.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hyponatremia","description":"Hyponatremia as assigned by the caller (true or false). Popoveniuc 2014: true → 10. magent does not measure sodium.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypoglycemia","description":"Hypoglycemia as assigned by the caller (true or false). Popoveniuc 2014: true → 10. magent does not measure glucose.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypoxemia","description":"Hypoxemia as assigned by the caller (true or false). Popoveniuc 2014: true → 10. magent does not measure oxygen.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypercarbia","description":"Hypercarbia as assigned by the caller (true or false). Popoveniuc 2014: true → 10. magent does not measure carbon dioxide.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"decreased_gfr","description":"Decrease in glomerular filtration rate as assigned by the caller (true or false). Popoveniuc 2014: true → 10. magent does not compute GFR.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Myxedema coma score","operationId":"get_api_calc_myxedema_coma","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, myxedema_coma_band, components, citation, disclaimer."},"400":{"description":"invalid_myxedema_coma: Myxedema coma score inputs must match Popoveniuc 2014 thermoregulatory, neurologic, cardiovascular, gastrointestinal, metabolic, and precipitant bands from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/myxedema-coma"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Myxedema coma score (bulk)","operationId":"post_api_calc_myxedema_coma","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_myxedema_coma: Myxedema coma score inputs must match Popoveniuc 2014 thermoregulatory, neurologic, cardiovascular, gastrointestinal, metabolic, and precipitant bands from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/myxedema-coma"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bradycardia":"absent","cardiomegaly":"false","cns_effects":"absent","decreased_gfr":"false","gastrointestinal":"absent","hypercarbia":"false","hypoglycemia":"false","hyponatremia":"false","hypotension":"false","hypoxemia":"false","other_ekg_changes":"false","pericardial_pleural_effusion":"false","precipitating_event":"false","pulmonary_edema":"false","thermoregulatory":"gt_35"},{"bradycardia":"absent","cardiomegaly":"false","cns_effects":"absent","decreased_gfr":"false","gastrointestinal":"absent","hypercarbia":"false","hypoglycemia":"false","hyponatremia":"false","hypotension":"false","hypoxemia":"false","other_ekg_changes":"false","pericardial_pleural_effusion":"false","precipitating_event":"false","pulmonary_edema":"false","thermoregulatory":"gt_35"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/timi-risk-index":{"get":{"description":"Compute the Morrow 2001 TIMI risk index HR × (age/10)^2 / SBP and the InTIME-II five-group cutpoints.\n\nWhen an agent needs the published STEMI triage index and must not invent a reperfusion or fibrinolytic decision.\n\nNot a reperfusion, fibrinolytic, or triage-center order. Groups are Morrow 2001 InTIME-II cutpoints, not a diagnosis.\n\nDerivation excluded HR <50 or >150 and SBP <60 or >200 mm Hg. magent still returns the arithmetic outside those windows.\n\nThis is the three-variable risk index (Lancet 2001), not the eight-item TIMI STEMI score. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120).","required":true,"schema":{"type":"integer"},"example":"65"},{"in":"query","name":"heart_rate_bpm","description":"Admission heart rate in beats per minute (integer 30-220). Morrow 2001 excluded HR <50 or >150 from derivation; magent still computes the index.","required":true,"schema":{"type":"integer"},"example":"80"},{"in":"query","name":"systolic_mm_hg","description":"Admission systolic blood pressure in mm Hg (50-250). Morrow 2001 excluded SBP <60 or >200 from derivation; magent still computes the index.","required":true,"schema":{"type":"number"},"example":"120"}],"summary":"TIMI risk index","operationId":"get_api_calc_timi_risk_index","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, heart_rate_bpm, systolic_mm_hg, timi_risk_index, risk_group, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/timi-risk-index"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"TIMI risk index (bulk)","operationId":"post_api_calc_timi_risk_index","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/timi-risk-index"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"65","heart_rate_bpm":"80","systolic_mm_hg":"120"},{"age":"65","heart_rate_bpm":"80","systolic_mm_hg":"120"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ukeld":{"get":{"description":"Compute the Barber 2011 United Kingdom end-stage liver disease (UKELD) integer from INR, creatinine, bilirubin, and sodium, with the UK elective-list 9% 1-year mortality threshold of 49.\n\nWhen an agent needs the published Barber 2011 UKELD integer and must not invent a UK listing or allocation order, apply MELD floors, or substitute MELD-Na.\n\nNot a medical device.\n\nNot a transplant listing or allocation order.\n\nBarber 2011 UKELD only. This is not MELD or MELD-Na.\n\nDoes not apply OPTN MELD lab floors or sodium clamps (125–137). Those bounds are not in Barber 2011.\n\nThe integer 49 cut is the UK elective-list 9% 1-year mortality threshold, not a transplant listing or allocation order. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"inr","description":"International normalized ratio (0.8-10). Barber 2011 does not floor INR at 1.","required":true,"schema":{"type":"number"},"example":"1.2"},{"in":"query","name":"creatinine_umol_l","description":"Serum creatinine in µmol/L (9-1768). Provide this or creatinine_mg_dl, not both. Barber 2011 uses µmol/L; no MELD floor.","required":false,"schema":{"type":"number"},"example":"90"},{"in":"query","name":"creatinine_mg_dl","description":"Serum creatinine in mg/dL (0.1-20). Converted as µmol/L = mg/dL × 88.42. Provide this or creatinine_umol_l, not both.","required":false,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"bilirubin_umol_l","description":"Total bilirubin in µmol/L (2-684). Provide this or bilirubin_mg_dl, not both. Barber 2011 uses µmol/L; no MELD floor.","required":false,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"bilirubin_mg_dl","description":"Total bilirubin in mg/dL (0.1-40). Converted as µmol/L = mg/dL × 17.1. Provide this or bilirubin_umol_l, not both.","required":false,"schema":{"type":"number"},"example":"2.3"},{"in":"query","name":"sodium_mmol_l","description":"Serum sodium in mmol/L (110-160). Barber 2011 does not clamp sodium to 125–137.","required":true,"schema":{"type":"number"},"example":"135"}],"summary":"UKELD","operationId":"get_api_calc_ukeld","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, inr, creatinine_umol_l, bilirubin_umol_l, sodium_mmol_l, ukeld, ukeld_band, citation, disclaimer."},"400":{"description":"invalid_inr: inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_bilirubin: bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.; invalid_sodium: sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ukeld"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"UKELD (bulk)","operationId":"post_api_calc_ukeld","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_inr: inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_bilirubin: bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.; invalid_sodium: sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ukeld"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bilirubin_umol_l":"40","creatinine_umol_l":"90","inr":"1.2","sodium_mmol_l":"135"},{"bilirubin_umol_l":"40","creatinine_umol_l":"90","inr":"1.2","sodium_mmol_l":"135"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/clif-c-aclf":{"get":{"description":"Compute the Jalan 2014 CLIF-C ACLF score from a caller-assigned CLIF-C OF (integer 6-18), age, and white-cell count in 10^9/L. magent does not score the six organs.\n\nWhen an agent needs published Jalan 2014 CLIF-C ACLF (CANONIC) arithmetic from a caller-assigned CLIF-C OF, age, and WBC and must not invent MELD, Child-Pugh, or organ-failure subscores.\n\nNot a medical device. Not a diagnosis and not a transplant listing protocol.\n\nCaller supplies clif_c_of (integer 6-18). magent does not compute CLIF-C OF from organs and does not score CLIF-SOFA.\n\nNot MELD, not MELD-Na, and not Child-Pugh. This is the Jalan 2014 CLIF-C ACLF equation only. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"clif_c_of","description":"Caller-assigned CLIF-C organ-failure score, integer 6-18 (Jalan 2014). magent does not score the six organs or compute CLIF-C OF.","required":true,"schema":{"type":"integer"},"example":"6"},{"in":"query","name":"age","description":"Age in years (18-120).","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"wbc_10e9_l","description":"White-cell count in 10^9/L (0.1-200). Natural log in the equation.","required":true,"schema":{"type":"number"},"example":"5"}],"summary":"CLIF-C ACLF","operationId":"get_api_calc_clif_c_aclf","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, clif_c_of, age_years, wbc_10e9_l, clif_c_aclf, citation, disclaimer."},"400":{"description":"invalid_clif_aclf: clif_c_of must be an integer 6-18 and wbc_10e9_l a number from 0.1 to 200 (Jalan 2014 CLIF-C ACLF; caller-assigned CLIF-C OF). Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/clif-c-aclf"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CLIF-C ACLF (bulk)","operationId":"post_api_calc_clif_c_aclf","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_clif_aclf: clif_c_of must be an integer 6-18 and wbc_10e9_l a number from 0.1 to 200 (Jalan 2014 CLIF-C ACLF; caller-assigned CLIF-C OF). Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/clif-c-aclf"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","clif_c_of":"6","wbc_10e9_l":"5"},{"age":"50","clif_c_of":"6","wbc_10e9_l":"5"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/homa-ir":{"get":{"description":"Compute the Matthews 1985 HOMA-IR approximation from fasting plasma glucose and insulin.\n\nWhen an agent needs the published Matthews 1985 HOMA-IR approximation and must not invent HOMA2, HOMA-B, or an insulin-resistance cutoff.\n\nNot a diagnosis of diabetes. Matthews 1985 HOMA approximation only; magent does not emit an insulin-resistance cutoff.\n\nDoes not compute HOMA-B (beta-cell function) and is not the HOMA2 computer model. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"glucose_mg_dl","description":"Fasting plasma glucose in mg/dL (50-1000). Converted as mmol/L = mg/dL / 18. Provide this or glucose_mmol_l, not both.","required":false,"schema":{"type":"number"},"example":"90"},{"in":"query","name":"glucose_mmol_l","description":"Fasting plasma glucose in mmol/L (2.8-55.5). Provide this or glucose_mg_dl, not both.","required":false,"schema":{"type":"number"},"example":"5.0"},{"in":"query","name":"insulin_uu_ml","description":"Fasting insulin in µU/mL (= mU/L) (0.1-500).","required":true,"schema":{"type":"number"},"example":"10"}],"summary":"HOMA-IR","operationId":"get_api_calc_homa_ir","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, glucose_mmol_l, insulin_uu_ml, homa_ir, citation, disclaimer."},"400":{"description":"invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_insulin: insulin_uu_ml must be a number from 0.1 to 500. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/homa-ir"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HOMA-IR (bulk)","operationId":"post_api_calc_homa_ir","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_glucose: glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.; invalid_insulin: insulin_uu_ml must be a number from 0.1 to 500. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/homa-ir"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"glucose_mg_dl":"90","insulin_uu_ml":"10"},{"glucose_mg_dl":"90","insulin_uu_ml":"10"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/shanghai":{"get":{"description":"Sum Antzelevitch 2016 Table 2 Shanghai Score System points from a caller-assigned ECG finding plus optional clinical, family, and pathogenic-mutation items, and return probable_definite, possible, or nondiagnostic.\n\nWhen an agent already has the Table 2 ECG pattern (and optional clinical, family, and genetic tokens) as assigned by the caller and needs the published Shanghai BrS point total. magent does not read tracings. Not a diagnosis or ICD indication. Not the ERS Table 5 score.\n\nNot a medical device and not a diagnosis or ICD indication.\n\nmagent does not read tracings. The caller assigns the ECG pattern, clinical item, family item, and pathogenic-mutation flag.\n\nTable 2 awards points once per category (highest item only) and requires at least one ECG finding. The ECG floor is 2, so nondiagnostic (<2) is published but not reachable from a valid ECG token.\n\nThis is the Antzelevitch 2016 Shanghai Score System for Brugada syndrome (Table 2) only. Not the ERS Table 5 Shanghai score, not Morita 2018, and not the Brugada 1991 wide-QRS algorithm. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ecg_pattern","description":"Highest Table 2 ECG finding as assigned by the caller (Antzelevitch 2016). spontaneous_type1 scores 3.5; fever_type1 scores 3; drug_converted_type2_3 scores 2. At least one ECG finding is required. Award once (highest item only). magent does not read tracings.","required":true,"schema":{"type":"string","enum":["spontaneous_type1","fever_type1","drug_converted_type2_3"]},"example":"spontaneous_type1"},{"in":"query","name":"clinical","description":"Highest Table 2 clinical-history item as assigned by the caller (Antzelevitch 2016). vf_arrest 3; nocturnal_agonal 2; arrhythmic_syncope 2; unclear_syncope 1; af_under_30 0.5; none 0. Optional; omitted defaults to none. Award once (highest item only). magent does not take a history.","required":false,"schema":{"type":"string","enum":["vf_arrest","nocturnal_agonal","arrhythmic_syncope","unclear_syncope","af_under_30","none"]},"example":"none"},{"in":"query","name":"family","description":"Highest Table 2 family-history item as assigned by the caller (Antzelevitch 2016). relative_definite_brs 2; suspicious_scd 1; unexplained_scd_under_45 0.5; none 0. Optional; omitted defaults to none. Award once (highest item only). magent does not take a pedigree.","required":false,"schema":{"type":"string","enum":["relative_definite_brs","suspicious_scd","unexplained_scd_under_45","none"]},"example":"none"},{"in":"query","name":"pathogenic_mutation","description":"Probable pathogenic mutation in a BrS susceptibility gene (Antzelevitch 2016 Table 2 IV). true scores 0.5; false scores 0. magent does not interpret sequencing.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Shanghai Score System","operationId":"get_api_calc_shanghai","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, shanghai_band, ecg_pattern, clinical, family, pathogenic_mutation, components, citation, disclaimer."},"400":{"description":"invalid_shanghai_ecg: ecg_pattern must be spontaneous_type1, fever_type1, or drug_converted_type2_3 (Antzelevitch 2016 Shanghai BrS Table 2; at least one ECG finding is required). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/shanghai"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Shanghai Score System (bulk)","operationId":"post_api_calc_shanghai","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_shanghai_ecg: ecg_pattern must be spontaneous_type1, fever_type1, or drug_converted_type2_3 (Antzelevitch 2016 Shanghai BrS Table 2; at least one ECG finding is required). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/shanghai"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"clinical":"none","ecg_pattern":"spontaneous_type1","family":"none","pathogenic_mutation":"false"},{"clinical":"none","ecg_pattern":"spontaneous_type1","family":"none","pathogenic_mutation":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/gcs-pupils":{"get":{"description":"Return the Brennan 2018 GCS-Pupils index as caller-assigned total GCS 3-15 minus pupil reactivity score (unreactive pupils 0, 1, or 2).\n\nWhen an agent already has a 1976-style total GCS 3-15 and a pupil reactivity score (0-2) and needs the published GCS-P index, not eye/verbal/motor components and not Part 2 outcome charts.\n\nNot a medical device and not a diagnosis of TBI severity as a device output.\n\nmagent does not examine pupils or assign GCS. It uses caller-assigned total GCS 3-15 (1976-style total) minus PRS.\n\nDoes not compute eye, verbal, or motor components (use /api/calc/gcs).\n\nDoes not implement Brennan 2018 Part 2 probability charts. Returns the GCS-P index only. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"gcs","description":"Caller-assigned total GCS as an integer 3-15 (1976-style total). magent does not assign GCS and does not take eye, verbal, or motor here (use /api/calc/gcs).","required":true,"schema":{"type":"integer"},"example":"15"},{"in":"query","name":"unreactive_pupils","description":"Pupil reactivity score (PRS): integer 0, 1, or 2. 0 both pupils reactive, 1 one unreactive, 2 both unreactive. magent does not examine pupils.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"GCS-Pupils","operationId":"get_api_calc_gcs_pupils","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, gcs, pupil_reactivity_score, gcs_p, citation, disclaimer."},"400":{"description":"invalid_gcs_total: gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.; invalid_unreactive_pupils: unreactive_pupils must be an integer 0, 1, or 2 (Brennan 2018 pupil reactivity score). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gcs-pupils"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"GCS-Pupils (bulk)","operationId":"post_api_calc_gcs_pupils","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_gcs_total: gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.; invalid_unreactive_pupils: unreactive_pupils must be an integer 0, 1, or 2 (Brennan 2018 pupil reactivity score). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gcs-pupils"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"gcs":"15","unreactive_pupils":"0"},{"gcs":"15","unreactive_pupils":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-child-cvs":{"get":{"description":"Apply the Hyams 2016 Rome IV H1a child/adolescent cyclic vomiting syndrome diagnostic criteria and return whether the published child CVS box holds (rome_iv_child_cvs).\n\nWhen an agent already has the four caller-assigned Hyams 2016 Rome IV H1a child/adolescent cyclic vomiting flags and needs whether the published child CVS box holds. magent does not examine the child.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose cyclic vomiting syndrome.\n\nThe caller assigns the four flags. magent does not examine the child.\n\nThis tool is Hyams 2016 Rome IV H1a child/adolescent cyclic vomiting syndrome only. Not neonate/toddler G3. Not adult Rome IV CVS (Stanghellini 2016 B3b). Not cannabinoid hyperemesis. History of migraine is not a required H1a flag and is not parsed. If abdominal pain predominates, consider abdominal migraine; that note is not a parsed flag. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"two_or_more_periods_intense_nausea_paroxysmal_vomiting_hours_to_days_within_6_months","description":"Two or more periods of intense, unremitting nausea and paroxysmal vomiting lasting hours to days within a 6-month period, as assigned (Hyams 2016 Rome IV H1a). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"episodes_stereotypical","description":"Episodes are stereotypical in each patient, as assigned (Hyams 2016 Rome IV H1a). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"episodes_separated_weeks_to_months_with_return_to_baseline","description":"Episodes are separated by weeks to months with return to baseline health between episodes, as assigned (Hyams 2016 Rome IV H1a). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"not_attributed_to_another_condition","description":"After appropriate medical evaluation, the symptoms cannot be attributed to another condition, as assigned (Hyams 2016 Rome IV H1a). true or false as assigned by the caller. magent does not examine the child.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV Child CVS","operationId":"get_api_calc_rome_iv_child_cvs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, rome_iv_child_cvs, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_child_cvs: Rome IV child cyclic vomiting needs the Hyams 2016 child/adolescent H1a flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-child-cvs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV Child CVS (bulk)","operationId":"post_api_calc_rome_iv_child_cvs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_child_cvs: Rome IV child cyclic vomiting needs the Hyams 2016 child/adolescent H1a flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-child-cvs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"episodes_separated_weeks_to_months_with_return_to_baseline":"true","episodes_stereotypical":"true","not_attributed_to_another_condition":"true","two_or_more_periods_intense_nausea_paroxysmal_vomiting_hours_to_days_within_6_months":"true"},{"episodes_separated_weeks_to_months_with_return_to_baseline":"true","episodes_stereotypical":"true","not_attributed_to_another_condition":"true","two_or_more_periods_intense_nausea_paroxysmal_vomiting_hours_to_days_within_6_months":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/psc-revised":{"get":{"description":"Compute the Kim 2000 revised natural history model R for primary sclerosing cholangitis from age, bilirubin, AST, albumin, and variceal bleeding (no histologic stage).\n\nWhen an agent needs the published Kim 2000 revised PSC R and must not apply the original Mayo PSC biopsy model, invent survival percents or risk bands, assay labs, diagnose PSC, or treat the result as a transplant listing or biopsy order.\n\nNot a medical device. magent does not assay labs or diagnose PSC.\n\nNot a transplant listing or biopsy order.\n\nKim 2000 revised model only (age, bilirubin, AST, albumin, variceal bleeding). This is not the original Mayo PSC model that used histologic stage.\n\nReturns R only. Does not look up Kim 2000 survival-table percents for the computed R and does not invent website risk bands such as low / intermediate / high. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_years","description":"Age in whole years (18-120, magent clamp). Kim 2000 uses age in years in the R equation.","required":true,"schema":{"type":"integer"},"example":"55"},{"in":"query","name":"bilirubin_mg_dl","description":"Total bilirubin in mg/dL (0.1-40, magent clamp). Must be positive; natural log is undefined at 0. Kim 2000 uses mg/dL. magent does not assay bilirubin.","required":true,"schema":{"type":"number"},"example":"5"},{"in":"query","name":"ast_u_l","description":"Aspartate aminotransferase in U/L (1-10000, magent clamp). Must be positive. magent does not assay AST.","required":true,"schema":{"type":"number"},"example":"120"},{"in":"query","name":"albumin_g_dl","description":"Serum albumin in g/dL (1.0-6.0, magent clamp). Must be positive. Kim 2000 uses g/dL. magent does not assay albumin.","required":true,"schema":{"type":"number"},"example":"3.0"},{"in":"query","name":"variceal_bleeding","description":"History of variceal bleeding as assigned by the caller (Kim 2000): true (1) or false (0). magent does not diagnose bleeding.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Revised PSC model","operationId":"get_api_calc_psc_revised","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, bilirubin_mg_dl, ast_u_l, albumin_g_dl, variceal_bleeding, r, citation, disclaimer."},"400":{"description":"invalid_psc_revised: Revised PSC model inputs must be numeric age, bilirubin, AST, and albumin plus variceal-bleeding as used in Kim 2000. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/psc-revised"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Revised PSC model (bulk)","operationId":"post_api_calc_psc_revised","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_psc_revised: Revised PSC model inputs must be numeric age, bilirubin, AST, and albumin plus variceal-bleeding as used in Kim 2000. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/psc-revised"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_years":"55","albumin_g_dl":"3.0","ast_u_l":"120","bilirubin_mg_dl":"5","variceal_bleeding":"true"},{"age_years":"55","albumin_g_dl":"3.0","ast_u_l":"120","bilirubin_mg_dl":"5","variceal_bleeding":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/bam":{"get":{"description":"Score the three Cacciola 2013 / VA public-domain BAM subscales (Use, Risk, Protective) from caller-assigned Table 1 prior-30-day items. No single total BAM score.\n\nWhen an agent already has Cacciola 2013 Table 1 BAM item values and needs the published Use, Risk, and Protective sums. magent does not interview the patient, invent a total BAM score, or issue a level-of-care order.\n\nNot a medical device and not a diagnosis of a substance use disorder.\n\nNot a level-of-care order. magent does not interview the patient. Each item is caller-assigned from Cacciola 2013 Table 1.\n\nCacciola 2013 and the VA public-domain instrument do not produce a psychometrically refined total BAM score. This tool returns Use, Risk, and Protective only and does not invent named low/high clinical bands.\n\nTable 1 Likert items (physical health, craving, abstinence confidence, religion/spirituality, family arguments, recovery satisfaction) stay on Table 1's 0-4 scale. This tool does not apply the later VA BAM-R 0/8/15/22/30 recode, so Risk is 0-102 and Protective is 0-98 rather than 0-180.\n\nItems 7a-g and 17 are collected and are not included in the three subscale sums. Table 1 notes a 6-category drug checklist without naming the categories; 7a-g follow the VA public-domain slots. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"physical_health","description":"Caller-assigned Cacciola 2013 Table 1 item 1 physical-health rating (integer 0-4; 0 excellent, 4 poor). Healthiest published anchor is 0. Kept on Table 1's 0-4 scale (not a 0/8/15/22/30 recode). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"days_sleep","description":"Caller-assigned Cacciola 2013 Table 1 item 2 days of trouble sleeping in the prior 30 days (integer 0-30). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"days_psychological","description":"Caller-assigned Cacciola 2013 Table 1 item 3 days of psychological problems in the prior 30 days (integer 0-30). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"days_alcohol","description":"Caller-assigned Cacciola 2013 Table 1 item 4 days of alcohol use in the prior 30 days (integer 0-30). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"days_heavy_alcohol","description":"Caller-assigned Cacciola 2013 Table 1 item 5 days of heavy alcohol use in the prior 30 days (integer 0-30). Contingent on item 4 in that paper; this tool accepts 0-30 independently. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"days_drug","description":"Caller-assigned Cacciola 2013 Table 1 item 6 days of drug use in the prior 30 days (integer 0-30). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"drug_marijuana","description":"Caller-assigned Cacciola 2013 item 7 checklist slot 7a (marijuana). Collected and not summed. Table 1 names a 6-category checklist without listing categories; 7a-g follow the VA public-domain slots. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"drug_sedatives","description":"Caller-assigned Cacciola 2013 item 7 checklist slot 7b (sedatives/tranquilizers). Collected and not summed. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"drug_cocaine","description":"Caller-assigned Cacciola 2013 item 7 checklist slot 7c (cocaine/crack). Collected and not summed. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"drug_stimulants","description":"Caller-assigned Cacciola 2013 item 7 checklist slot 7d (other stimulants). Collected and not summed. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"drug_opiates","description":"Caller-assigned Cacciola 2013 item 7 checklist slot 7e (opiates). Collected and not summed. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"drug_inhalants","description":"Caller-assigned Cacciola 2013 item 7 checklist slot 7f (inhalants). Collected and not summed. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"drug_other","description":"Caller-assigned Cacciola 2013 item 7 checklist slot 7g (other drugs). Collected and not summed. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"craving","description":"Caller-assigned Cacciola 2013 Table 1 item 8 craving rating (integer 0-4; 0 not at all, 4 extremely). Kept on Table 1's 0-4 scale. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"abstinence_confidence","description":"Caller-assigned Cacciola 2013 Table 1 item 9 abstinence-confidence rating (integer 0-4; 0 not at all, 4 extremely). Kept on Table 1's 0-4 scale. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"days_self_help","description":"Caller-assigned Cacciola 2013 Table 1 item 10 days of self-help group attendance in the prior 30 days (integer 0-30). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"days_risky","description":"Caller-assigned Cacciola 2013 Table 1 item 11 days in risky situations in the prior 30 days (integer 0-30). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"religion_support","description":"Caller-assigned Cacciola 2013 Table 1 item 12 religion/spirituality support rating (integer 0-4; 0 not at all, 4 extremely). Kept on Table 1's 0-4 scale. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"days_structured","description":"Caller-assigned Cacciola 2013 Table 1 item 13 days of structured activities in the prior 30 days (integer 0-30). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"adequate_income","description":"Caller-assigned Cacciola 2013 Table 1 item 14 adequate income (true or false). No scores 0; Yes scores 30 (VA public-domain BAM-R item-14 map). magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"family_arguments","description":"Caller-assigned Cacciola 2013 Table 1 item 15 arguments with family/friends rating (integer 0-4; 0 not at all, 4 extremely). Kept on Table 1's 0-4 scale. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"days_supportive","description":"Caller-assigned Cacciola 2013 Table 1 item 16 days with supportive family/friends in the prior 30 days (integer 0-30). magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"recovery_satisfaction","description":"Caller-assigned Cacciola 2013 Table 1 item 17 recovery-satisfaction rating (integer 0-4; 0 not at all, 4 extremely). Collected and not summed. magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"BAM","operationId":"get_api_calc_bam","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, use, use_max, risk, risk_max, protective, protective_max, components, citation, disclaimer."},"400":{"description":"invalid_bam: BAM inputs must match Cacciola 2013 Brief Addiction Monitor item ranges from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bam"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"BAM (bulk)","operationId":"post_api_calc_bam","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_bam: BAM inputs must match Cacciola 2013 Brief Addiction Monitor item ranges from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bam"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"abstinence_confidence":"0","adequate_income":"false","craving":"0","days_alcohol":"0","days_drug":"0","days_heavy_alcohol":"0","days_psychological":"0","days_risky":"0","days_self_help":"0","days_sleep":"0","days_structured":"0","days_supportive":"0","drug_cocaine":"false","drug_inhalants":"false","drug_marijuana":"false","drug_opiates":"false","drug_other":"false","drug_sedatives":"false","drug_stimulants":"false","family_arguments":"0","physical_health":"0","recovery_satisfaction":"0","religion_support":"0"},{"abstinence_confidence":"0","adequate_income":"false","craving":"0","days_alcohol":"0","days_drug":"0","days_heavy_alcohol":"0","days_psychological":"0","days_risky":"0","days_self_help":"0","days_sleep":"0","days_structured":"0","days_supportive":"0","drug_cocaine":"false","drug_inhalants":"false","drug_marijuana":"false","drug_opiates":"false","drug_other":"false","drug_sedatives":"false","drug_stimulants":"false","family_arguments":"0","physical_health":"0","recovery_satisfaction":"0","religion_support":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/grogan":{"get":{"description":"Apply the Grogan 2016 two-biomarker staging system for wild-type transthyretin (ATTRwt) cardiac amyloidosis from NT-proBNP and cardiac troponin T.\n\nWhen an agent has caller-supplied NT-proBNP (ng/L) and cardiac troponin T (ng/mL) and needs the published Grogan 2016 ATTRwt stage. Not Gillmore 2018 NAC ATTR staging. Not Mayo AL amyloid staging. Not NYHA. magent does not assay the biomarkers and does not invent a troponin I cutoff.\n\nNot a medical device. magent does not examine the patient and does not assay NT-proBNP or troponin T.\n\nThis is Grogan 2016 wild-type ATTR (ATTRwt) staging only. It is not Gillmore 2018 NAC ATTR staging (no eGFR). It is not Mayo AL amyloid staging. It is not NYHA class.\n\nTroponin T only (cTnT > 0.05 ng/mL, same as 0.05 μg/L). magent does not invent a troponin I cutoff.\n\n4-year OS figures (stage I 57%, II 42%, III 18%) and stage III median survival 20 months are published Grogan 2016 cohort labels, not a patient-specific prediction.\n\nNot a treatment order. This tool does not recommend tafamidis or any other therapy. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"nt_probnp_ng_l","description":"NT-proBNP in ng/L (10-100000), same numeric value as pg/mL. Grogan 2016 scores 1 point when > 3000; equal to 3000 does not score. magent does not assay NT-proBNP.","required":true,"schema":{"type":"number"},"example":"1500"},{"in":"query","name":"troponin_t_ng_ml","description":"Cardiac troponin T (cTnT) in ng/mL (0.001-50), same numeric value as 0.05 μg/L. Grogan 2016 scores 1 point when > 0.05; equal to 0.05 does not score. Troponin T only; magent does not invent a troponin I cutoff and does not assay troponin.","required":true,"schema":{"type":"number"},"example":"0.02"}],"summary":"Grogan","operationId":"get_api_calc_grogan","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, nt_probnp_ng_l, troponin_t_ng_ml, score, max_score, grogan_stage, published_os_4_year_percent, components, citation, disclaimer."},"400":{"description":"invalid_nt_probnp: nt_probnp_ng_l must be a number from 10 to 100000 (NT-proBNP ng/L = pg/mL; Gillmore 2018 NAC ATTR stage). Returned before settlement; you are not charged.; invalid_troponin_t: troponin_t_ng_ml must be a number from 0.001 to 50 (cTnT ng/mL). Returned before settlement; you are not charged.; invalid_grogan: Grogan ATTR-CM staging needs nt_probnp_ng_l and troponin_t_ng_ml (Grogan 2016). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/grogan"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Grogan (bulk)","operationId":"post_api_calc_grogan","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_nt_probnp: nt_probnp_ng_l must be a number from 10 to 100000 (NT-proBNP ng/L = pg/mL; Gillmore 2018 NAC ATTR stage). Returned before settlement; you are not charged.; invalid_troponin_t: troponin_t_ng_ml must be a number from 0.001 to 50 (cTnT ng/mL). Returned before settlement; you are not charged.; invalid_grogan: Grogan ATTR-CM staging needs nt_probnp_ng_l and troponin_t_ng_ml (Grogan 2016). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/grogan"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"nt_probnp_ng_l":"1500","troponin_t_ng_ml":"0.02"},{"nt_probnp_ng_l":"1500","troponin_t_ng_ml":"0.02"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/score2-diabetes":{"get":{"description":"Compute the ESC 2023 SCORE2-Diabetes 10-year fatal plus non-fatal CVD percent for adults aged 40-79 with type 2 diabetes from sex, current smoking, systolic blood pressure, total and HDL cholesterol, age at diabetes diagnosis, IFCC HbA1c, eGFR, and European geographic risk region.\n\nWhen an agent already has those SCORE2-Diabetes 2023 predictors for a person aged 40-79 with type 2 diabetes and no prior CVD and needs that paper's region-calibrated 10-year CVD percent. Not a diagnosis, statin order, SCORE2, or SCORE2-OP.\n\nNot a medical device. Not a diagnosis of cardiovascular disease. Not a statin order or treatment recommendation.\n\nSCORE2-Diabetes 2023 for type 2 diabetes, ages 40-79 only. Not SCORE2 (no diabetes-specific labs). Not SCORE2-OP. Not intended for people without diabetes or with prior CVD.\n\neuropean_risk_region is the paper's geographic calibration (low, moderate, high, very_high), not race or ethnicity.\n\nHbA1c is IFCC mmol/mol, not % DCCT. Caller assigns age, sex, smoking, blood pressure, lipids, diagnosis age, HbA1c, eGFR, and European risk region. magent does not assay lipids, HbA1c, or eGFR and does not measure blood pressure. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (integer 40-79). SCORE2-Diabetes 2023 is for ages 40-79. Not SCORE2 (40-69 without diabetes labs). Not SCORE2-OP.","required":true,"schema":{"type":"integer"},"example":60},{"in":"query","name":"sex","description":"Sex used by the sex-specific SCORE2-Diabetes 2023 coefficients (female or male).","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"smoker","description":"Current cigarette smoking as assigned by the caller (true or false). magent does not take a smoking history.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"sbp_mm_hg","description":"Systolic blood pressure in mm Hg (50-250). Enters as (SBP-120)/20. magent does not measure blood pressure.","required":true,"schema":{"type":"number"},"example":140},{"in":"query","name":"total_cholesterol_mmol_l","description":"Total cholesterol in mmol/L (1.5-15). Enters as (TC-6). magent does not assay lipids.","required":true,"schema":{"type":"number"},"example":5.5},{"in":"query","name":"hdl_mmol_l","description":"HDL cholesterol in mmol/L (0.4-4). Enters as (HDL-1.3)/0.5. magent does not assay lipids.","required":true,"schema":{"type":"number"},"example":1.3},{"in":"query","name":"age_at_diabetes_diagnosis","description":"Age at type 2 diabetes diagnosis in years (integer 1-79, not after current age). Enters as (age_at_dx-50)/5. Patient is assumed to have type 2 diabetes.","required":true,"schema":{"type":"integer"},"example":60},{"in":"query","name":"hba1c_mmol_mol","description":"HbA1c in IFCC mmol/mol (20-195), not % DCCT. Enters as (HbA1c-31)/9.34. magent does not assay HbA1c.","required":true,"schema":{"type":"number"},"example":50},{"in":"query","name":"egfr_ml_min_1_73m2","description":"Caller-assigned eGFR in mL/min/1.73 m² (5-200). Enters as (ln(eGFR)-4.5)/0.15 plus the squared term. magent does not compute CKD-EPI.","required":true,"schema":{"type":"number"},"example":90},{"in":"query","name":"european_risk_region","description":"Geographic SCORE2/SCORE2-OP calibration region (low, moderate, high, or very_high) as printed for SCORE2-Diabetes. Not race. Not ethnicity.","required":true,"schema":{"type":"string","enum":["low","moderate","high","very_high"]},"example":"moderate"}],"summary":"SCORE2-Diabetes 10-year CVD risk","operationId":"get_api_calc_score2_diabetes","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age, sex, smoker, sbp_mm_hg, total_cholesterol_mmol_l, hdl_mmol_l, age_at_diabetes_diagnosis, hba1c_mmol_mol, egfr_ml_min_1_73m2, european_risk_region, linear_predictor, risk_10y_percent, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_score2_region: european_risk_region must be low, moderate, high, or very_high as printed in SCORE2 2021 (geographic calibration, not race). Returned before settlement; you are not charged.; invalid_hba1c_mmol_mol: hba1c_mmol_mol must be a number in the range used by SCORE2-Diabetes 2023 (IFCC mmol/mol, not % DCCT). Returned before settlement; you are not charged.; invalid_egfr: egfr_ml_min_1_73m2 must be a number from 5 to 200 (caller-assigned eGFR; magent does not compute MDRD or CKD-EPI). Returned before settlement; you are not charged.; invalid_score2_diabetes: SCORE2-Diabetes 2023 inputs must match that paper's age, sex, smoking, systolic BP, total and HDL cholesterol, age at diabetes diagnosis, HbA1c, eGFR, and European risk region. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/score2-diabetes"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SCORE2-Diabetes 10-year CVD risk (bulk)","operationId":"post_api_calc_score2_diabetes","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_score2_region: european_risk_region must be low, moderate, high, or very_high as printed in SCORE2 2021 (geographic calibration, not race). Returned before settlement; you are not charged.; invalid_hba1c_mmol_mol: hba1c_mmol_mol must be a number in the range used by SCORE2-Diabetes 2023 (IFCC mmol/mol, not % DCCT). Returned before settlement; you are not charged.; invalid_egfr: egfr_ml_min_1_73m2 must be a number from 5 to 200 (caller-assigned eGFR; magent does not compute MDRD or CKD-EPI). Returned before settlement; you are not charged.; invalid_score2_diabetes: SCORE2-Diabetes 2023 inputs must match that paper's age, sex, smoking, systolic BP, total and HDL cholesterol, age at diabetes diagnosis, HbA1c, eGFR, and European risk region. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/score2-diabetes"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"60","age_at_diabetes_diagnosis":"60","egfr_ml_min_1_73m2":"90","european_risk_region":"moderate","hba1c_mmol_mol":"50","hdl_mmol_l":"1.3","sbp_mm_hg":"140","sex":"male","smoker":"false","total_cholesterol_mmol_l":"5.5"},{"age":"60","age_at_diabetes_diagnosis":"60","egfr_ml_min_1_73m2":"90","european_risk_region":"moderate","hba1c_mmol_mol":"50","hdl_mmol_l":"1.3","sbp_mm_hg":"140","sex":"male","smoker":"false","total_cholesterol_mmol_l":"5.5"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/tokyo-cholangitis":{"get":{"description":"Apply Kiriyama 2018 Tokyo Guidelines 2018 diagnostic criteria and severity grading of acute cholangitis (unchanged from TG13) and return diagnosis (definite, suspected, or none) and severity (grade_i, grade_ii, grade_iii, or none) from caller-assigned flags and age.\n\nWhen an agent already has caller-assigned systemic inflammation, cholestasis, imaging, organ-dysfunction, and Grade II flags plus age and needs the published TG18 (=TG13) cholangitis classification. magent does not examine the patient, assay labs, or read imaging. Not TG18 cholecystitis. Not Alvarado or RIPASA.\n\nNot a medical device and not a diagnosis of acute cholangitis that replaces imaging or laboratory review.\n\nTG18 diagnostic criteria and severity grading of acute cholangitis are unchanged from TG13 (Kiriyama 2018).\n\nThis tool is acute cholangitis only. It is not TG18 acute cholecystitis and not Alvarado or RIPASA (appendicitis scores).\n\nmagent does not examine the patient, assay labs, or read imaging. The caller assigns every flag, including whether albumin is <0.7× the local lower limit of normal.\n\nNot a biliary-drainage order. Severity is none when diagnosis is none. Grade III beats Grade II. Grade II requires any two items, not any one (that any-one rule is TG18 cholecystitis). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Counts as one Kiriyama 2018 TG18 Grade II item when age ≥75. Age 75 meets; age 74 does not. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"60"},{"in":"query","name":"fever_or_chills","description":"Fever and/or shaking chills as assigned by the caller (Kiriyama 2018 TG18 A-1). true or false. magent does not measure temperature or examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"elevated_wbc_or_crp","description":"Laboratory inflammatory response (elevated WBC or CRP) as assigned by the caller (Kiriyama 2018 TG18 A-2). true or false. magent does not assay WBC or CRP.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"jaundice","description":"Jaundice as assigned by the caller (Kiriyama 2018 TG18 B-1). true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"abnormal_lfts","description":"Increased ALP, GGT, AST, or ALT as assigned by the caller (Kiriyama 2018 TG18 B-2). true or false. magent does not assay liver tests.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"biliary_dilatation","description":"Biliary dilatation as assigned by the caller (Kiriyama 2018 TG18 C-1). true or false. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"etiology_on_imaging","description":"Evidence of etiology on imaging (stricture, stone, stent, or equivalent) as assigned by the caller (Kiriyama 2018 TG18 C-2). true or false. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypotension_vasopressors","description":"Hypotension requiring dopamine ≥5 µg/kg/min or any norepinephrine as assigned by the caller (Kiriyama 2018 TG18 Grade III cardiovascular dysfunction). true or false. magent does not measure blood pressure or order vasopressors.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"decreased_consciousness","description":"Decreased level of consciousness as assigned by the caller (Kiriyama 2018 TG18 Grade III neurological dysfunction). true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pfr_lt_300","description":"PaO2/FiO2 <300 as assigned by the caller (Kiriyama 2018 TG18 Grade III respiratory dysfunction). true or false. magent does not interpret blood gas or ventilator settings.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"oliguria_or_creatinine_gt_2","description":"Oliguria or creatinine >2.0 mg/dL as assigned by the caller (Kiriyama 2018 TG18 Grade III renal dysfunction). true or false. magent does not assay creatinine or measure urine output.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pt_inr_gt_1_5","description":"PT-INR >1.5 as assigned by the caller (Kiriyama 2018 TG18 Grade III hepatic dysfunction). true or false. magent does not interpret coagulation assays.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"platelets_lt_100k","description":"Platelet count <100,000/mm³ as assigned by the caller (Kiriyama 2018 TG18 Grade III hematological dysfunction). true or false. magent does not assay platelets.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"wbc_gt_12k_or_lt_4k","description":"White blood cell count >12,000/mm³ or <4,000/mm³ as assigned by the caller (Kiriyama 2018 TG18 Grade II). true or false. magent does not assay WBC.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"fever_ge_39","description":"Fever ≥39°C as assigned by the caller (Kiriyama 2018 TG18 Grade II). true or false. magent does not measure temperature.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bilirubin_ge_5","description":"Total bilirubin ≥5 mg/dL as assigned by the caller (Kiriyama 2018 TG18 Grade II). true or false. magent does not assay bilirubin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypoalbuminemia","description":"Albumin <0.7× the local lower limit of normal as assigned by the caller (Kiriyama 2018 TG18 Grade II). true or false. magent does not assay albumin.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Tokyo cholangitis","operationId":"get_api_calc_tokyo_cholangitis","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, diagnosis, severity, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/tokyo-cholangitis"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Tokyo cholangitis (bulk)","operationId":"post_api_calc_tokyo_cholangitis","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/tokyo-cholangitis"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"abnormal_lfts":"false","age":"60","biliary_dilatation":"false","bilirubin_ge_5":"false","decreased_consciousness":"false","elevated_wbc_or_crp":"false","etiology_on_imaging":"false","fever_ge_39":"false","fever_or_chills":"false","hypoalbuminemia":"false","hypotension_vasopressors":"false","jaundice":"false","oliguria_or_creatinine_gt_2":"false","pfr_lt_300":"false","platelets_lt_100k":"false","pt_inr_gt_1_5":"false","wbc_gt_12k_or_lt_4k":"false"},{"abnormal_lfts":"false","age":"60","biliary_dilatation":"false","bilirubin_ge_5":"false","decreased_consciousness":"false","elevated_wbc_or_crp":"false","etiology_on_imaging":"false","fever_ge_39":"false","fever_or_chills":"false","hypoalbuminemia":"false","hypotension_vasopressors":"false","jaundice":"false","oliguria_or_creatinine_gt_2":"false","pfr_lt_300":"false","platelets_lt_100k":"false","pt_inr_gt_1_5":"false","wbc_gt_12k_or_lt_4k":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/bicarbonate-deficit":{"get":{"description":"Estimate bicarbonate deficit from weight and measured plasma HCO3 using a 50 percent body-weight apparent space.\n\nWhen an agent needs Adrogué–Madias deficit arithmetic and must not invent a bicarbonate space or replacement amount.\n\nNot a treatment order and not a bicarbonate dosing protocol. The paper uses 50 percent of body weight only as a starting space and a safety target near 8–10 mmol/L, not full correction to 24.\n\nApparent space can reach 100 percent of body weight or more in extreme acidemia. This tool does not switch space with HCO3, ongoing acid production, or ventilation. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"weight_kg","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"weight_lb","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"schema":{"type":"number"},"example":"154.3236"},{"in":"query","name":"bicarbonate_mmol_l","description":"Measured plasma bicarbonate in mmol/L (same as mEq/L). Range 2-45.","required":true,"schema":{"type":"number"},"example":"4"},{"in":"query","name":"desired_hco3_mmol_l","description":"Target plasma bicarbonate in mmol/L (8-30), must exceed measured HCO3. Omitted uses 24.","required":false,"schema":{"type":"number"},"example":"8"}],"summary":"Bicarbonate deficit","operationId":"get_api_calc_bicarbonate_deficit","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, weight_kg, bicarbonate_mmol_l, desired_hco3_mmol_l, bicarbonate_space_l, deficit_meq, citation, disclaimer."},"400":{"description":"invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_bicarbonate: bicarbonate_mmol_l must be a number from 2 to 45. Returned before settlement; you are not charged.; invalid_desired_bicarbonate: desired_hco3_mmol_l must be a number from 8 to 30 greater than bicarbonate_mmol_l. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bicarbonate-deficit"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Bicarbonate deficit (bulk)","operationId":"post_api_calc_bicarbonate_deficit","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_bicarbonate: bicarbonate_mmol_l must be a number from 2 to 45. Returned before settlement; you are not charged.; invalid_desired_bicarbonate: desired_hco3_mmol_l must be a number from 8 to 30 greater than bicarbonate_mmol_l. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bicarbonate-deficit"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bicarbonate_mmol_l":"4","desired_hco3_mmol_l":"8","weight_kg":"70"},{"bicarbonate_mmol_l":"4","desired_hco3_mmol_l":"8","weight_kg":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/lille":{"get":{"description":"Compute the Louvet 2007 Lille score from age, day-0 albumin, bilirubin on day 0 and day 7, creatinine, and PT seconds or INR. formula is required.\n\nWhen an agent needs the published Lille logistic and 0.45 cutoff and must not swap PT for INR or treat the band as a steroid order.\n\nNot a medical device. magent does not recommend starting, stopping, or continuing corticosteroids or any other therapy.\n\nformula=pt or formula=inr is required. PT seconds and INR are not interchangeable; magent does not convert one to the other.\n\nresponder and nonresponder are the paper's 0.45 cutoff on the Lille score, not a steroid order. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"formula","description":"pt (prothrombin time in seconds) or inr. Required; magent does not swap PT and INR.","required":true,"schema":{"type":"string","enum":["pt","inr"]},"example":"pt"},{"in":"query","name":"age","description":"Age in years (18-120).","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"albumin_g_l","description":"Day-0 albumin in g/L (10-60). Provide this or albumin_g_dl, not both. Louvet 2007 uses g/L.","required":false,"schema":{"type":"number"},"example":"35"},{"in":"query","name":"albumin_g_dl","description":"Day-0 albumin in g/dL (1-6). Converted as g/L = g/dL × 10.","required":false,"schema":{"type":"number"},"example":"3.5"},{"in":"query","name":"bilirubin_day0_umol_l","description":"Day-0 total bilirubin in µmol/L (2-684). Provide this or bilirubin_day0_mg_dl.","required":false,"schema":{"type":"number"},"example":"200"},{"in":"query","name":"bilirubin_day0_mg_dl","description":"Day-0 total bilirubin in mg/dL (0.1-40). Converted as µmol/L = mg/dL × 17.1.","required":false,"schema":{"type":"number"},"example":"11.7"},{"in":"query","name":"bilirubin_day7_umol_l","description":"Day-7 total bilirubin in µmol/L (2-684). Provide this or bilirubin_day7_mg_dl.","required":false,"schema":{"type":"number"},"example":"150"},{"in":"query","name":"bilirubin_day7_mg_dl","description":"Day-7 total bilirubin in mg/dL (0.1-40). Converted as µmol/L = mg/dL × 17.1.","required":false,"schema":{"type":"number"},"example":"8.8"},{"in":"query","name":"creatinine_mg_dl","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l. Renal insufficiency is 1 when > 1.3 mg/dL if this unit is used (Louvet 2007).","required":false,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"creatinine_umol_l","description":"Serum creatinine in µmol/L (9-1768). Provide this or creatinine_mg_dl. Renal insufficiency is 1 when > 115 µmol/L if this unit is used (Louvet 2007).","required":false,"schema":{"type":"number"},"example":"88"},{"in":"query","name":"pt_sec","description":"Prothrombin time in seconds (8-120). Required when formula=pt. Ignored when formula=inr.","required":false,"schema":{"type":"number"},"example":"18"},{"in":"query","name":"inr","description":"INR (0.8-10). Required when formula=inr. Ignored when formula=pt.","required":false,"schema":{"type":"number"},"example":"2.0"}],"summary":"Lille score","operationId":"get_api_calc_lille","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, r, lille_score, response, renal_insufficiency, age_years, albumin_g_l, bilirubin_day0_umol_l, bilirubin_day7_umol_l, evolution_bilirubin_umol_l, creatinine_mg_dl, pt_sec, inr, citation, disclaimer."},"400":{"description":"invalid_lille_formula: formula must be pt or inr (Louvet 2007). Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_bilirubin: bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_prothrombin_time: pt_sec (8-120) is required, or pt_patient_sec (8-120) and pt_control_sec (8-20) are required. Returned before settlement; you are not charged.; invalid_inr: inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/lille"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Lille score (bulk)","operationId":"post_api_calc_lille","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_lille_formula: formula must be pt or inr (Louvet 2007). Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_bilirubin: bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_prothrombin_time: pt_sec (8-120) is required, or pt_patient_sec (8-120) and pt_control_sec (8-20) are required. Returned before settlement; you are not charged.; invalid_inr: inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/lille"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","albumin_g_l":"35","bilirubin_day0_umol_l":"200","bilirubin_day7_umol_l":"150","creatinine_mg_dl":"1.0","formula":"pt","pt_sec":"18"},{"age":"50","albumin_g_l":"35","bilirubin_day0_umol_l":"200","bilirubin_day7_umol_l":"150","creatinine_mg_dl":"1.0","formula":"pt","pt_sec":"18"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mipss70":{"get":{"description":"Sum the Guglielmelli 2018 MIPSS70 (mutation-enhanced international prognostic score system) for transplantation-age primary myelofibrosis and return low (0–1), intermediate (2–4), or high (≥5).\n\nWhen an agent needs the published MIPSS70 point total and risk band and must not invent a PMF diagnosis or transplant listing, and must not substitute MIPSS70-plus, MIPSS70+ version 2.0, DIPSS, or GIPSS.\n\nNot a medical device and not a PMF diagnosis or transplant listing. magent does not examine the patient.\n\nThis is Guglielmelli 2018 MIPSS70 only, not MIPSS70-plus, not MIPSS70+ version 2.0, and not DIPSS or GIPSS.\n\nmagent does not sequence. calr_type1_like and hmr_mutation_count (ASXL1, EZH2, SRSF2, IDH1, IDH2) are caller-assigned.\n\nmagent does not grade marrow. fibrosis_grade is the caller-assigned WHO marrow fibrosis grade 0–3.\n\nmagent does not assay hemoglobin, leukocytes, platelets, or circulating blasts. Labs are caller-supplied. Provide hemoglobin_g_dl or hemoglobin_g_l, not both.\n\nPublished Italian-cohort median and 5-year survivals are Guglielmelli 2018 cohort figures for the three MIPSS70 bands, not a patient-specific prediction. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"hemoglobin_g_dl","description":"Hemoglobin in g/dL (3-22). Provide this or hemoglobin_g_l, not both. <10 g/dL (<100 g/L) scores 1 (Guglielmelli 2018). 10.0 is the ≥10 arm and scores 0. magent does not assay hemoglobin.","required":false,"schema":{"type":"number"},"example":"12"},{"in":"query","name":"hemoglobin_g_l","description":"Hemoglobin in g/L (30-220). Converted as hemoglobin_g_dl = hemoglobin_g_l / 10. Provide this or hemoglobin_g_dl, not both. <100 g/L scores 1. 100 is the ≥100 arm and scores 0.","required":false,"schema":{"type":"number"},"example":"120"},{"in":"query","name":"leukocytes_10e9_l","description":"Leukocyte count in 10^9/L (0.5-200). >25 scores 2 (Guglielmelli 2018). 25.0 is the ≤25 arm and scores 0. magent does not assay leukocytes.","required":true,"schema":{"type":"number"},"example":"10"},{"in":"query","name":"platelets_10e9_l","description":"Platelet count in 10^9/L (1-2000). <100 scores 2 (Guglielmelli 2018). 100.0 is the ≥100 arm and scores 0. magent does not assay platelets.","required":true,"schema":{"type":"number"},"example":"200"},{"in":"query","name":"blasts_percent","description":"Circulating blasts as a percent (0-30). ≥2 scores 1 (Guglielmelli 2018). 2.0 scores; 1.9 is the <2 arm and scores 0. magent does not read a smear.","required":true,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"fibrosis_grade","description":"WHO bone-marrow fibrosis grade as an integer 0-3, assigned by the caller (Guglielmelli 2018). ≥2 scores 1. Grade 2 scores; grade 1 scores 0. magent does not grade marrow.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"constitutional_symptoms","description":"Constitutional symptoms as assigned by the caller (Guglielmelli 2018). true scores 1. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"calr_type1_like","description":"Presence of a type 1/like CALR mutation as assigned by the caller (Guglielmelli 2018). false (absence) scores 1. true scores 0. magent does not sequence.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"hmr_mutation_count","description":"Count of high-molecular-risk mutations among ASXL1, EZH2, SRSF2, IDH1, and IDH2 as assigned by the caller (integer 0-5). ≥1 scores 1 (HMR category). ≥2 scores an additional 2 (two or more HMR mutations), so a count of 2 or more contributes 3. Count 0 scores 0. magent does not sequence.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"MIPSS70","operationId":"get_api_calc_mipss70","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk_band, hemoglobin_g_dl, leukocytes_10e9_l, platelets_10e9_l, blasts_percent, fibrosis_grade, constitutional_symptoms, calr_type1_like, hmr_mutation_count, median_survival_years, five_year_survival_percent, components, citation, disclaimer."},"400":{"description":"invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_leukocytes: leukocytes_10e9_l must be a number from 0.5 to 200 (Guglielmelli 2018 MIPSS70). Returned before settlement; you are not charged.; invalid_platelets: platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.; invalid_mipss_blasts: blasts_percent must be a number from 0 to 30 (Guglielmelli 2018 MIPSS70 circulating blasts; magent clamp). Returned before settlement; you are not charged.; invalid_fibrosis_grade: fibrosis_grade must be an integer 0-3 (Guglielmelli 2018 MIPSS70 WHO marrow fibrosis). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mipss70"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"MIPSS70 (bulk)","operationId":"post_api_calc_mipss70","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_hemoglobin: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.; invalid_leukocytes: leukocytes_10e9_l must be a number from 0.5 to 200 (Guglielmelli 2018 MIPSS70). Returned before settlement; you are not charged.; invalid_platelets: platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.; invalid_mipss_blasts: blasts_percent must be a number from 0 to 30 (Guglielmelli 2018 MIPSS70 circulating blasts; magent clamp). Returned before settlement; you are not charged.; invalid_fibrosis_grade: fibrosis_grade must be an integer 0-3 (Guglielmelli 2018 MIPSS70 WHO marrow fibrosis). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mipss70"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"blasts_percent":"0","calr_type1_like":"true","constitutional_symptoms":"false","fibrosis_grade":"1","hemoglobin_g_dl":"12","hmr_mutation_count":"0","leukocytes_10e9_l":"10","platelets_10e9_l":"200"},{"blasts_percent":"0","calr_type1_like":"true","constitutional_symptoms":"false","fibrosis_grade":"1","hemoglobin_g_dl":"12","hmr_mutation_count":"0","leukocytes_10e9_l":"10","platelets_10e9_l":"200"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/westley-croup":{"get":{"description":"Sum the Westley 1978 croup clinical score from caller-assigned consciousness, cyanosis, stridor, air entry, and retractions (maximum 17).\n\nWhen an agent needs the published Westley croup score and must not invent a severity band, steroid indication, or a different croup score.\n\nNot a diagnosis of croup and not a treatment or admission order. magent does not examine the child.\n\nEach sign uses only the 1978 point values (consciousness 0 or 5; cyanosis 0, 4, or 5; stridor 0-2; air entry 0-2; retractions 0-3).\n\nWestley 1978 does not publish mild/moderate/severe total-score cutoffs; magent does not invent them. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"consciousness","description":"Westley 1978 level of consciousness: 0 normal, 5 disoriented. Caller-assigned.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"cyanosis","description":"Cyanosis: 0 none, 4 with agitation, 5 at rest. Caller-assigned.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"stridor","description":"Stridor: 0 none, 1 with agitation, 2 at rest. Caller-assigned.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"air_entry","description":"Air entry: 0 normal, 1 decreased, 2 markedly decreased. Caller-assigned.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"retractions","description":"Chest-wall retractions: 0 none, 1 mild, 2 moderate, 3 severe. Caller-assigned.","required":true,"schema":{"type":"integer"},"example":"1"}],"summary":"Westley croup","operationId":"get_api_calc_westley_croup","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, consciousness, cyanosis, stridor, air_entry, retractions, components, citation, disclaimer."},"400":{"description":"invalid_westley_consciousness: consciousness must be 0 (normal) or 5 (disoriented). Returned before settlement; you are not charged.; invalid_westley_cyanosis: cyanosis must be 0 (none), 4 (with agitation), or 5 (at rest). Returned before settlement; you are not charged.; invalid_westley_stridor: stridor must be 0 (none), 1 (with agitation), or 2 (at rest). Returned before settlement; you are not charged.; invalid_westley_air_entry: air_entry must be 0 (normal), 1 (decreased), or 2 (markedly decreased). Returned before settlement; you are not charged.; invalid_westley_retractions: retractions must be 0 (none), 1 (mild), 2 (moderate), or 3 (severe). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/westley-croup"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Westley croup (bulk)","operationId":"post_api_calc_westley_croup","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_westley_consciousness: consciousness must be 0 (normal) or 5 (disoriented). Returned before settlement; you are not charged.; invalid_westley_cyanosis: cyanosis must be 0 (none), 4 (with agitation), or 5 (at rest). Returned before settlement; you are not charged.; invalid_westley_stridor: stridor must be 0 (none), 1 (with agitation), or 2 (at rest). Returned before settlement; you are not charged.; invalid_westley_air_entry: air_entry must be 0 (normal), 1 (decreased), or 2 (markedly decreased). Returned before settlement; you are not charged.; invalid_westley_retractions: retractions must be 0 (none), 1 (mild), 2 (moderate), or 3 (severe). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/westley-croup"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"air_entry":"0","consciousness":"0","cyanosis":"0","retractions":"1","stridor":"1"},{"air_entry":"0","consciousness":"0","cyanosis":"0","retractions":"1","stridor":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/vocal-penn":{"get":{"description":"Compute the Mahmud 2021 VOCAL-Penn 30-day postoperative mortality percent for cirrhosis from caller-assigned ASA class, surgery category, emergency indication, NAFLD, obesity, albumin, bilirubin, and platelet count.\n\nWhen an agent needs the published Mahmud 2021 30-day VOCAL-Penn logistic probability and must not invent a surgical-candidacy order, assign ASA class, or substitute MELD or Child-Pugh.\n\nNot a medical device.\n\nNot a surgical-candidacy order and not an operative go/no-go.\n\nmagent does not assign ASA class and does not read laboratory values.\n\nMahmud 2021 Supplement Appendix 30-day logistic only. This is not the 90-day or 180-day conditional model.\n\nAge is required because the published tool asks for it. The 30-day Appendix linear predictor does not retain age (age appears in the 90- and 180-day models).\n\nabdominal is the Appendix open-abdominal dummy. abdominal_laparoscopic is the surgery reference. chest and cardiac share the printed chest/cardiac coefficient (Supplemental Table 1 combined those CPT groups).\n\nASA is caller-assigned 2, 3, or 4. The derivation cohort had no ASA 1 and excluded ASA 5.\n\nObesity is caller-assigned BMI ≥30. Fatty liver disease is caller-assigned NAFLD etiology. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). The Mahmud 2021 Supplement Appendix 30-day linear predictor does not retain age (age is in the 90- and 180-day models). Required because the published tool asks for it.","required":true,"schema":{"type":"integer"},"example":"60"},{"in":"query","name":"albumin_g_dl","description":"Preoperative albumin in g/dL (1.0-6.0). Provide this or albumin_g_l. Restricted cubic spline knots 2.7, 3.7, 4.4 (Supplemental Table 2). magent does not read the laboratory.","required":false,"schema":{"type":"number"},"example":"3.5"},{"in":"query","name":"albumin_g_l","description":"Preoperative albumin in g/L (10-60). Converted as g/dL = g/L / 10.","required":false,"schema":{"type":"number"},"example":"35"},{"in":"query","name":"bilirubin_mg_dl","description":"Preoperative total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l. Linear in the 30-day Appendix model. magent does not read the laboratory.","required":false,"schema":{"type":"number"},"example":"1.2"},{"in":"query","name":"bilirubin_umol_l","description":"Preoperative total bilirubin in µmol/L (2-684). Converted as mg/dL = µmol/L / 17.1.","required":false,"schema":{"type":"number"},"example":"20.52"},{"in":"query","name":"platelets_10e9_l","description":"Preoperative platelet count in 10^9/L (10-800), equal to 1,000/µL. Spline knots 75, 152, 271 (Supplemental Table 2). magent does not read the laboratory.","required":true,"schema":{"type":"number"},"example":"150"},{"in":"query","name":"obesity","description":"Caller-assigned BMI ≥30 kg/m² (true/false). Protective in the 30-day model. magent does not compute BMI.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"fatty_liver_disease","description":"Caller-assigned NAFLD as the etiology of cirrhosis (true/false). magent does not assign etiology.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"asa_class","description":"Caller-assigned ASA physical status 2, 3, or 4 (ordinal in the Appendix). The derivation cohort had no ASA 1 and excluded ASA 5. magent does not assign ASA class.","required":true,"schema":{"type":"integer","enum":[2,3,4]},"example":3},{"in":"query","name":"emergency","description":"Caller-assigned emergency indication (true/false). magent does not classify urgency.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"surgery_category","description":"Mahmud 2021 Appendix surgery dummy as assigned by the caller. abdominal_laparoscopic is the reference (0). abdominal is open abdominal. chest and cardiac share the printed chest/cardiac coefficient. magent does not classify a CPT code.","required":true,"schema":{"type":"string","enum":["abdominal_laparoscopic","abdominal","abdominal_wall","vascular","orthopedic","chest","cardiac"]},"example":"abdominal_wall"}],"summary":"VOCAL-Penn","operationId":"get_api_calc_vocal_penn","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, albumin_g_dl, bilirubin_mg_dl, platelets_10e9_l, obesity, fatty_liver_disease, asa_class, emergency, surgery_category, logit, mortality_30d_percent, citation, disclaimer."},"400":{"description":"invalid_vocal_penn: VOCAL-Penn inputs must match Mahmud 2021 age, albumin, bilirubin, platelets, obesity, fatty liver disease, ASA class, emergency indication, and surgery category. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/vocal-penn"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"VOCAL-Penn (bulk)","operationId":"post_api_calc_vocal_penn","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_vocal_penn: VOCAL-Penn inputs must match Mahmud 2021 age, albumin, bilirubin, platelets, obesity, fatty liver disease, ASA class, emergency indication, and surgery category. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/vocal-penn"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"60","albumin_g_dl":"3.5","asa_class":"3","bilirubin_mg_dl":"1.2","emergency":"false","fatty_liver_disease":"false","obesity":"false","platelets_10e9_l":"150","surgery_category":"abdominal_wall"},{"age":"60","albumin_g_dl":"3.5","asa_class":"3","bilirubin_mg_dl":"1.2","emergency":"false","fatty_liver_disease":"false","obesity":"false","platelets_10e9_l":"150","surgery_category":"abdominal_wall"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-infant-constipation":{"get":{"description":"Apply the Benninga 2016 Rome IV G7 functional constipation (neonate/toddler) criteria and return features_met and whether the published infant constipation box holds (rome_iv_infant_constipation).\n\nWhen an agent already has the caller-assigned Benninga 2016 Rome IV G7 flags (including toilet_trained and, when assigned, digital rectal exam as large_fecal_mass_in_rectum) and needs whether the published infant functional constipation box holds. magent does not examine the infant.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose infant functional constipation.\n\nThe caller assigns the flags, including large_fecal_mass_in_rectum (digital rectal exam is caller-assigned). magent does not examine the infant.\n\nThis tool is Benninga 2016 Rome IV G7 functional constipation (neonate/toddler, infants up to 4 years) only. Not adult Rome IV FC (Mearin 2016 C2). Not child H3a. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"toilet_trained","description":"Toilet-trained as assigned (Benninga 2016 Rome IV G7). When true, incontinence_after_toileting_at_least_weekly and large_diameter_stools_that_may_obstruct_toilet count toward features_met. true or false as assigned by the caller. magent does not examine the infant.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"two_or_fewer_defecations_per_week","description":"Two or fewer defecations per week, as assigned (Benninga 2016 Rome IV G7; one of five core features). true or false as assigned by the caller. magent does not examine the infant.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"history_of_excessive_stool_retention","description":"History of excessive stool retention, as assigned (Benninga 2016 Rome IV G7; one of five core features). true or false as assigned by the caller. magent does not examine the infant.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"history_of_painful_or_hard_bowel_movements","description":"History of painful or hard bowel movements, as assigned (Benninga 2016 Rome IV G7; one of five core features). true or false as assigned by the caller. magent does not examine the infant.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"history_of_large_diameter_stools","description":"History of large-diameter stools, as assigned (Benninga 2016 Rome IV G7; one of five core features). true or false as assigned by the caller. magent does not examine the infant.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"large_fecal_mass_in_rectum","description":"Large fecal mass in the rectum, as assigned (Benninga 2016 Rome IV G7; one of five core features). Digital rectal exam is caller-assigned. true or false as assigned by the caller. magent does not examine the infant.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"incontinence_after_toileting_at_least_weekly","description":"At least one episode per week of incontinence after the acquisition of toileting skills, as assigned (Benninga 2016 Rome IV G7 extra; counted only when toilet_trained is true). true or false as assigned by the caller. magent does not examine the infant.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"large_diameter_stools_that_may_obstruct_toilet","description":"History of large-diameter stools that may obstruct the toilet, as assigned (Benninga 2016 Rome IV G7 extra; counted only when toilet_trained is true). true or false as assigned by the caller. magent does not examine the infant.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"duration_at_least_1_month","description":"Must include 1 month of at least 2 features, as assigned (Benninga 2016 Rome IV G7). true or false as assigned by the caller. magent does not examine the infant.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV Infant Constipation","operationId":"get_api_calc_rome_iv_infant_constipation","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, features_met, rome_iv_infant_constipation, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_infant_constipation: Rome IV infant functional constipation needs the Benninga 2016 neonate/toddler G7 flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-infant-constipation"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV Infant Constipation (bulk)","operationId":"post_api_calc_rome_iv_infant_constipation","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_infant_constipation: Rome IV infant functional constipation needs the Benninga 2016 neonate/toddler G7 flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-infant-constipation"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"duration_at_least_1_month":"true","history_of_excessive_stool_retention":"false","history_of_large_diameter_stools":"false","history_of_painful_or_hard_bowel_movements":"true","incontinence_after_toileting_at_least_weekly":"false","large_diameter_stools_that_may_obstruct_toilet":"false","large_fecal_mass_in_rectum":"false","toilet_trained":"false","two_or_fewer_defecations_per_week":"true"},{"duration_at_least_1_month":"true","history_of_excessive_stool_retention":"false","history_of_large_diameter_stools":"false","history_of_painful_or_hard_bowel_movements":"true","incontinence_after_toileting_at_least_weekly":"false","large_diameter_stools_that_may_obstruct_toilet":"false","large_fecal_mass_in_rectum":"false","toilet_trained":"false","two_or_fewer_defecations_per_week":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/cheops":{"get":{"description":"Sum six caller-assigned McGrath 1985 CHEOPS category integers and return the published total (range 4-13).\n\nWhen an agent has already assigned McGrath 1985 CHEOPS integers for cry, facial, child_verbal, torso, touch, and legs and needs the published total, not a pain diagnosis, analgesic order, FLACC, BOPS, or an invented treatment-threshold cutoff.\n\nNot a medical device and not a pain diagnosis or analgesic order.\n\nEach of the six categories is a caller-assigned integer from the McGrath 1985 table. magent does not observe the child.\n\nCry is 1, 2, or 3 (0 is not published). Facial and child_verbal are 0, 1, or 2. Torso, touch, and legs are 1 or 2 (0 is not published). Both-complaints maps to child_verbal 2; there is no published verbal 3.\n\nPublished total is 4 (no pain) to 13 (worst pain). magent does not emit later treatment-threshold cutoffs.\n\nMcGrath 1985 described postoperative pain rating in children. magent does not take an age parameter. Not FLACC. Not BOPS. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"cry","description":"Caller-assigned McGrath 1985 CHEOPS cry (integer 1-3; 0 is not published): 1 no crying; 2 moaning or crying; 3 scream. magent does not observe the child.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"facial","description":"Caller-assigned McGrath 1985 CHEOPS facial (integer 0-2): 0 smiling; 1 composed/neutral; 2 grimace. magent does not observe the child.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"child_verbal","description":"Caller-assigned McGrath 1985 CHEOPS child verbal (integer 0-2): 0 positive statements; 1 none or other non-pain complaints; 2 pain complaints (both-complaints also 2; there is no published 3). magent does not observe the child.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"torso","description":"Caller-assigned McGrath 1985 CHEOPS torso (integer 1-2; 0 is not published): 1 neutral/resting; 2 shifting, tense, shivering, upright, or restrained. magent does not observe the child.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"touch","description":"Caller-assigned McGrath 1985 CHEOPS touch (integer 1-2; 0 is not published): 1 not touching wound; 2 reaching, touching, grabbing, or arms restrained. magent does not observe the child.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"legs","description":"Caller-assigned McGrath 1985 CHEOPS legs (integer 1-2; 0 is not published): 1 neutral; 2 squirm/kicking, drawn up/tense, standing, or restrained. magent does not observe the child.","required":true,"schema":{"type":"integer"},"example":"1"}],"summary":"CHEOPS","operationId":"get_api_calc_cheops","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, cry, facial, child_verbal, torso, touch, legs, components, citation, disclaimer."},"400":{"description":"invalid_cheops: CHEOPS needs cry, facial, child_verbal, torso, touch, and legs (McGrath 1985). Returned before settlement; you are not charged.; invalid_cheops_item: each CHEOPS category must be an integer in that category's published range (McGrath 1985). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cheops"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CHEOPS (bulk)","operationId":"post_api_calc_cheops","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_cheops: CHEOPS needs cry, facial, child_verbal, torso, touch, and legs (McGrath 1985). Returned before settlement; you are not charged.; invalid_cheops_item: each CHEOPS category must be an integer in that category's published range (McGrath 1985). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cheops"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"child_verbal":"0","cry":"1","facial":"0","legs":"1","torso":"1","touch":"1"},{"child_verbal":"0","cry":"1","facial":"0","legs":"1","torso":"1","touch":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/nexus":{"get":{"description":"Apply the Hoffman 2000 NEXUS C-spine rule and return whether the five low-risk criteria all hold (imaging not indicated by this rule).\n\nWhen an agent has caller-assigned findings after blunt trauma and needs the published NEXUS C-spine imaging rule, not the Canadian C-spine rule.\n\nNot a diagnosis. magent does not examine the cervical spine.\n\nThis tool is the Hoffman 2000 NEXUS C-spine rule only. It is not the Canadian C-spine rule and not NEXUS chest or NEXUS head CT.\n\nBlunt-trauma adults as published. magent does not take age; the caller assigns the five findings.\n\nDoes not replace imaging when any criterion fails. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"midline_cervical_tenderness","description":"Posterior midline cervical-spine tenderness. true means tenderness is present and the low-risk criterion fails. true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"focal_neuro_deficit","description":"Focal neurologic deficit. true means a deficit is present and the low-risk criterion fails. true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"normal_alertness","description":"Normal alertness. true means alertness is normal and the low-risk criterion holds; false is altered alertness and the criterion fails.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"intoxication","description":"Intoxication. true means intoxicated and the low-risk criterion fails. true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"distracting_injury","description":"Painful, distracting injury. true means a distracting injury is present and the low-risk criterion fails. true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"NEXUS C-spine","operationId":"get_api_calc_nexus","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, nexus_low_risk, xray_indicated, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nexus"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"NEXUS C-spine (bulk)","operationId":"post_api_calc_nexus","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nexus"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"distracting_injury":"false","focal_neuro_deficit":"false","intoxication":"false","midline_cervical_tenderness":"false","normal_alertness":"true"},{"distracting_injury":"false","focal_neuro_deficit":"false","intoxication":"false","midline_cervical_tenderness":"false","normal_alertness":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/kegfr":{"get":{"description":"Compute Chen 2013 kinetic eGFR (KeGFR) from two plasma creatinines, the hours between them, a caller-assigned steady-state creatinine and corresponding eGFR/CrCl, and MaxΔPCr/Day. magent does not compute MDRD or CKD-EPI.\n\nWhen plasma creatinine is changing acutely and an agent needs published Chen 2013 KeGFR rather than a CKD-EPI snapshot or a language-model guess. Endpoints should be <48-72 h apart (Chen). Not a dialysis prescription.\n\nNot a medical device. Not a CKD-EPI result and not a dialysis prescription.\n\nmagent does not compute MDRD or CKD-EPI. The caller assigns steady_state_egfr (5-200) as the corresponding eGFR/CrCl for steady_state_creatinine_mg_dl.\n\nCreatinine is mg/dL only. max_delta_pcr_mg_dl_day is required (Chen usual default 1.5); magent does not omit it. KeGFR is clamped at 0 when the (1 − ratio) term would be negative. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"creatinine_1_mg_dl","description":"First plasma creatinine in mg/dL (0.1-20). mg/dL only.","required":true,"schema":{"type":"number"},"example":"1"},{"in":"query","name":"creatinine_2_mg_dl","description":"Second plasma creatinine in mg/dL (0.1-20). mg/dL only.","required":true,"schema":{"type":"number"},"example":"1"},{"in":"query","name":"delta_hours","description":"Hours between creatinine_1 and creatinine_2 (1-72). Chen: endpoints <48-72 h apart.","required":true,"schema":{"type":"number"},"example":"24"},{"in":"query","name":"steady_state_creatinine_mg_dl","description":"Steady-state plasma creatinine in mg/dL (0.1-20) corresponding to steady_state_egfr. mg/dL only.","required":true,"schema":{"type":"number"},"example":"1"},{"in":"query","name":"steady_state_egfr","description":"Caller-assigned eGFR/CrCl in mL/min corresponding to steady_state_creatinine_mg_dl (5-200). magent does not compute MDRD or CKD-EPI.","required":true,"schema":{"type":"number"},"example":"90"},{"in":"query","name":"max_delta_pcr_mg_dl_day","description":"Maximum creatinine rise per day in mg/dL (0.5-3). Chen usual default 1.5. Required; magent does not omit it.","required":true,"schema":{"type":"number"},"example":"1.5"}],"summary":"KeGFR","operationId":"get_api_calc_kegfr","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, creatinine_1_mg_dl, creatinine_2_mg_dl, delta_hours, steady_state_creatinine_mg_dl, steady_state_egfr, max_delta_pcr_mg_dl_day, mean_pcr_mg_dl, delta_pcr_mg_dl, kegfr_ml_min, units, citation, disclaimer."},"400":{"description":"invalid_kegfr: creatinine_1_mg_dl and creatinine_2_mg_dl must be 0.1-20, delta_hours 1-72, and max_delta_pcr_mg_dl_day 0.5-3 (Chen 2013 KeGFR). Returned before settlement; you are not charged.; invalid_egfr: egfr_ml_min_1_73m2 must be a number from 5 to 200 (caller-assigned eGFR; magent does not compute MDRD or CKD-EPI). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/kegfr"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"KeGFR (bulk)","operationId":"post_api_calc_kegfr","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_kegfr: creatinine_1_mg_dl and creatinine_2_mg_dl must be 0.1-20, delta_hours 1-72, and max_delta_pcr_mg_dl_day 0.5-3 (Chen 2013 KeGFR). Returned before settlement; you are not charged.; invalid_egfr: egfr_ml_min_1_73m2 must be a number from 5 to 200 (caller-assigned eGFR; magent does not compute MDRD or CKD-EPI). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/kegfr"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"creatinine_1_mg_dl":"1","creatinine_2_mg_dl":"1","delta_hours":"24","max_delta_pcr_mg_dl_day":"1.5","steady_state_creatinine_mg_dl":"1","steady_state_egfr":"90"},{"creatinine_1_mg_dl":"1","creatinine_2_mg_dl":"1","delta_hours":"24","max_delta_pcr_mg_dl_day":"1.5","steady_state_creatinine_mg_dl":"1","steady_state_egfr":"90"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/prevail":{"get":{"description":"Compute the Armstrong 2018 PREVAIL multivariable Cox linear predictor for overall survival in chemotherapy-naïve men with metastatic castration-resistant prostate cancer from albumin, ALP versus ULN, bone-metastasis count, hemoglobin, LDH versus ULN, NLR, pain score, liver metastases, PSA, time from diagnosis, and enzalutamide versus placebo.\n\nWhen an agent already has those eleven caller-assigned PREVAIL Table 1 values and needs the published linear predictor, not a 1-/2-/3-year OS percent, not CAPRA, and not D'Amico groups. Not a treatment or dose order.\n\nNot a medical device. Not a dose, treatment, or sequencing order. magent does not assay labs, assign pain scores, or read bone scans or other imaging.\n\nChemotherapy-naïve mCRPC from the PREVAIL trial (enzalutamide versus placebo). Not hormone-sensitive disease and not post-chemotherapy CRPC. Not a nomogram total-points conversion.\n\nArmstrong 2018 Table 1 prints multivariable HRs. magent uses β = ln(HR). The paper's 1-, 2-, and 3-year OS percents sit on a nomogram (Figure 1 / supplementary Table S4) without a printed baseline survival S0 in the main text, so this tool emits the linear predictor only.\n\nLow, intermediate, and high groups in that paper were tertiles of the training-set risk score. Those tertile cut-points were not printed as numbers and are not invented here.\n\nALP below ULN, LDH below ULN, NLR <2.5, bone metastases <10, pain 0-1, and no liver metastases are caller-assigned flags. magent does not apply an institutional ULN or count metastases. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"albumin_g_dl","description":"Serum albumin in g/dL (1.0-6.5). Armstrong 2018 Table 1: continuous, HR 0.71 per g/dL. magent does not assay albumin.","required":true,"schema":{"type":"number"},"example":4.0},{"in":"query","name":"alp_below_uln","description":"Alkaline phosphatase below the institutional ULN as assigned by the caller (true or false). Table 1: true (<ULN versus ≥ULN) has HR 0.79. magent does not assay ALP or apply ULN.","required":true,"schema":{"type":"boolean"},"example":true},{"in":"query","name":"bone_mets_lt_10","description":"Fewer than 10 bone metastases as assigned by the caller (true or false). Table 1: true (<10 versus ≥10) has HR 0.68. magent does not read bone scans.","required":true,"schema":{"type":"boolean"},"example":true},{"in":"query","name":"hemoglobin_g_dl","description":"Hemoglobin in g/dL (3.0-22.0). Table 1: continuous, HR 0.85 per g/dL. magent does not assay hemoglobin.","required":true,"schema":{"type":"number"},"example":13.0},{"in":"query","name":"ldh_below_uln","description":"Lactate dehydrogenase below the institutional ULN as assigned by the caller (true or false). Table 1: true (<ULN versus ≥1×ULN) has HR 0.67. magent does not assay LDH or apply ULN.","required":true,"schema":{"type":"boolean"},"example":true},{"in":"query","name":"nlr_lt_2_5","description":"Neutrophil-to-lymphocyte ratio <2.5 as assigned by the caller (true or false). Table 1: true (<2.5 versus ≥2.5) has HR 0.69. magent does not compute NLR from counts.","required":true,"schema":{"type":"boolean"},"example":true},{"in":"query","name":"pain_0_to_1","description":"Pain score 0-1 versus ≥2 on the paper's linear scale, as assigned by the caller (true or false). Table 1: true (0-1 versus ≥2) has HR 0.77. magent does not assign pain scores.","required":true,"schema":{"type":"boolean"},"example":true},{"in":"query","name":"no_liver_metastases","description":"No liver metastases as assigned by the caller (true or false). Table 1 pattern of spread: true (no liver metastases versus any liver metastases) has HR 0.49. magent does not read imaging.","required":true,"schema":{"type":"boolean"},"example":true},{"in":"query","name":"psa_ng_ml","description":"Baseline PSA in ng/mL (0.1-10000). Table 1: continuous log_e PSA, HR 1.23 per ln(ng/mL). magent does not assay PSA.","required":true,"schema":{"type":"number"},"example":20.0},{"in":"query","name":"months_since_diagnosis","description":"Time from diagnosis to randomization in months (0-720). Table 1: continuous, HR 0.997 per month. magent does not date the interval.","required":true,"schema":{"type":"number"},"example":60},{"in":"query","name":"treatment_enzalutamide","description":"true if the PREVAIL treatment term is enzalutamide, false if placebo. Table 1: true (enzalutamide versus placebo) has HR 0.68. Not a dose or treatment order.","required":true,"schema":{"type":"boolean"},"example":true}],"summary":"PREVAIL","operationId":"get_api_calc_prevail","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, albumin_g_dl, alp_below_uln, bone_mets_lt_10, hemoglobin_g_dl, ldh_below_uln, nlr_lt_2_5, pain_0_to_1, no_liver_metastases, psa_ng_ml, months_since_diagnosis, treatment_enzalutamide, linear_predictor, risk_score, citation, disclaimer."},"400":{"description":"invalid_prevail: PREVAIL survival-model inputs must match Armstrong 2018 albumin, ALP vs ULN, hemoglobin, LDH vs ULN, NLR, bone metastases, pain, liver metastases, PSA, time from diagnosis, and enzalutamide vs placebo. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/prevail"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PREVAIL (bulk)","operationId":"post_api_calc_prevail","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_prevail: PREVAIL survival-model inputs must match Armstrong 2018 albumin, ALP vs ULN, hemoglobin, LDH vs ULN, NLR, bone metastases, pain, liver metastases, PSA, time from diagnosis, and enzalutamide vs placebo. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/prevail"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"albumin_g_dl":"4.0","alp_below_uln":"true","bone_mets_lt_10":"true","hemoglobin_g_dl":"13.0","ldh_below_uln":"true","months_since_diagnosis":"60","nlr_lt_2_5":"true","no_liver_metastases":"true","pain_0_to_1":"true","psa_ng_ml":"20.0","treatment_enzalutamide":"true"},{"albumin_g_dl":"4.0","alp_below_uln":"true","bone_mets_lt_10":"true","hemoglobin_g_dl":"13.0","ldh_below_uln":"true","months_since_diagnosis":"60","nlr_lt_2_5":"true","no_liver_metastases":"true","pain_0_to_1":"true","psa_ng_ml":"20.0","treatment_enzalutamide":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/improvedd":{"get":{"description":"Compute the Gibson 2017 IMPROVEDD VTE score from age, six caller-assigned IMPROVE flags, and caller-assigned D-dimer >=2x ULN.\n\nWhen an agent needs the published IMPROVEDD VTE score (Spyropoulos 2011 7-factor associative IMPROVE items plus D-dimer >=2x ULN). Not the 4-factor admission predictive model, not Padua, not Caprini. magent does not assay D-dimer, does not examine the patient, and does not diagnose VTE or issue a prophylaxis order.\n\nNot a medical device.\n\nNot a VTE diagnosis. magent does not diagnose venous thromboembolism.\n\nNot a prophylaxis order. This tool does not recommend a drug or start thromboprophylaxis.\n\nGibson 2017 IMPROVEDD: Spyropoulos 2011 7-factor associative IMPROVE items plus 2 points if caller-assigned D-dimer is >=2x ULN. Max 14. Cutoff 0-1 (low) vs >=2 (high; heightened VTE risk through 77 days). Does not copy Spyropoulos 2011 observed hospitalization percents.\n\nNot the 4-factor admission-only predictive IMPROVE model.\n\nNot Padua or Caprini.\n\nmagent does not assay D-dimer. d_dimer_ge_2x_uln is caller-assigned.\n\nmagent does not examine the patient. Flags are caller-assigned. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Scores 1 when age >60 (Spyropoulos 2011 / Gibson 2017). Age 60 scores 0; age 61 scores 1.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"previous_vte","description":"Previous VTE as assigned by the caller (Spyropoulos 2011 7-factor associative items in Gibson 2017 IMPROVEDD). true or false. 3 points if true. magent does not diagnose VTE.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"known_thrombophilia","description":"Known thrombophilia as assigned by the caller (Spyropoulos 2011 / Gibson 2017). true or false. 2 points if true. magent does not interpret a thrombophilia panel.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"lower_limb_paralysis","description":"Lower-limb paralysis as assigned by the caller (Spyropoulos 2011 / Gibson 2017). true or false. 2 points if true. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"current_cancer","description":"Current cancer as assigned by the caller (Spyropoulos 2011 / Gibson 2017). true or false. 2 points if true. magent does not diagnose cancer.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"immobilized_ge_7_days","description":"Immobilized >=7 days as assigned by the caller (Spyropoulos 2011 / Gibson 2017, during hospitalization). true or false. 1 point if true. magent does not observe mobility.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"icu_ccu_stay","description":"ICU or CCU stay as assigned by the caller (Spyropoulos 2011 / Gibson 2017, during hospitalization). true or false. 1 point if true. magent does not assign level of care.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"d_dimer_ge_2x_uln","description":"D-dimer >=2x the local upper limit of normal as assigned by the caller (Gibson 2017). true or false. 2 points if true. magent does not assay D-dimer.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"IMPROVEDD","operationId":"get_api_calc_improvedd","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, vte_band, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/improvedd"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"IMPROVEDD (bulk)","operationId":"post_api_calc_improvedd","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/improvedd"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","current_cancer":"false","d_dimer_ge_2x_uln":"false","icu_ccu_stay":"false","immobilized_ge_7_days":"false","known_thrombophilia":"false","lower_limb_paralysis":"false","previous_vte":"false"},{"age":"50","current_cancer":"false","d_dimer_ge_2x_uln":"false","icu_ccu_stay":"false","immobilized_ge_7_days":"false","known_thrombophilia":"false","lower_limb_paralysis":"false","previous_vte":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/macs":{"get":{"description":"Compute the Body 2014 Manchester Acute Coronary Syndromes (MACS) logistic probability of ACS from caller-assigned ECG ischaemia, worsening angina, right-arm or shoulder radiation, vomiting, observed sweating, hypotension, Roche Elecsys hs-cTnT in ng/L, and ELISA heart-type fatty acid-binding protein in ng/mL.\n\nWhen an agent already has those Body 2014 predictors as assigned by the caller and needs the published MACS probability and risk band. magent does not interpret an ECG or assay biomarkers. Not a diagnosis, discharge protocol, or T-MACS (troponin-only).\n\nNot a medical device. Not a diagnosis of ACS.\n\necg_ischaemia, worsening_angina, pain_radiation_right_arm_or_shoulder, vomiting, sweating_observed, and hypotension are caller-assigned. magent does not interpret ECG ischaemia or assay biomarkers.\n\nhs-cTnT is Roche Diagnostics Elecsys in ng/L as entered. 0–100000 ng/L is an implementation clamp. magent does not convert units.\n\nH-FABP is the ELISA value in ng/mL as in Body 2014. 0–200 ng/mL is an implementation clamp. magent does not apply the later immunoturbidimetric h-FABP transform (b-0.2844)/1.3520 from Body 2015 EMJ.\n\nBody 2014 Table 2 rounded MACS coefficients only. Not T-MACS (Body 2016 troponin-only). Not HEART. Not EDACS.\n\nFigure 2 writes very low <2%, low 2–5%, moderate 5–95%, and high ≥95%. magent uses a complete partition: p<0.02 very_low, 0.02≤p<0.05 low, 0.05≤p<0.95 moderate, p≥0.95 high. Bands use unrounded p.\n\nThis tool returns the logistic probability and band. It is not a discharge, observation, or rule-out protocol. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ecg_ischaemia","description":"Caller-assigned ECG ischaemia as used in Body 2014 (c; 1 if true, 0 if false). magent does not interpret an ECG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"worsening_angina","description":"Worsening or crescendo angina as assigned by the caller (g): anginal pain with increasing frequency, occurring with less exertion, or becoming more prolonged (Body 2014). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pain_radiation_right_arm_or_shoulder","description":"Pain radiating to the right arm or shoulder as assigned by the caller (h; Body 2014). true or false. magent does not take a pain history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"vomiting","description":"Vomiting in association with the presenting symptoms as assigned by the caller (e; Body 2014). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"sweating_observed","description":"Sweating observed by the treating clinician as assigned by the caller (d; Body 2014). true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypotension","description":"Hypotension as assigned by the caller (f): systolic BP <100 mm Hg on arrival (Body 2014, dichotomised as in that paper). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hs_ctnt_ng_l","description":"Roche Diagnostics Elecsys high-sensitivity cardiac troponin T on arrival in ng/L (a; 0-100000, implementation clamp). Continuous linear predictor in Body 2014 Table 2. magent does not convert units or assay troponin.","required":true,"schema":{"type":"number"},"example":"3"},{"in":"query","name":"h_fabp_ng_ml","description":"Heart-type fatty acid-binding protein by ELISA in ng/mL as in Body 2014 (b; 0-200, implementation clamp). Continuous linear predictor. magent does not convert units, assay H-FABP, or apply the later immunoturbidimetric transform.","required":true,"schema":{"type":"number"},"example":"1"}],"summary":"MACS","operationId":"get_api_calc_macs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, ecg_ischaemia, worsening_angina, pain_radiation_right_arm_or_shoulder, vomiting, sweating_observed, hypotension, hs_ctnt_ng_l, h_fabp_ng_ml, linear_predictor, probability, macs_band, citation, disclaimer."},"400":{"description":"invalid_macs: MACS inputs must match Body 2014 dichotomous predictors, Roche hs-cTnT ng/L, and H-FABP ng/mL from that paper. Returned before settlement; you are not charged.; invalid_hfabp: h_fabp_ng_ml must be a number from 0 to 200 (Body 2014 MACS heart-type fatty acid binding protein ng/mL). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/macs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"MACS (bulk)","operationId":"post_api_calc_macs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_macs: MACS inputs must match Body 2014 dichotomous predictors, Roche hs-cTnT ng/L, and H-FABP ng/mL from that paper. Returned before settlement; you are not charged.; invalid_hfabp: h_fabp_ng_ml must be a number from 0 to 200 (Body 2014 MACS heart-type fatty acid binding protein ng/mL). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/macs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ecg_ischaemia":"false","h_fabp_ng_ml":"1","hs_ctnt_ng_l":"3","hypotension":"false","pain_radiation_right_arm_or_shoulder":"false","sweating_observed":"false","vomiting":"false","worsening_angina":"false"},{"ecg_ischaemia":"false","h_fabp_ng_ml":"1","hs_ctnt_ng_l":"3","hypotension":"false","pain_radiation_right_arm_or_shoulder":"false","sweating_observed":"false","vomiting":"false","worsening_angina":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ckid-u25":{"get":{"description":"Compute Pierce 2021 CKiD U25 eGFR in mL/min/1.73m2 from age-dependent K with height and creatinine, cystatin C, or both.\n\nWhen an agent needs the CKiD under-25 eGFR for ages 1–25 and must not invent Schwartz 2009 bedside 0.413, adult CKD-EPI, or a CKD stage.\n\nNot a medical device. magent does not dose drugs.\n\nValidated for ages 1–25 years (CKiD under-25 equations). Not an adult CKD-EPI equation.\n\nThis is the Pierce 2021 age-dependent K model (creatinine, cystatin C, or the average of both). It is not the Schwartz 2009 bedside 0.413 formula and not the constant-K CKiD models.\n\nDoes not assign CKD stages. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_years","description":"Age in years (1-25, fractional ages allowed). Pierce 2021 CKiD U25 age-dependent K is evaluated at that age. Not the adult 18-120 clamp.","required":true,"schema":{"type":"number"},"example":"10"},{"in":"query","name":"sex","description":"Sex used by Pierce 2021 Table 2 K. female or male.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"height_cm","description":"Height in centimeters (50-250). Required with creatinine for the creatinine or combined path. Converted to meters in the equation. Provide height_cm or height_in. Not required for cystatin-only.","required":false,"schema":{"type":"number"},"example":"140"},{"in":"query","name":"height_in","description":"Height in inches (20-98). Converted as cm = in * 2.54.","required":false,"schema":{"type":"number"},"example":"55.1181"},{"in":"query","name":"creatinine_mg_dl","description":"Serum creatinine in mg/dL (0.1-20). Required with height for the creatinine or combined path. Provide this or creatinine_umol_l.","required":false,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"creatinine_umol_l","description":"Serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42.","required":false,"schema":{"type":"number"},"example":"88.42"},{"in":"query","name":"cystatin_c_mg_l","description":"Serum cystatin C in mg/L (0.2-10). Required for the cystatin-only or combined path. Height is not required when this is the only marker.","required":false,"schema":{"type":"number"},"example":"1.0"}],"summary":"CKiD U25 eGFR","operationId":"get_api_calc_ckid_u25","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, sex, height_cm, creatinine_mg_dl, cystatin_c_mg_l, k_cr, k_cys, egfr_ml_min_1_73m2, units, citation, disclaimer."},"400":{"description":"invalid_ckid_u25: CKiD U25 needs age 1-25, sex, and either height plus creatinine, cystatin C, or both, as used in Pierce 2021. Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_height: height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_cystatin_c: cystatin_c_mg_l must be a number from 0.2 to 10. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ckid-u25"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CKiD U25 eGFR (bulk)","operationId":"post_api_calc_ckid_u25","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ckid_u25: CKiD U25 needs age 1-25, sex, and either height plus creatinine, cystatin C, or both, as used in Pierce 2021. Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_height: height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_cystatin_c: cystatin_c_mg_l must be a number from 0.2 to 10. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ckid-u25"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_years":"10","creatinine_mg_dl":"1.0","height_cm":"140","sex":"male"},{"age_years":"10","creatinine_mg_dl":"1.0","height_cm":"140","sex":"male"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ecog":{"get":{"description":"Return the Oken 1982 ECOG performance status grade 0-4 from a caller-assigned integer, with a stable label.\n\nWhen an agent already has an ECOG grade 0-4 as in Oken 1982 and needs the published score and label. magent does not observe the patient or assign performance status. Not Karnofsky.\n\nNot a medical device and not a performance-status assignment. magent does not observe the patient.\n\nOken 1982 grades 0-4 only. Grade 5 (dead) is not scored.\n\nThe caller assigns ecog 0-4. magent does not examine the patient or convert Karnofsky scores. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ecog","description":"Oken 1982 ECOG performance status 0-4 as assigned by the caller (0 fully active; 1 restricted strenuous activity, ambulatory, light work; 2 ambulatory, all self-care, unable to work, up >50% waking hours; 3 limited self-care, bed/chair >50% waking hours; 4 completely disabled, no self-care, totally bed/chair). Grade 5 (dead) is not scored. magent does not observe the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"ECOG","operationId":"get_api_calc_ecog","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, ecog_grade, ecog_label, components, citation, disclaimer."},"400":{"description":"invalid_ecog_ps: ecog must be an integer from 0 to 4 (Oken 1982). Grade 5 (dead) is not scored. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ecog"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ECOG (bulk)","operationId":"post_api_calc_ecog","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ecog_ps: ecog must be an integer from 0 to 4 (Oken 1982). Grade 5 (dead) is not scored. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ecog"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ecog":"0"},{"ecog":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/chads2":{"get":{"description":"Compute the CHADS2 stroke-risk score from discrete clinical flags.\n\nWhen an agent needs the 2001 Gage CHADS2 total and must not invent points from a chart narrative.\n\nNot a diagnosis and not an anticoagulation order or treatment recommendation.\n\nCHA2DS2-VASc superseded CHADS2 for many guidelines; magent still ships the 2001 score as published.\n\nFlags are caller-supplied booleans. magent does not infer CHF or stroke history from text. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). ≥75 scores 1.","required":true,"schema":{"type":"integer"},"example":"78"},{"in":"query","name":"chf","description":"Congestive heart failure or LV dysfunction. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypertension","description":"Hypertension history. true or false.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"diabetes","description":"Diabetes mellitus. true or false.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"stroke_tia","description":"Prior stroke or TIA. true or false (2 points).","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"CHADS2","operationId":"get_api_calc_chads2","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/chads2"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CHADS2 (bulk)","operationId":"post_api_calc_chads2","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/chads2"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"78","chf":"false","diabetes":"true","hypertension":"true","stroke_tia":"false"},{"age":"78","chf":"false","diabetes":"true","hypertension":"true","stroke_tia":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-fd":{"get":{"description":"Apply the Stanghellini 2016 Rome IV B1 functional dyspepsia criteria and return whether PDS (B1a), EPS (B1b), and the published FD box hold (rome_iv_fd).\n\nWhen an agent already has the six caller-assigned Stanghellini 2016 Rome IV B1 flags and needs whether PDS, EPS, and the published FD box hold. magent does not examine the patient.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose functional dyspepsia, PDS, or EPS.\n\nThe caller assigns the six flags, including PDS frequency (at least 3 days per week), EPS frequency (at least 1 day per week), and whether structural disease is absent at upper endoscopy. magent does not examine the patient or interpret endoscopy.\n\nThis tool is Stanghellini 2016 Rome IV B1 functional dyspepsia with B1a PDS and/or B1b EPS only. Overlap is allowed. Meeting cardinal symptoms without a subtype is not enough. Not Rome III dyspepsia. Not Rome IV IBS (Mearin 2016). Does not implement belching disorders, cannabinoid hyperemesis, or rumination. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"criteria_last_3_months_onset_6_months","description":"Criteria fulfilled for the last 3 months with symptom onset at least 6 months prior to diagnosis, as assigned (Stanghellini 2016 B1). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"no_structural_disease","description":"No evidence of structural disease (including at upper endoscopy) likely to explain the symptoms, as assigned by the caller (Stanghellini 2016 B1). true or false. magent does not examine the patient or interpret endoscopy.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"bothersome_postprandial_fullness_ge_3_days_week","description":"Bothersome postprandial fullness at least 3 days per week (B1a PDS item; one or both PDS items required for PDS). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"bothersome_early_satiation_ge_3_days_week","description":"Bothersome early satiation at least 3 days per week (B1a PDS item; one or both PDS items required for PDS). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bothersome_epigastric_pain_ge_1_day_week","description":"Bothersome epigastric pain at least 1 day per week (B1b EPS item; one or both EPS items required for EPS). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"bothersome_epigastric_burning_ge_1_day_week","description":"Bothersome epigastric burning at least 1 day per week (B1b EPS item; one or both EPS items required for EPS). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Rome IV FD","operationId":"get_api_calc_rome_iv_fd","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, pds, eps, rome_iv_fd, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-fd"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV FD (bulk)","operationId":"post_api_calc_rome_iv_fd","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-fd"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bothersome_early_satiation_ge_3_days_week":"false","bothersome_epigastric_burning_ge_1_day_week":"false","bothersome_epigastric_pain_ge_1_day_week":"false","bothersome_postprandial_fullness_ge_3_days_week":"true","criteria_last_3_months_onset_6_months":"true","no_structural_disease":"true"},{"bothersome_early_satiation_ge_3_days_week":"false","bothersome_epigastric_burning_ge_1_day_week":"false","bothersome_epigastric_pain_ge_1_day_week":"false","bothersome_postprandial_fullness_ge_3_days_week":"true","criteria_last_3_months_onset_6_months":"true","no_structural_disease":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/nihss":{"get":{"description":"Sum Brott 1989 NIH stroke scale points from 15 caller-assigned examination integers, including pupillary response and plantar reflex. Weaker-limb motor arm and leg. Does not apply later total-score severity bands.\n\nWhen an agent already has Brott 1989 15-item integers and needs that published total. magent does not examine the patient, score the later NINDS 11-category form, score mNIHSS, or issue a tPA order.\n\nNot a medical device. magent does not examine the patient. Each item is a caller-assigned Brott 1989 integer.\n\nThis is the Brott 1989 15-item neurologic examination scale, including pupillary response and plantar reflex, with one motor arm and one motor leg (weaker limb). It is not the later NINDS 11-category form that dropped pupil and split motor left/right. Not mNIHSS. Not a tPA order.\n\nBrott 1989 published no total-score mild/moderate/severe cutoffs. This tool returns score and max_score only. It does not apply later 5/15/20 website cuts. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"loc","description":"Caller-assigned Brott 1989 level of consciousness (integer 0-3): 0 alert, 1 drowsy, 2 stuporous, 3 coma. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"loc_questions","description":"Caller-assigned Brott 1989 LOC questions (integer 0-2): 0 answers both correctly, 1 answers one correctly, 2 incorrect. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"loc_commands","description":"Caller-assigned Brott 1989 LOC commands (integer 0-2): 0 obeys both correctly, 1 obeys one correctly, 2 incorrect. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"pupillary_response","description":"Caller-assigned Brott 1989 pupillary response (integer 0-2): 0 both reactive, 1 one reactive, 2 neither reactive. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"best_gaze","description":"Caller-assigned Brott 1989 best gaze (integer 0-2): 0 normal, 1 partial gaze palsy, 2 forced deviation. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"best_visual","description":"Caller-assigned Brott 1989 best visual (integer 0-2): 0 no visual loss, 1 partial hemianopia, 2 complete hemianopia. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"facial_palsy","description":"Caller-assigned Brott 1989 facial palsy (integer 0-3): 0 normal, 1 minor, 2 partial, 3 complete. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"best_motor_arm","description":"Caller-assigned Brott 1989 best motor arm, weaker limb (integer 0-4): 0 no drift, 1 drift, 2 cannot resist gravity, 3 no effort, 4 no movement. Not left and right separately. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"best_motor_leg","description":"Caller-assigned Brott 1989 best motor leg, weaker limb (integer 0-3): 0 no drift, 1 drift, 2 cannot resist gravity, 3 no effort. Not left and right separately. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"plantar_reflex","description":"Caller-assigned Brott 1989 plantar reflex (integer 0-3): 0 normal, 1 equivocal, 2 extensor, 3 bilateral extensor. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"},{"in":"query","name":"limb_ataxia","description":"Caller-assigned Brott 1989 limb ataxia (integer 0-2): 0 absent, 1 present in upper or lower, 2 present in both. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"sensory","description":"Caller-assigned Brott 1989 sensory (integer 0-2): 0 normal, 1 partial loss, 2 dense loss. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"neglect","description":"Caller-assigned Brott 1989 neglect (integer 0-2): 0 no neglect, 1 partial neglect, 2 complete neglect. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"dysarthria","description":"Caller-assigned Brott 1989 dysarthria (integer 0-2): 0 normal articulation, 1 mild to moderate, 2 near unintelligible or worse. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2]},"example":"0"},{"in":"query","name":"best_language","description":"Caller-assigned Brott 1989 best language (integer 0-3): 0 no aphasia, 1 mild to moderate, 2 severe aphasia, 3 mute. magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,1,2,3]},"example":"0"}],"summary":"NIHSS","operationId":"get_api_calc_nihss","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_nihss_item: Each Brott 1989 NIH stroke scale item must be an integer in that paper's published range. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nihss"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"NIHSS (bulk)","operationId":"post_api_calc_nihss","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_nihss_item: Each Brott 1989 NIH stroke scale item must be an integer in that paper's published range. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nihss"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"best_gaze":"0","best_language":"0","best_motor_arm":"0","best_motor_leg":"0","best_visual":"0","dysarthria":"0","facial_palsy":"0","limb_ataxia":"0","loc":"0","loc_commands":"0","loc_questions":"0","neglect":"0","plantar_reflex":"0","pupillary_response":"0","sensory":"0"},{"best_gaze":"0","best_language":"0","best_motor_arm":"0","best_motor_leg":"0","best_visual":"0","dysarthria":"0","facial_palsy":"0","limb_ataxia":"0","loc":"0","loc_commands":"0","loc_questions":"0","neglect":"0","plantar_reflex":"0","pupillary_response":"0","sensory":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mtoq-4":{"get":{"description":"Sum four caller-assigned Lipton 2015 mTOQ-4 frequency items and return the 0-8 total and published treatment-efficacy bands.\n\nWhen an agent has already assigned the four Lipton 2015 frequency tokens and needs the published mTOQ-4 total and efficacy band, not a migraine diagnosis, abortive-drug order, or patient interview.\n\nNot a medical device and not a diagnosis.\n\nNot an abortive-drug order.\n\nmagent does not interview the patient.\n\npain_free_2h, sustained_24h, able_to_plan, and in_control are caller-assigned Lipton 2015 frequency tokens (never=0, rarely=0, less_than_half=1, half_or_greater=2). magent does not assign the frequencies.\n\nThis is the 4-item Lipton 2015 instrument only (table e-1 / methods cuts very_poor 0, poor 1-5, moderate 6-7, maximum 8). magent does not score the 19-item or 6-item mTOQ. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"pain_free_2h","description":"Caller-assigned Lipton 2015 mTOQ-4 item 1. After taking your migraine medication, are you pain-free within 2 hours for most attacks? never=0, rarely=0, less_than_half=1, half_or_greater=2. magent does not interview the patient.","required":true,"schema":{"type":"string","enum":["never","rarely","less_than_half","half_or_greater"]},"example":"never"},{"in":"query","name":"sustained_24h","description":"Caller-assigned Lipton 2015 mTOQ-4 item 2. Does one dose of your migraine medication usually relieve your headache and keep it away for at least 24 hours? never=0, rarely=0, less_than_half=1, half_or_greater=2. magent does not interview the patient.","required":true,"schema":{"type":"string","enum":["never","rarely","less_than_half","half_or_greater"]},"example":"never"},{"in":"query","name":"able_to_plan","description":"Caller-assigned Lipton 2015 mTOQ-4 item 3. Are you comfortable enough with your migraine medication to be able to plan your daily activities? never=0, rarely=0, less_than_half=1, half_or_greater=2. magent does not interview the patient.","required":true,"schema":{"type":"string","enum":["never","rarely","less_than_half","half_or_greater"]},"example":"never"},{"in":"query","name":"in_control","description":"Caller-assigned Lipton 2015 mTOQ-4 item 4. After taking your migraine medication, do you feel in control of your migraines enough so that you feel you can return to normal function? never=0, rarely=0, less_than_half=1, half_or_greater=2. magent does not interview the patient.","required":true,"schema":{"type":"string","enum":["never","rarely","less_than_half","half_or_greater"]},"example":"never"}],"summary":"mTOQ-4","operationId":"get_api_calc_mtoq_4","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, treatment_efficacy, components, citation, disclaimer."},"400":{"description":"invalid_mtoq4: mTOQ-4 items must each be never, rarely, less_than_half, or half_or_greater (Lipton 2015). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mtoq-4"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"mTOQ-4 (bulk)","operationId":"post_api_calc_mtoq_4","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_mtoq4: mTOQ-4 items must each be never, rarely, less_than_half, or half_or_greater (Lipton 2015). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mtoq-4"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"able_to_plan":"never","in_control":"never","pain_free_2h":"never","sustained_24h":"never"},{"able_to_plan":"never","in_control":"never","pain_free_2h":"never","sustained_24h":"never"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/wells-pe":{"get":{"description":"Compute the Wells pulmonary-embolism probability score and return three-tier and two-tier bands.\n\nWhen an agent needs the published Wells PE arithmetic and must not invent a probability from prose.\n\nNot a diagnosis. Bands are published cut-points, not a PE rule-out.\n\nFlags are caller-supplied booleans. magent does not read imaging or D-dimer. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"signs_dvt","description":"Clinical signs and symptoms of DVT (3 points).","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"pe_number_one","description":"PE is the number-one diagnosis or equally likely (3 points).","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"hr_gt_100","description":"Heart rate >100 (1.5 points).","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"immobilization_or_surgery","description":"Immobilization ≥3 days or surgery in previous 4 weeks (1.5 points).","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"previous_dvt_pe","description":"Previous DVT or PE (1.5 points).","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hemoptysis","description":"Hemoptysis (1 point).","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"malignancy","description":"Malignancy with treatment in last 6 months or palliative (1 point).","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Wells PE","operationId":"get_api_calc_wells_pe","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, three_tier, two_tier, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/wells-pe"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Wells PE (bulk)","operationId":"post_api_calc_wells_pe","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/wells-pe"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"hemoptysis":"false","hr_gt_100":"false","immobilization_or_surgery":"false","malignancy":"false","pe_number_one":"true","previous_dvt_pe":"false","signs_dvt":"true"},{"hemoptysis":"false","hr_gt_100":"false","immobilization_or_surgery":"false","malignancy":"false","pe_number_one":"true","previous_dvt_pe":"false","signs_dvt":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/nci-ctc-stomatitis":{"get":{"description":"Apply NCI CTC v2.0 Stomatitis/pharyngitis (oral/pharyngeal mucositis) (Trotti 2000; CTC 30 April 1999) and return grade 0–4 from a caller-assigned oral/pharyngeal appearance token. magent does not examine the mucosa.\n\nWhen an agent already has a caller-assigned NCI CTC v2.0 stomatitis/pharyngitis appearance (none, painless_or_mild_soreness, painful_can_eat, painful_cannot_eat, or parenteral_or_prophylactic_intubation) and needs the published grade. Not NCI CTC v2.0 Mucositis due to radiation (use nci-ctc-mucositis), not CTCAE v4/v5 as a full catalog, and not WHO mucositis.\n\nNot a medical device.\n\nNot a diagnosis. magent does not examine the mucosa. The caller assigns appearance.\n\nNCI CTC v2.0 Stomatitis/pharyngitis (oral/pharyngeal mucositis, 30 April 1999) only. Not NCI CTC v2.0 Mucositis due to radiation (use nci-ctc-mucositis).\n\nNot CTCAE v4 or v5 as a full catalog.\n\nNot WHO mucositis.\n\nGrade 5 (death related to toxicity) is not a token. This tool maps appearance to grades 0–4 only. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"appearance","description":"NCI CTC v2.0 Stomatitis/pharyngitis (oral/pharyngeal mucositis) appearance as assigned by the caller: none (grade 0), painless_or_mild_soreness (grade 1, painless ulcers, erythema, or mild soreness in the absence of lesions), painful_can_eat (grade 2, painful erythema, edema or ulcers, but can eat or swallow), painful_cannot_eat (grade 3, painful erythema, edema or ulcers, and cannot eat or swallow), or parenteral_or_prophylactic_intubation (grade 4, severe ulceration or requires parenteral or enteral support or prophylactic intubation). Case-insensitive. Not CTC Mucositis due to radiation. magent does not examine the mucosa.","required":true,"schema":{"type":"string"},"example":"painless_or_mild_soreness"}],"summary":"NCI CTC stomatitis","operationId":"get_api_calc_nci_ctc_stomatitis","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, appearance, grade, description, criteria, citation, disclaimer."},"400":{"description":"invalid_stomatitis_appearance: appearance must be none, painless_or_mild_soreness, painful_can_eat, painful_cannot_eat, or parenteral_or_prophylactic_intubation (NCI CTC v2.0 stomatitis/pharyngitis). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nci-ctc-stomatitis"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"NCI CTC stomatitis (bulk)","operationId":"post_api_calc_nci_ctc_stomatitis","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_stomatitis_appearance: appearance must be none, painless_or_mild_soreness, painful_can_eat, painful_cannot_eat, or parenteral_or_prophylactic_intubation (NCI CTC v2.0 stomatitis/pharyngitis). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nci-ctc-stomatitis"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"appearance":"painless_or_mild_soreness"},{"appearance":"painless_or_mild_soreness"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/6mwd":{"get":{"description":"Compute Enright 1998 predicted six-minute walk distance and lower limit of normal from sex, age, height, and weight using the Table 3 height/weight equations.\n\nWhen an agent needs the published predicted 6MWD and LLN and must not time the walk, apply the BMI alternate equations, or invent an 80% or 400 m class.\n\nNot a medical device. Enright 1998 derived the equations in healthy adults aged 40-80. magent does not time the walk.\n\nTable 3 height/weight equations only. Does not apply the BMI alternate equations.\n\nDoes not assign an 80% predicted or 400 m cutoff. Those are not Enright 1998 output bands.\n\nHeight 50-250 cm and weight 1-500 kg are magent clamps via Params; age 40-80 is the paper derivation range. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sex","description":"Sex used by Enright 1998 Table 3 (separate male and female height/weight equations).","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"male"},{"in":"query","name":"age","description":"Age in years (integer 40-80). Enright 1998 derivation range.","required":true,"schema":{"type":"integer"},"example":"50"},{"in":"query","name":"height_cm","description":"Height in centimeters (50-250). Provide height_cm or height_in.","required":false,"schema":{"type":"number"},"example":"170"},{"in":"query","name":"height_in","description":"Height in inches (20-98). Converted as cm = in × 2.54.","required":false,"schema":{"type":"number"},"example":"66.9291"},{"in":"query","name":"weight_kg","description":"Weight in kilograms (1-500). Provide weight_kg or weight_lb.","required":false,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"weight_lb","description":"Weight in pounds (2-1100). Converted as kg = lb × 0.45359237.","required":false,"schema":{"type":"number"},"example":"154.324"},{"in":"query","name":"walked_m","description":"Optional distance walked in meters (0-1500). When present, percent_predicted = walked_m / predicted_m × 100. magent does not time the walk.","required":false,"schema":{"type":"number"},"example":"400"}],"summary":"Predicted 6MWD","operationId":"get_api_calc_6mwd","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, sex, age_years, height_cm, weight_kg, predicted_m, lln_m, walked_m, percent_predicted, citation, disclaimer."},"400":{"description":"invalid_6mwd: Predicted 6MWD needs sex, age 40-80, height, and weight as used in Enright 1998; optional walked_m is a non-negative distance in meters. Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_height: height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_walked_m: walked_m must be a number from 0 to 1500. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/6mwd"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Predicted 6MWD (bulk)","operationId":"post_api_calc_6mwd","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_6mwd: Predicted 6MWD needs sex, age 40-80, height, and weight as used in Enright 1998; optional walked_m is a non-negative distance in meters. Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_height: height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_walked_m: walked_m must be a number from 0 to 1500. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/6mwd"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"50","height_cm":"170","sex":"male","weight_kg":"70"},{"age":"50","height_cm":"170","sex":"male","weight_kg":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/gillmore":{"get":{"description":"Apply the Gillmore 2018 National Amyloidosis Centre (NAC) three-stage system for cardiac transthyretin amyloidosis from NT-proBNP and caller-assigned eGFR.\n\nWhen an agent has caller-supplied NT-proBNP (ng/L) and eGFR and needs the published Gillmore 2018 NAC ATTR stage for ATTRwt or ATTRv. Not Mayo AL amyloid staging. Not NYHA. magent does not compute MDRD or CKD-EPI.\n\nNot a medical device. magent does not examine the patient and does not assay NT-proBNP or eGFR.\n\nThis is Gillmore 2018 NAC ATTR staging only. It is not Mayo AL amyloid staging. It is not NYHA class.\n\nmagent does not compute MDRD or CKD-EPI. The caller assigns egfr_ml_min_1_73m2 (5-200). Race-based MDRD is skipped on purpose.\n\nNot a treatment order. This tool does not recommend tafamidis or any other therapy. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"nt_probnp_ng_l","description":"NT-proBNP in ng/L (10-100000), same numeric value as pg/mL. Gillmore 2018 Stage I requires <= 3000; Stage III when > 3000. magent does not assay NT-proBNP.","required":true,"schema":{"type":"number"},"example":"500"},{"in":"query","name":"egfr_ml_min_1_73m2","description":"Caller-assigned eGFR in mL/min/1.73m² (5-200). Gillmore 2018 Stage I requires >= 45; Stage III when < 45. magent does not compute MDRD or CKD-EPI.","required":true,"schema":{"type":"number"},"example":"70"}],"summary":"Gillmore","operationId":"get_api_calc_gillmore","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, nt_probnp_ng_l, egfr_ml_min_1_73m2, gillmore_stage, gillmore_stage_label, criteria, citation, disclaimer."},"400":{"description":"invalid_nt_probnp: nt_probnp_ng_l must be a number from 10 to 100000 (NT-proBNP ng/L = pg/mL; Gillmore 2018 NAC ATTR stage). Returned before settlement; you are not charged.; invalid_egfr: egfr_ml_min_1_73m2 must be a number from 5 to 200 (caller-assigned eGFR; magent does not compute MDRD or CKD-EPI). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gillmore"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Gillmore (bulk)","operationId":"post_api_calc_gillmore","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_nt_probnp: nt_probnp_ng_l must be a number from 10 to 100000 (NT-proBNP ng/L = pg/mL; Gillmore 2018 NAC ATTR stage). Returned before settlement; you are not charged.; invalid_egfr: egfr_ml_min_1_73m2 must be a number from 5 to 200 (caller-assigned eGFR; magent does not compute MDRD or CKD-EPI). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gillmore"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"egfr_ml_min_1_73m2":"70","nt_probnp_ng_l":"500"},{"egfr_ml_min_1_73m2":"70","nt_probnp_ng_l":"500"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ed-buprenorphine":{"get":{"description":"Return the D'Onofrio 2015 emergency-department-initiated buprenorphine milligram for protocol day 1, 2, or 3: 8 mg on day 1 and 16 mg on days 2 and 3.\n\nWhen an agent needs the published D'Onofrio 2015 take-home milligram schedule for ED-initiated buprenorphine on protocol day 1, 2, or 3 and must not invent a home-induction tree, score COWS, or name a product brand.\n\nNot a medical device. Deterministic published-schedule output only.\n\nNot a prescription. magent does not name a product, route, or formulation.\n\nNot an X-waiver or induction algorithm beyond the trial's day-1 8 mg and day-2/3 16 mg take-home schedule.\n\nmagent does not score COWS. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"day","description":"D'Onofrio 2015 protocol day 1, 2, or 3. Day 1 is 8 mg. Days 2 and 3 are 16 mg. Not a home-induction tree. magent does not score COWS.","required":true,"schema":{"type":"integer"},"example":"1"}],"summary":"ED-initiated buprenorphine","operationId":"get_api_calc_ed_buprenorphine","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, day, dose_mg, citation, disclaimer."},"400":{"description":"invalid_ed_buprenorphine: ED buprenorphine day must be 1, 2, or 3 as published in D'Onofrio 2015. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ed-buprenorphine"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ED-initiated buprenorphine (bulk)","operationId":"post_api_calc_ed_buprenorphine","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ed_buprenorphine: ED buprenorphine day must be 1, 2, or 3 as published in D'Onofrio 2015. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ed-buprenorphine"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"day":"1"},{"day":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/figo-ovarian":{"get":{"description":"Echo the caller-assigned Prat 2014 FIGO stage for cancer of the ovary, fallopian tube, and peritoneum and return the published defining-features description. magent does not read imaging or pathology.\n\nWhen an agent already has a Prat 2014 FIGO ovarian, tubal, or peritoneal stage token as assigned by the caller and needs the canonical token and published description. magent does not stage from raw findings, apply AJCC TNM, or assign endometrial or cervical FIGO.\n\nNot a medical device. magent does not read imaging or pathology.\n\nThe caller assigns stage as a Prat 2014 FIGO token. magent does not stage from raw findings and does not apply AJCC TNM separately.\n\nPrat 2014 tokens only (IA through IVB, including IC1-IC3 and IIIA1i/IIIA1ii). 2014 eliminated IIC; IIC is not a valid token.\n\nNot endometrial FIGO and not cervical FIGO. Not a diagnosis of ovarian, tubal, or peritoneal cancer. Not a treatment order. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"stage","description":"Prat 2014 FIGO token as assigned by the caller: IA, IB, IC1, IC2, IC3, IIA, IIB, IIIA1i, IIIA1ii, IIIA2, IIIB, IIIC, IVA, or IVB. Case-insensitive accept; returned canonical form keeps lowercase i/ii on IIIA1i and IIIA1ii. IIC is not valid (eliminated in 2014). Not endometrial or cervical FIGO. magent does not read imaging or pathology.","required":true,"schema":{"type":"string"},"example":"IA"}],"summary":"FIGO ovarian","operationId":"get_api_calc_figo_ovarian","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, stage, description, components, citation, disclaimer."},"400":{"description":"invalid_figo_ovarian: FIGO ovarian 2014 needs stage as a Prat 2014 token (IA through IVB, including IC1-IC3 and IIIA1i/ii). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/figo-ovarian"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"FIGO ovarian (bulk)","operationId":"post_api_calc_figo_ovarian","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_figo_ovarian: FIGO ovarian 2014 needs stage as a Prat 2014 token (IA through IVB, including IC1-IC3 and IIIA1i/ii). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/figo-ovarian"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"stage":"IA"},{"stage":"IA"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/nice-pediatric-iv":{"get":{"description":"Compute NICE NG29 routine IV maintenance for children and young people from Holliday–Segar daily volume, the 1.4.1 sex cap, and the 1.4.9 ADH-risk restriction.\n\nWhen an agent needs NICE NG29 1.4.1/1.4.9 pediatric maintenance milliliters for children and young people and must not invent a volume, apply unreduced Holliday–Segar, use neonate day-of-life table 1.4.2, or apply adult CG174.\n\nNot a medical device. Deterministic published-formula output only.\n\nNot a treatment order or IV prescription. Does not choose fluid type, electrolyte additives, or infusion-rate safety limits.\n\nChildren and young people only (NICE NG29 1.4.1 and 1.4.9). Does not implement the term-neonate day-of-life table in 1.4.2.\n\nApplies the 1.4.1 24-hour caps (males rarely need more than 2500 mL; females rarely need more than 2000 mL) and optional 1.4.9 restriction at 50%, 80%, or 100% of the capped volume. This is not unreduced Holliday–Segar (maintenance-fluids) and not adult NICE CG174.\n\nHourly milliliters are restricted_ml / 24 to 1 decimal. The later bedside 4-2-1 mL/kg/h rule is not applied. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"weight_kg","description":"Weight in kilograms (1-500). Provide weight_kg or weight_lb.","required":false,"schema":{"type":"number"},"example":"30"},{"in":"query","name":"weight_lb","description":"Weight in pounds (2-1100). Converted as kg = lb * 0.45359237.","required":false,"schema":{"type":"number"},"example":"66.1387"},{"in":"query","name":"sex","description":"Sex for the NICE NG29 1.4.1 24-hour cap (female 2000 mL; male 2500 mL).","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"restriction_percent","description":"NICE NG29 1.4.9 ADH-risk restriction as a percent of the capped daily volume. 50, 80, or 100 (100 = no restriction).","required":true,"schema":{"type":"integer","enum":[50,80,100]},"example":"100"}],"summary":"NICE pediatric IV","operationId":"get_api_calc_nice_pediatric_iv","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, weight_kg, sex, restriction_percent, holliday_ml, capped_ml, restricted_ml, hourly_ml, citation, disclaimer."},"400":{"description":"invalid_nice_pediatric_iv: NICE NG29 pediatric maintenance inputs must match Holliday-Segar weight, sex for the 2000/2500 mL cap, and restriction_percent 50, 80, or 100 from that guideline. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nice-pediatric-iv"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"NICE pediatric IV (bulk)","operationId":"post_api_calc_nice_pediatric_iv","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_nice_pediatric_iv: NICE NG29 pediatric maintenance inputs must match Holliday-Segar weight, sex for the 2000/2500 mL cap, and restriction_percent 50, 80, or 100 from that guideline. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/nice-pediatric-iv"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"restriction_percent":"100","sex":"female","weight_kg":"30"},{"restriction_percent":"100","sex":"female","weight_kg":"30"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/gcs":{"get":{"description":"Compute the Glasgow Coma Scale as the sum of caller-assigned eye, verbal, and motor integers. The 1974 or 1976 edition is required.\n\nWhen an agent needs a published Teasdale-Jennett GCS total and must not silently pick the 1974 five-point motor scale or the 1976 six-point motor scale.\n\nNot a diagnosis and not a trauma triage, intubation, or disposition order.\n\nEye, verbal, and motor are caller-supplied integers. magent does not observe the three signs.\n\nedition is required. magent does not pick 1974 (motor 1-5, max 14) or 1976 (motor 1-6, max 15). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"eye","description":"Eye opening (E). Integer 1-4 as assigned by the caller.","required":true,"schema":{"type":"integer"},"example":"4"},{"in":"query","name":"verbal","description":"Verbal response (V). Integer 1-5 as assigned by the caller.","required":true,"schema":{"type":"integer"},"example":"5"},{"in":"query","name":"motor","description":"Motor response (M). Integer 1-5 when edition=1974, or 1-6 when edition=1976, as assigned by the caller.","required":true,"schema":{"type":"integer"},"example":"6"},{"in":"query","name":"edition","description":"Published motor scale. Required; magent does not pick 1974 (motor 1-5) or 1976 (motor 1-6).","required":true,"schema":{"type":"string","enum":["1974","1976"]},"example":"1976"}],"summary":"Glasgow Coma Scale","operationId":"get_api_calc_gcs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, edition, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_gcs_component: eye (1-4), verbal (1-5), and motor (1-5 for edition=1974, 1-6 for edition=1976) must each be integers in range. Returned before settlement; you are not charged.; invalid_gcs_edition: edition must be 1974 or 1976. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gcs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Glasgow Coma Scale (bulk)","operationId":"post_api_calc_gcs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_gcs_component: eye (1-4), verbal (1-5), and motor (1-5 for edition=1974, 1-6 for edition=1976) must each be integers in range. Returned before settlement; you are not charged.; invalid_gcs_edition: edition must be 1974 or 1976. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gcs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"edition":"1976","eye":"4","motor":"6","verbal":"5"},{"edition":"1976","eye":"4","motor":"6","verbal":"5"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/burch-wartofsky":{"get":{"description":"Sum Burch 1993 thyroid-storm points from temperature, CNS effects, GI-hepatic dysfunction, heart rate, heart failure, atrial fibrillation, and precipitating event and return unlikely (<25), impending (25–44), or highly suggestive (≥45).\n\nWhen an agent needs the published Burch 1993 point total and <25 / 25–44 / ≥45 bands and must not invent a thyroid-storm diagnosis, ICU order, or a heart-rate table that starts at 99.\n\nNot a medical device and not a thyroid-storm diagnosis or ICU/treatment order. magent does not measure temperature or an ECG.\n\nTemperature uses Burch 1993 Fahrenheit bins. Provide temperature_f (90–110) or temperature_c (32.2–43.3), not both. °C is converted F = C×9/5+32, then scored on the °F table.\n\nHeart-rate bins start at 90 bpm (<90 → 0, 90–109 → 5), not 99. CNS, GI-hepatic, heart-failure grade, atrial fibrillation, and precipitating event are caller-assigned.\n\nBands are <25 unlikely, 25–44 impending, and ≥45 highly suggestive of thyroid storm. Score 45 is highly suggestive. The total is not a diagnosis or treatment order. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"temperature_f","description":"Temperature in °F (90-110). Provide this or temperature_c, not both. Burch 1993: <99.0 → 0, 99.0-99.9 → 5, 100.0-100.9 → 10, 101.0-101.9 → 15, 102.0-102.9 → 20, 103.0-103.9 → 25, ≥104.0 → 30. magent does not measure temperature.","required":false,"schema":{"type":"number"},"example":"98.6"},{"in":"query","name":"temperature_c","description":"Temperature in °C (32.2-43.3). Converted as F = C×9/5+32, then scored on the Burch 1993 Fahrenheit table. Provide this or temperature_f, not both. magent does not measure temperature.","required":false,"schema":{"type":"number"},"example":"37.0"},{"in":"query","name":"cns_effects","description":"Caller-assigned CNS effects (Burch 1993). none → 0; mild (agitation) → 10; moderate (delirium, psychosis, extreme lethargy) → 20; severe (seizure or coma) → 30. magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["none","mild","moderate","severe"]},"example":"none"},{"in":"query","name":"gi_hepatic","description":"Caller-assigned GI-hepatic dysfunction (Burch 1993). none → 0; moderate (diarrhea, nausea/vomiting, abdominal pain) → 10; severe (unexplained jaundice) → 20. magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["none","moderate","severe"]},"example":"none"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats/min (integer 30-220). Burch 1993: <90 → 0, 90-109 → 5, 110-119 → 10, 120-129 → 15, 130-139 → 20, ≥140 → 25. Bins start at 90, not 99. magent does not read an ECG.","required":true,"schema":{"type":"integer"},"example":"80"},{"in":"query","name":"heart_failure","description":"Caller-assigned heart-failure grade (Burch 1993). none → 0; mild (pedal edema) → 5; moderate (bibasilar rales) → 10; severe (pulmonary edema) → 15. magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["none","mild","moderate","severe"]},"example":"none"},{"in":"query","name":"atrial_fibrillation","description":"Atrial fibrillation as assigned by the caller (true or false). Burch 1993: true → 10. magent does not read an ECG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"precipitating_event","description":"Precipitating event as assigned by the caller (true or false). Burch 1993: true → 10. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Burch–Wartofsky","operationId":"get_api_calc_burch_wartofsky","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, bwps_band, temperature_f, cns_effects, gi_hepatic, heart_rate_bpm, heart_failure, atrial_fibrillation, precipitating_event, components, citation, disclaimer."},"400":{"description":"invalid_bwps_temperature: temperature_f (90-110) or temperature_c (32.2-43.3) is required, not both (Burch 1993). Returned before settlement; you are not charged.; invalid_cns_effects: cns_effects must be none, mild, moderate, or severe (Burch 1993). Returned before settlement; you are not charged.; invalid_gi_hepatic: gi_hepatic must be none, moderate, or severe (Burch 1993). Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_heart_failure_grade: heart_failure must be none, mild, moderate, or severe (Burch 1993). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/burch-wartofsky"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Burch–Wartofsky (bulk)","operationId":"post_api_calc_burch_wartofsky","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_bwps_temperature: temperature_f (90-110) or temperature_c (32.2-43.3) is required, not both (Burch 1993). Returned before settlement; you are not charged.; invalid_cns_effects: cns_effects must be none, mild, moderate, or severe (Burch 1993). Returned before settlement; you are not charged.; invalid_gi_hepatic: gi_hepatic must be none, moderate, or severe (Burch 1993). Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_heart_failure_grade: heart_failure must be none, mild, moderate, or severe (Burch 1993). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/burch-wartofsky"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"atrial_fibrillation":"false","cns_effects":"none","gi_hepatic":"none","heart_failure":"none","heart_rate_bpm":"80","precipitating_event":"false","temperature_f":"98.6"},{"atrial_fibrillation":"false","cns_effects":"none","gi_hepatic":"none","heart_failure":"none","heart_rate_bpm":"80","precipitating_event":"false","temperature_f":"98.6"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ort-oud":{"get":{"description":"Sum nine unweighted Cheatle 2019 ORT-OUD yes/no flags and return oud_class non_oud (0-2) or oud (>=3).\n\nWhen an agent has already assigned the nine Cheatle 2019 flags and needs the published unweighted 0-9 total and cutoff, not Webster 2005 weighted ORT, not an interview, and not a diagnosis of opioid use disorder.\n\nNot a medical device.\n\nNot a diagnosis of opioid use disorder (OUD).\n\nNot Webster 2005 weighted ORT (that is magent slug ort). Cheatle 2019 dropped sex-specific weights and the preadolescent sexual abuse item.\n\nCheatle 2019 enrolled only Caucasian patients of European descent (parent-study genotype design). That is a population limit, not a race coefficient; magent does not take a race input.\n\nThe caller assigns each flag. magent does not interview the patient.\n\nFlags are PHI-adjacent. Persist them only encrypted for the allowlisted console.\n\nAge 16-45 is a yes/no flag, not a numeric age. ADD, OCD, bipolar disorder, or schizophrenia is one flag. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"family_alcohol","description":"Family history of alcohol abuse as assigned by the caller (Cheatle 2019). true scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"family_illegal_drugs","description":"Family history of illegal-drug abuse as assigned by the caller (Cheatle 2019). true scores 1. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"family_prescription_drugs","description":"Family history of prescription-drug abuse as assigned by the caller (Cheatle 2019). true scores 1. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"personal_alcohol","description":"Personal history of alcohol abuse as assigned by the caller (Cheatle 2019). true scores 1. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"personal_illegal_drugs","description":"Personal history of illegal-drug abuse as assigned by the caller (Cheatle 2019). true scores 1. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"personal_prescription_drugs","description":"Personal history of prescription-drug abuse as assigned by the caller (Cheatle 2019). true scores 1. true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"age_16_to_45","description":"Age 16-45 years as a flag, not a numeric age (Cheatle 2019). true scores 1. Assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"add_ocd_bipolar_schizophrenia","description":"ADD, OCD, bipolar disorder, or schizophrenia as one flag (Cheatle 2019). true scores 1. Assigned by the caller. magent does not diagnose.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"depression","description":"Depression as assigned by the caller (Cheatle 2019). true scores 1. magent does not diagnose.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"ORT-OUD","operationId":"get_api_calc_ort_oud","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, oud_class, components, citation, disclaimer."},"400":{"description":"invalid_ort_oud: ORT-OUD needs nine unweighted yes/no flags (Cheatle 2019; no preadolescent-sexual-abuse item). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ort-oud"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ORT-OUD (bulk)","operationId":"post_api_calc_ort_oud","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ort_oud: ORT-OUD needs nine unweighted yes/no flags (Cheatle 2019; no preadolescent-sexual-abuse item). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ort-oud"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"add_ocd_bipolar_schizophrenia":"false","age_16_to_45":"false","depression":"false","family_alcohol":"false","family_illegal_drugs":"false","family_prescription_drugs":"false","personal_alcohol":"false","personal_illegal_drugs":"false","personal_prescription_drugs":"false"},{"add_ocd_bipolar_schizophrenia":"false","age_16_to_45":"false","depression":"false","family_alcohol":"false","family_illegal_drugs":"false","family_prescription_drugs":"false","personal_alcohol":"false","personal_illegal_drugs":"false","personal_prescription_drugs":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/hfa-icos-her2":{"get":{"description":"Classify Lyon 2020 HFA-ICOS baseline cardiovascular risk before HER2-targeted therapy and return low, medium, high, or very high with the expert-opinion cardiotoxicity guide.\n\nWhen an agent already has age, LVEF, and the published HER2-table factors as assigned by the caller and needs the HFA-ICOS class. Not a treatment, hold, or monitoring order.\n\nNot a medical device.\n\nNot a treatment, hold, monitoring, or chemotherapy-order. The cardiotoxicity_guide strings are Lyon 2020 expert-opinion estimates of symptomatic CTRCD, not a patient-specific probability.\n\nmagent does not measure LVEF, troponin, or natriuretic peptides and does not interpret the ECG. Age, LVEF, arrhythmia, biomarkers, and every yes/no factor are caller-assigned.\n\nAge bands are exclusive: ≥80 High; 65-79 Medium 2; younger than 65 none. LVEF <50 is High; 50-54 is Medium 2; ≥55 does not score.\n\nConcurrent anthracycline plus trastuzumab is High (Lyon 2020 footnote f). Sequential anthracycline before HER2-targeted therapy on the current regimen is Medium 1 and is not added when concurrent is true. Prior remote anthracycline for a previous malignancy is Medium 2 (footnote g).\n\nThis tool is the HER2-targeted therapy proforma only. Not the anthracycline, VEGF-inhibitor, RAF-MEK, or BCR-ABL HFA-ICOS tables. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_years","description":"Age in years (integer 18-100). Lyon 2020 exclusive bands: ≥80 is High; 65-79 is Medium 2 (2 points); younger than 65 does not score. Age 80 is High, not Medium 2.","required":true,"schema":{"type":"integer"},"example":50},{"in":"query","name":"lvef_percent","description":"Left-ventricular ejection fraction percent (integer 10-80) as assigned by the caller. <50 is High; 50-54 is Medium 2 (2 points); ≥55 does not score. magent does not measure LVEF.","required":true,"schema":{"type":"integer"},"example":60},{"in":"query","name":"heart_failure_or_cardiomyopathy","description":"Heart failure or cardiomyopathy as assigned by the caller (Lyon 2020 HER2 table Very high). true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"prior_trastuzumab_cardiotoxicity","description":"Prior trastuzumab cardiotoxicity as assigned by the caller (Lyon 2020 HER2 table Very high). true or false. magent does not review prior exposure.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"mi_or_cabg","description":"Prior myocardial infarction or CABG as assigned by the caller (Lyon 2020 HER2 table High). true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"stable_angina","description":"Stable angina as assigned by the caller (Lyon 2020 HER2 table High). true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"severe_valvular_heart_disease","description":"Severe valvular heart disease as assigned by the caller (Lyon 2020 HER2 table High). true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"concurrent_anthracycline_and_her2","description":"Anthracycline and trastuzumab delivered concurrently on the current protocol (Lyon 2020 HER2 table footnote f; High). true or false. When true, anthracycline_before_her2 does not add Medium 1 points.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"arrhythmia","description":"Atrial fibrillation, atrial flutter, VT, or VF as assigned by the caller (Lyon 2020 HER2 table Medium 2). true or false. magent does not interpret the ECG.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"elevated_troponin","description":"Elevated troponin as assigned by the caller (Lyon 2020 HER2 table Medium 2). true or false. magent does not assay troponin.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"elevated_bnp","description":"Elevated BNP or NT-proBNP as assigned by the caller (Lyon 2020 HER2 table Medium 2). true or false. magent does not assay natriuretic peptides.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"prior_remote_anthracycline","description":"Prior remote anthracycline for a previous malignancy, not the current protocol (Lyon 2020 HER2 table footnote g; Medium 2). true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"prior_left_chest_or_mediastinal_rt","description":"Prior left-chest or mediastinal radiotherapy as assigned by the caller (Lyon 2020 HER2 table Medium 2). true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"hypertension","description":"Hypertension as assigned by the caller (Lyon 2020 HER2 table Medium 1). true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"diabetes","description":"Diabetes mellitus as assigned by the caller (Lyon 2020 HER2 table Medium 1). true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"ckd","description":"Chronic kidney disease as assigned by the caller (Lyon 2020 HER2 table Medium 1). true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"anthracycline_before_her2","description":"Current regimen includes anthracycline before HER2-targeted therapy, sequential not concurrent (Lyon 2020 HER2 table Medium 1). true or false. Ignored for points when concurrent_anthracycline_and_her2 is true.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"current_or_significant_smoker","description":"Current or significant smoking history as assigned by the caller (Lyon 2020 HER2 table Medium 1). true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"obesity","description":"Obesity as assigned by the caller (Lyon 2020 HER2 table Medium 1). true or false. magent does not compute BMI.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"HFA-ICOS HER2","operationId":"get_api_calc_hfa_icos_her2","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, medium_points, risk_level, cardiotoxicity_guide, very_high_present, high_present, age_years, lvef_percent, concurrent_anthracycline_and_her2, anthracycline_before_her2, components, citation, disclaimer."},"400":{"description":"invalid_hfa_icos_her2: Lyon 2020 HFA-ICOS HER2-targeted therapy inputs must match that table's age, LVEF, anthracycline timing, and yes/no factors. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hfa-icos-her2"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HFA-ICOS HER2 (bulk)","operationId":"post_api_calc_hfa_icos_her2","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_hfa_icos_her2: Lyon 2020 HFA-ICOS HER2-targeted therapy inputs must match that table's age, LVEF, anthracycline timing, and yes/no factors. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hfa-icos-her2"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_years":"50","anthracycline_before_her2":"false","arrhythmia":"false","ckd":"false","concurrent_anthracycline_and_her2":"false","current_or_significant_smoker":"false","diabetes":"false","elevated_bnp":"false","elevated_troponin":"false","heart_failure_or_cardiomyopathy":"false","hypertension":"false","lvef_percent":"60","mi_or_cabg":"false","obesity":"false","prior_left_chest_or_mediastinal_rt":"false","prior_remote_anthracycline":"false","prior_trastuzumab_cardiotoxicity":"false","severe_valvular_heart_disease":"false","stable_angina":"false"},{"age_years":"50","anthracycline_before_her2":"false","arrhythmia":"false","ckd":"false","concurrent_anthracycline_and_her2":"false","current_or_significant_smoker":"false","diabetes":"false","elevated_bnp":"false","elevated_troponin":"false","heart_failure_or_cardiomyopathy":"false","hypertension":"false","lvef_percent":"60","mi_or_cabg":"false","obesity":"false","prior_left_chest_or_mediastinal_rt":"false","prior_remote_anthracycline":"false","prior_trastuzumab_cardiotoxicity":"false","severe_valvular_heart_disease":"false","stable_angina":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/hear":{"get":{"description":"Compute the HEAR score as age points plus caller-assigned history, ECG, and risk factors (each 0-2). No troponin.\n\nWhen an agent needs the published Smith 2020 HEAR total (HEART without troponin) and must not invent history, ECG, or risk-factor points from a tracing.\n\nNot a medical device. Not a diagnosis or discharge protocol.\n\nhistory, ecg, and risk_factors are caller-assigned integers 0-2. magent does not interpret the history, count risk factors, or read an ECG.\n\nThis is HEAR without troponin (Smith 2020), not the HEART score (Six 2008) and not HEART Pathway. Scores 0 and 1 are the very-low-risk group in that paper (MACE ~0.9%). Do not apply HEART bands 0-3 / 4-6 / 7-10. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Younger than 45 scores 0; 45-64 scores 1; 65 or older scores 2 (same cuts as Six 2008 HEART).","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"history","description":"Caller-assigned history. 0 nonspecific, 1 moderately suspicious, 2 highly suspicious. magent does not interpret the history.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"ecg","description":"Caller-assigned ECG. 0 normal; 1 repolarization without significant ST depression (including BBB, LVH, digoxin, or known unchanged); 2 significant ST depression or elevation without those confounders. magent does not read an ECG.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"risk_factors","description":"Caller-assigned risk-factor points. 0 none, 1 = 1-2 risk factors, 2 = ≥3 or atherosclerotic disease. magent does not count diabetes, smoking, or other factors.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"HEAR score","operationId":"get_api_calc_hear","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, very_low_risk, age_years, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_hear: HEAR inputs must match Smith 2020 history, ECG, age, and risk-factor components from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hear"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HEAR score (bulk)","operationId":"post_api_calc_hear","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_hear: HEAR inputs must match Smith 2020 history, ECG, age, and risk-factor components from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hear"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","ecg":"0","history":"0","risk_factors":"0"},{"age":"40","ecg":"0","history":"0","risk_factors":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/he-macs":{"get":{"description":"Compute the Alghamdi 2019 History and Electrocardiogram-only Manchester Acute Coronary Syndromes (HE-MACS) logistic probability of ACS from age, sex, and caller-assigned observed sweating, acute ECG ischaemia, right-arm or shoulder radiation, vomiting, hypotension (SBP <100 mm Hg), and current tobacco smoking.\n\nWhen an agent already has those Alghamdi 2019 predictors as assigned by the caller and needs the published HE-MACS probability. magent does not interpret an ECG or take a history. Not a diagnosis, discharge protocol, MACS (Body 2014 biomarkers), or T-MACS.\n\nNot a medical device. Not a diagnosis of ACS.\n\nsweating_observed, acute_ecg_ischaemia, pain_radiation_right_arm_or_shoulder, vomiting, hypotension, and current_smoker are caller-assigned. magent does not interpret ECG or take a history.\n\nAge 18–100 years is an implementation clamp. Age enters as a continuous linear predictor (g).\n\nAlghamdi 2019 Table 2 printed HE-MACS coefficients only. Not MACS (Body 2014 biomarkers). Not T-MACS.\n\nFour-group ROC thresholds are in that paper's supplement and are not restated here.\n\nThis tool returns the logistic probability only. It is not a discharge, observation, or rule-out protocol. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years as a continuous linear predictor (g; 18-100, implementation clamp). Alghamdi 2019 Table 2. magent does not read an identity document.","required":true,"schema":{"type":"number"},"example":40},{"in":"query","name":"sex","description":"Sex used as h in Alghamdi 2019 Table 2 (male = 1, female = 0). male or female, case-insensitive. magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"sweating_observed","description":"Sweating observed by the treating clinician as assigned by the caller (a; 1 if true, 0 if false). true or false. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"acute_ecg_ischaemia","description":"Caller-assigned acute ECG ischaemia as used in Alghamdi 2019 (b): ST-deviation or abnormal T inversion (1 if true, 0 if false). magent does not interpret an ECG.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"pain_radiation_right_arm_or_shoulder","description":"Pain radiating to the right arm or shoulder as assigned by the caller (c; Alghamdi 2019). true or false. magent does not take a pain history.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"vomiting","description":"Vomiting associated with the pain as assigned by the caller (d; Alghamdi 2019). true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"hypotension","description":"Hypotension as assigned by the caller (e): systolic BP <100 mm Hg (Alghamdi 2019, dichotomised as in that paper). true or false.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"current_smoker","description":"Current tobacco smoker as assigned by the caller (f; Alghamdi 2019). true or false. magent does not take a smoking history.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"HE-MACS","operationId":"get_api_calc_he_macs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age, sex, sweating_observed, acute_ecg_ischaemia, pain_radiation_right_arm_or_shoulder, vomiting, hypotension, current_smoker, linear_predictor, probability, citation, disclaimer."},"400":{"description":"invalid_he_macs: HE-MACS inputs must match Alghamdi 2019 age, sex, and the six dichotomous history/ECG predictors from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/he-macs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HE-MACS (bulk)","operationId":"post_api_calc_he_macs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_he_macs: HE-MACS inputs must match Alghamdi 2019 age, sex, and the six dichotomous history/ECG predictors from that paper. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/he-macs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"acute_ecg_ischaemia":"false","age":"40","current_smoker":"false","hypotension":"false","pain_radiation_right_arm_or_shoulder":"false","sex":"female","sweating_observed":"false","vomiting":"false"},{"acute_ecg_ischaemia":"false","age":"40","current_smoker":"false","hypotension":"false","pain_radiation_right_arm_or_shoulder":"false","sex":"female","sweating_observed":"false","vomiting":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/webster":{"get":{"description":"Sum ten caller-assigned Webster 1968 items (each integer 0-3) and return the published 0-30 total.\n\nWhen an agent has already assigned Webster 1968 integers 0-3 for the ten clinical items and needs the 0-30 total. magent does not examine the patient or diagnose Parkinson disease.\n\nNot a medical device and not a Parkinson diagnosis.\n\nHistorical 1968 10-item 0-30 sum. Each item is a caller-assigned integer 0 (normal) to 3 (severe). magent does not examine the patient.\n\nNot MDS-UPDRS. magent does not invent mild/moderate/severe total-score bands. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"bradykinesia","description":"Caller-assigned Webster 1968 item, integer 0 (normal) to 3 (severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"rigidity","description":"Caller-assigned Webster 1968 item, integer 0 (normal) to 3 (severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"posture","description":"Caller-assigned Webster 1968 item, integer 0 (normal) to 3 (severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"upper_extremity_swing","description":"Caller-assigned Webster 1968 item, integer 0 (normal) to 3 (severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"gait","description":"Caller-assigned Webster 1968 item, integer 0 (normal) to 3 (severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"tremor","description":"Caller-assigned Webster 1968 item, integer 0 (normal) to 3 (severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"facies","description":"Caller-assigned Webster 1968 item, integer 0 (normal) to 3 (severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"seborrhea","description":"Caller-assigned Webster 1968 item, integer 0 (normal) to 3 (severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"speech","description":"Caller-assigned Webster 1968 item, integer 0 (normal) to 3 (severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"self_care","description":"Caller-assigned Webster 1968 item, integer 0 (normal) to 3 (severe). magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"Webster Rating Scale","operationId":"get_api_calc_webster","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_webster: Webster items must each be integers 0-3 as published in Webster 1968. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/webster"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Webster Rating Scale (bulk)","operationId":"post_api_calc_webster","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_webster: Webster items must each be integers 0-3 as published in Webster 1968. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/webster"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bradykinesia":"0","facies":"0","gait":"0","posture":"0","rigidity":"0","seborrhea":"0","self_care":"0","speech":"0","tremor":"0","upper_extremity_swing":"0"},{"bradykinesia":"0","facies":"0","gait":"0","posture":"0","rigidity":"0","seborrhea":"0","self_care":"0","speech":"0","tremor":"0","upper_extremity_swing":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/irae-hypothyroidism":{"get":{"description":"Apply Brahmer 2018 ASCO Table 4.1.1 primary hypothyroidism grading and return grade 1-3 plus icpi_action from tsh_miu_l and three caller-assigned flags.\n\nWhen an agent already has TSH in mIU/L and caller-assigned moderate-symptoms, severe-or-life-threatening, and unable-to-perform-ADL flags and needs the published first-match grade and ICI continue or hold-until-baseline action. magent does not assay TSH or FT4.\n\nNot a medical device.\n\nNot a diagnosis. Not a levothyroxine dose.\n\nmagent does not assay TSH or FT4. tsh_miu_l and the three flags are caller-assigned (Brahmer 2018 Table 4.1.1 primary hypothyroidism).\n\nNot hyperthyroidism (Brahmer 2018 Table 4.1.2).\n\nPaper grade 3-4 is one band; this tool returns grade 3, not a separate grade 4. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"tsh_miu_l","description":"TSH in mIU/L (0.01-150; Brahmer 2018 Table 4.1.1 primary hypothyroidism). Persistently TSH >10 mIU/L is grade 2 unless a grade 3 flag is true; TSH 10 is this band. TSH <10 mIU/L with no moderate or severe flags is grade 1. magent does not assay TSH.","required":true,"schema":{"type":"number"},"example":"8"},{"in":"query","name":"moderate_symptoms","description":"Moderate symptoms with ability to perform ADL as assigned by the caller (Brahmer 2018 Table 4.1.1 grade 2). true or false. When true and no grade 3 flag is true, grade is 2. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"severe_or_life_threatening","description":"Severe symptoms, medically significant or life-threatening consequences as assigned by the caller (Brahmer 2018 Table 4.1.1 grade 3-4, returned as grade 3). true or false. When true, grade is 3. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"unable_to_perform_adl","description":"Unable to perform ADL as assigned by the caller (Brahmer 2018 Table 4.1.1 grade 3-4, returned as grade 3). true or false. When true, grade is 3. magent does not assess ADL.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"irAE hypothyroidism","operationId":"get_api_calc_irae_hypothyroidism","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, grade, icpi_action, tsh_miu_l, moderate_symptoms, severe_or_life_threatening, unable_to_perform_adl, criteria, citation, disclaimer."},"400":{"description":"invalid_tsh_miu_l: tsh_miu_l must be a number from 0.01 to 150 (Brahmer 2018 TSH mIU/L). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/irae-hypothyroidism"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"irAE hypothyroidism (bulk)","operationId":"post_api_calc_irae_hypothyroidism","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_tsh_miu_l: tsh_miu_l must be a number from 0.01 to 150 (Brahmer 2018 TSH mIU/L). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/irae-hypothyroidism"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"moderate_symptoms":"false","severe_or_life_threatening":"false","tsh_miu_l":"8","unable_to_perform_adl":"false"},{"moderate_symptoms":"false","severe_or_life_threatening":"false","tsh_miu_l":"8","unable_to_perform_adl":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/periop-doac":{"get":{"description":"Return published elective perioperative DOAC hold and resume day counts from Douketis 2022 (PAUSE-style implementation considerations, recommendations 22-25) given the INN, procedure bleed-risk category, and dabigatran CrCl when required.\n\nWhen an agent needs the Douketis 2022 elective DOAC interruption table for apixaban, rivaroxaban, edoxaban, or dabigatran and must not apply a warfarin 5-day hold, heparin bridging, or an urgent-surgery pathway.\n\nNot a medical device. Not a prescription and not an anticoagulation order. A licensed clinician remains responsible for timing around an elective procedure.\n\nElective surgery or procedure only. Not urgent or emergency surgery. Not a warfarin or VKA 5-day interruption.\n\nRecommendation 26 suggests against heparin bridging of a DOAC. heparin_bridge is always false. magent does not order heparin.\n\nmagent does not assay CrCl. The caller assigns CrCl for dabigatran. CrCl must be absent for apixaban, rivaroxaban, and edoxaban.\n\nINN names only (apixaban, rivaroxaban, edoxaban, dabigatran). Not a diagnosis of bleed risk; the caller assigns low_to_moderate or high. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"doac","description":"Direct oral anticoagulant INN, case-insensitive: apixaban, rivaroxaban, edoxaban, or dabigatran. Elective procedures only. Not warfarin or a VKA.","required":true,"schema":{"type":"string","enum":["apixaban","rivaroxaban","edoxaban","dabigatran"]},"example":"apixaban"},{"in":"query","name":"bleed_risk","description":"Procedure bleed-risk category from Douketis 2022, case-insensitive: low_to_moderate or high. Caller assigns the category. Not urgent surgery.","required":true,"schema":{"type":"string","enum":["low_to_moderate","high"]},"example":"low_to_moderate"},{"in":"query","name":"crcl_ml_min","description":"Caller-assigned creatinine clearance in mL/min (15-120). Required only when doac is dabigatran. Must be absent for apixaban, rivaroxaban, and edoxaban. magent does not assay CrCl.","required":false,"schema":{"type":"number"},"example":"40"}],"summary":"Perioperative DOAC","operationId":"get_api_calc_periop_doac","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, doac, bleed_risk, crcl_ml_min, hold_days_before, resume_days_after, heparin_bridge, total_pre_post_days, criteria, citation, disclaimer."},"400":{"description":"invalid_periop_doac: Perioperative DOAC hold inputs must match Douketis 2022 drug, bleed-risk category, and dabigatran CrCl window from that guideline. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/periop-doac"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Perioperative DOAC (bulk)","operationId":"post_api_calc_periop_doac","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_periop_doac: Perioperative DOAC hold inputs must match Douketis 2022 drug, bleed-risk category, and dabigatran CrCl window from that guideline. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/periop-doac"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bleed_risk":"low_to_moderate","doac":"apixaban"},{"bleed_risk":"low_to_moderate","doac":"apixaban"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/berlin-ards":{"get":{"description":"Apply the 2012 Berlin Definition of ARDS and return whether the clinical box holds, severity (none, mild, moderate, or severe), and berlin_ards.\n\nWhen an agent already has the five caller-assigned Berlin flags and a PaO2/FiO2 ratio and needs the published severity. magent does not read radiographs or echo.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose ARDS or set ventilator mode.\n\nThe caller assigns timing, imaging, origin, PEEP, and CPAP. magent does not read radiographs or echocardiography.\n\npf_ratio is the caller-supplied PaO2/FiO2 in mm Hg (20-800). magent does not recompute it from PaO2 and FiO2.\n\nMild allows PEEP or CPAP ≥5 cm H2O; moderate and severe require PEEP ≥5. CPAP alone with PF ≤200 is not Berlin ARDS.\n\nThis is the 2012 Berlin Definition (Ranieri et al.). Not the 1994 AECC definition, not Kigali (SpO2/FiO2), and not the oxygenation index. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"onset_within_1_week","description":"Onset within 1 week of a known clinical insult or new or worsening respiratory symptoms (Ranieri 2012). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"bilateral_opacities_not_fully_explained","description":"Bilateral opacities not fully explained by effusions, lobar/lung collapse, or nodules (Ranieri 2012). true or false as assigned by the caller. magent does not read radiographs.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"origin_not_fully_hf_or_fluid","description":"Respiratory failure not fully explained by cardiac failure or fluid overload (Ranieri 2012). true or false as assigned by the caller. magent does not read echocardiography.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"peep_ge_5","description":"PEEP >= 5 cm H2O as assigned by the caller (required for moderate and severe; either PEEP or CPAP for mild). magent does not set ventilator mode.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"cpap_ge_5","description":"CPAP >= 5 cm H2O as assigned by the caller (counts for mild only; CPAP without PEEP is not moderate or severe). magent does not set ventilator mode.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pf_ratio","description":"PaO2/FiO2 ratio in mm Hg (20-800). Caller-supplied; magent does not recompute from PaO2 and FiO2.","required":true,"schema":{"type":"number"},"example":"90"}],"summary":"Berlin Definition of ARDS","operationId":"get_api_calc_berlin_ards","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, pf_ratio, clinical_box, severity, berlin_ards, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_pf_ratio: pf_ratio must be a number from 20 to 800. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/berlin-ards"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Berlin Definition of ARDS (bulk)","operationId":"post_api_calc_berlin_ards","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_pf_ratio: pf_ratio must be a number from 20 to 800. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/berlin-ards"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bilateral_opacities_not_fully_explained":"true","cpap_ge_5":"false","onset_within_1_week":"true","origin_not_fully_hf_or_fluid":"true","peep_ge_5":"true","pf_ratio":"90"},{"bilateral_opacities_not_fully_explained":"true","cpap_ge_5":"false","onset_within_1_week":"true","origin_not_fully_hf_or_fluid":"true","peep_ge_5":"true","pf_ratio":"90"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-pancreatic-sod":{"get":{"description":"Apply the Cotton 2016 Rome IV E2 pancreatic sphincter of Oddi disorder diagnostic criteria and return whether the published pancreatic SOD box holds (rome_iv_pancreatic_sod).\n\nWhen an agent already has the four caller-assigned Cotton 2016 Rome IV E2 pancreatic SOD flags and needs whether the published E2 box holds. magent does not read endoscopic ultrasound, sphincter manometry, labs, or imaging.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose pancreatic sphincter of Oddi disorder.\n\nThe caller assigns the four flags. magent does not read endoscopic ultrasound, sphincter manometry, labs, or imaging.\n\nThis tool is Cotton 2016 Rome IV E2 pancreatic sphincter of Oddi disorder only. Not biliary SOD. Not functional gallbladder. Not a treatment recommendation for sphincterotomy. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"documented_recurrent_episodes_of_pancreatitis","description":"Documented recurrent episodes of pancreatitis (typical pain with amylase or lipase >3 times normal and/or imaging evidence of acute pancreatitis), as assigned (Cotton 2016 Rome IV E2). One caller flag; magent does not split amylase versus imaging. true or false as assigned by the caller. magent does not read labs or imaging.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"other_etiologies_of_pancreatitis_excluded","description":"Other etiologies of pancreatitis excluded, as assigned (Cotton 2016 Rome IV E2). true or false as assigned by the caller. magent does not read labs or imaging.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"negative_endoscopic_ultrasound","description":"Negative endoscopic ultrasound, as assigned (Cotton 2016 Rome IV E2). true or false as assigned by the caller. magent does not read endoscopic ultrasound.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"abnormal_sphincter_manometry","description":"Abnormal sphincter manometry, as assigned (Cotton 2016 Rome IV E2). true or false as assigned by the caller. magent does not read sphincter manometry.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV pancreatic SOD","operationId":"get_api_calc_rome_iv_pancreatic_sod","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, rome_iv_pancreatic_sod, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_pancreatic_sod: Rome IV pancreatic SOD needs the Cotton 2016 E2 recurrent-pancreatitis and investigation flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-pancreatic-sod"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV pancreatic SOD (bulk)","operationId":"post_api_calc_rome_iv_pancreatic_sod","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_pancreatic_sod: Rome IV pancreatic SOD needs the Cotton 2016 E2 recurrent-pancreatitis and investigation flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-pancreatic-sod"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"abnormal_sphincter_manometry":"true","documented_recurrent_episodes_of_pancreatitis":"true","negative_endoscopic_ultrasound":"true","other_etiologies_of_pancreatitis_excluded":"true"},{"abnormal_sphincter_manometry":"true","documented_recurrent_episodes_of_pancreatitis":"true","negative_endoscopic_ultrasound":"true","other_etiologies_of_pancreatitis_excluded":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/amt-10":{"get":{"description":"Sum the ten Hodkinson 1972 AMT-10 items from caller-assigned correct/incorrect flags and return the 0–10 total. Hodkinson 1972 did not publish a diagnostic cutoff.\n\nWhen an agent already has AMT-10 items assigned as correct or incorrect and needs the published 0–10 total, not a dementia diagnosis, not an invented cutoff, and not Swain 1997 AMT-4.\n\nNot a medical device and not a dementia diagnosis. magent does not interview the patient.\n\nEach item is a caller-assigned boolean. This API does not collect an age, date of birth, place name, year, address, or monarch name.\n\nHodkinson 1972 abbreviated the 26-item test to 10 questions and did not publish a diagnostic cutoff. This tool returns the 0–10 sum only.\n\nThis is Hodkinson 1972 AMT-10 only. It is not Swain 1997 AMT-4. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_correct","description":"Caller-assigned flag: age stated correctly (Hodkinson 1972 AMT-10). true scores 1; false scores 0. magent does not interview the patient and does not collect an age.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"time_correct","description":"Caller-assigned flag: time to the nearest hour stated correctly (Hodkinson 1972 AMT-10). true scores 1; false scores 0. magent does not collect a clock time.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"address_recall_correct","description":"Caller-assigned flag: address recall at the end of the test (Hodkinson 1972 AMT-10; the classic 42 West Street prompt is assigned by the caller). true scores 1; false scores 0. magent does not collect an address.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"year_correct","description":"Caller-assigned flag: current year stated correctly (Hodkinson 1972 AMT-10). true scores 1; false scores 0. magent does not collect a year.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"place_correct","description":"Caller-assigned flag: name of place / hospital stated correctly (Hodkinson 1972 AMT-10). true scores 1; false scores 0. magent does not collect a place name.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"two_persons_correct","description":"Caller-assigned flag: recognition of two persons (Hodkinson 1972 AMT-10). true scores 1; false scores 0. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"dob_correct","description":"Caller-assigned flag: date of birth stated correctly (Hodkinson 1972 AMT-10). true scores 1; false scores 0. magent does not collect a date of birth.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"world_war_start_correct","description":"Caller-assigned flag: year the First World War started stated correctly (Hodkinson 1972 AMT-10). true scores 1; false scores 0. magent does not collect a year.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"monarch_correct","description":"Caller-assigned flag: name of the present monarch stated correctly (Hodkinson 1972 AMT-10). true scores 1; false scores 0. magent does not collect a monarch name.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"count_backwards_20_correct","description":"Caller-assigned flag: count backwards from 20 to 1 (Hodkinson 1972 AMT-10). true scores 1; false scores 0. magent does not interview the patient.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"AMT-10","operationId":"get_api_calc_amt_10","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/amt-10"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"AMT-10 (bulk)","operationId":"post_api_calc_amt_10","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/amt-10"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"address_recall_correct":"true","age_correct":"true","count_backwards_20_correct":"true","dob_correct":"true","monarch_correct":"true","place_correct":"true","time_correct":"true","two_persons_correct":"true","world_war_start_correct":"true","year_correct":"true"},{"address_recall_correct":"true","age_correct":"true","count_backwards_20_correct":"true","dob_correct":"true","monarch_correct":"true","place_correct":"true","time_correct":"true","two_persons_correct":"true","world_war_start_correct":"true","year_correct":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/egfr":{"get":{"description":"Agents must not invent eGFR from model memory. This endpoint computes published race-free CKD-EPI 2021 creatinine eGFR in mL/min/1.73m2; pay per request with x402 USDC on Base.\n\nWhen an agent needs the cited race-free CKD-EPI 2021 creatinine equation rather than a language-model guess. Pay per request with x402 USDC. Not a diagnosis or dosing recommendation.\n\nNot a medical device. Not a treatment recommendation and not a dosing recommendation.\n\nCreatinine-only 2021 equation. No race coefficient. Cystatin C is not accepted.\n\nDoes not apply pediatric equations. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"creatinine_mg_dl","description":"Serum creatinine in mg/dL. Provide this or creatinine_umol_l.","required":false,"schema":{"type":"number"},"example":"1.1"},{"in":"query","name":"creatinine_umol_l","description":"Serum creatinine in µmol/L. Converted as mg/dL = µmol/L / 88.42.","required":false,"schema":{"type":"number"},"example":"97.2"},{"in":"query","name":"age","description":"Age in years (18-120). CKD-EPI 2021 is validated in adults.","required":true,"schema":{"type":"integer"},"example":"65"},{"in":"query","name":"sex","description":"Sex used by the published equation. female or male.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"}],"summary":"CKD-EPI 2021 eGFR","operationId":"get_api_calc_egfr","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, creatinine_mg_dl, age_years, sex, egfr_ml_min_1_73m2, units, citation, disclaimer."},"400":{"description":"invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/egfr"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CKD-EPI 2021 eGFR (bulk)","operationId":"post_api_calc_egfr","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/egfr"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"65","creatinine_mg_dl":"1.1","sex":"female"},{"age":"65","creatinine_mg_dl":"1.1","sex":"female"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/cage":{"get":{"description":"Sum the four Ewing 1984 CAGE items and return whether two or more answers are affirmative.\n\nWhen an agent needs the published CAGE point total and Ewing 1984 ≥2 screen and must not invent a diagnosis or a later cutoff.\n\nNot a diagnosis of alcohol use disorder.\n\nNot CIWA-Ar and not AUDIT.\n\nmagent does not interpret individual items. Each flag is caller-assigned.\n\nThis is Ewing 1984 CAGE only (screen-positive at two or more affirmative answers). magent does not apply later variants. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"cut_down","description":"Have you ever felt you should Cut down on your drinking? (Ewing 1984). true or false as assigned by the caller. magent does not interpret the item.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"annoyed","description":"Have people Annoyed you by criticizing your drinking? (Ewing 1984). true or false as assigned by the caller. magent does not interpret the item.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"guilty","description":"Have you ever felt bad or Guilty about your drinking? (Ewing 1984). true or false as assigned by the caller. magent does not interpret the item.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"eye_opener","description":"Have you ever had a drink first thing in the morning to steady your nerves or get rid of a hangover (Eye-opener)? (Ewing 1984). true or false as assigned by the caller. magent does not interpret the item.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"CAGE","operationId":"get_api_calc_cage","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, screen_positive, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cage"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CAGE (bulk)","operationId":"post_api_calc_cage","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cage"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"annoyed":"false","cut_down":"false","eye_opener":"false","guilty":"false"},{"annoyed":"false","cut_down":"false","eye_opener":"false","guilty":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ohfrs":{"get":{"description":"Sum the ten Stiell 2013 Ottawa Heart Failure Risk Scale flags and return the integer point total (max 15).\n\nWhen an agent needs the published Stiell 2013 OHFRS point total from caller-assigned flags and must not invent ECG, walk-test, or laboratory findings or a discharge decision.\n\nNot a medical device.\n\nNot a disposition or discharge order. Not EHMRG.\n\nApply after ED intervention as in Stiell 2013. magent does not walk the patient or interpret the ECG.\n\nThe caller assigns all ten flags after applying the published cutoffs. magent does not assay labs. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"history_stroke_or_tia","description":"History of stroke or TIA as assigned by the caller (Stiell 2013; 1 point if true). true or false. magent does not take the history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"intubation_respiratory_distress","description":"Intubation for respiratory distress as assigned by the caller (Stiell 2013; 2 points if true). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hr_arrival_ge_110","description":"Heart rate on ED arrival >=110 as assigned by the caller after applying the Stiell 2013 cutoff (2 points if true). true or false. magent does not measure heart rate.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"sao2_lt_90_arrival","description":"Oxygen saturation <90% on ED arrival as assigned by the caller after applying the Stiell 2013 cutoff (1 point if true). true or false. magent does not measure saturation.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"walk_test_hr_ge_110_or_unable","description":"Heart rate >=110 during the 3-minute walk test, or unable to perform the walk test, as assigned by the caller after ED intervention (Stiell 2013; 1 point if true). true or false. magent does not walk the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"new_ischemic_ecg","description":"New ischemic ECG changes as assigned by the caller (Stiell 2013 derivation; 2 points if true). true or false. magent does not interpret the ECG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"urea_ge_12_mmol_l","description":"Urea >=12 mmol/L as assigned by the caller after applying the Stiell 2013 cutoff (1 point if true). true or false. magent does not assay urea.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"co2_ge_35_mmol_l","description":"Serum CO2 >=35 mmol/L as assigned by the caller after applying the Stiell 2013 cutoff (2 points if true). true or false. magent does not assay CO2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"troponin_mi_level","description":"Troponin I or T elevated to MI level as assigned by the caller (Stiell 2013; 2 points if true). true or false. magent does not assay troponin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ntprobnp_ge_5000","description":"NT-proBNP >=5000 ng/L as assigned by the caller after applying the Stiell 2013 cutoff (1 point if true). true or false. magent does not assay NT-proBNP.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"OHFRS","operationId":"get_api_calc_ohfrs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ohfrs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"OHFRS (bulk)","operationId":"post_api_calc_ohfrs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ohfrs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"co2_ge_35_mmol_l":"false","history_stroke_or_tia":"false","hr_arrival_ge_110":"false","intubation_respiratory_distress":"false","new_ischemic_ecg":"false","ntprobnp_ge_5000":"false","sao2_lt_90_arrival":"false","troponin_mi_level":"false","urea_ge_12_mmol_l":"false","walk_test_hr_ge_110_or_unable":"false"},{"co2_ge_35_mmol_l":"false","history_stroke_or_tia":"false","hr_arrival_ge_110":"false","intubation_respiratory_distress":"false","new_ischemic_ecg":"false","ntprobnp_ge_5000":"false","sao2_lt_90_arrival":"false","troponin_mi_level":"false","urea_ge_12_mmol_l":"false","walk_test_hr_ge_110_or_unable":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/cpsss":{"get":{"description":"Sum Katz 2015 Cincinnati Prehospital Stroke Severity Scale (CP-SSS) points from caller-assigned conjugate gaze deviation, abnormal level of consciousness, and arm weakness, and return whether the total suggests severe stroke (score ≥2).\n\nWhen an agent has caller-assigned Katz 2015 CP-SSS items and needs the published 0-4 total and score ≥2 severe-stroke flag, not the 3-item Cincinnati Prehospital Stroke Scale facial/arm/speech screen, NIHSS, or a tPA decision.\n\nNot a medical device. magent does not examine the patient. Conjugate gaze deviation, level of consciousness, and arm weakness are caller-assigned Katz 2015 findings.\n\nThis is the Cincinnati Prehospital Stroke Severity Scale (CP-SSS), not the 3-item Cincinnati Prehospital Stroke Scale (CPSS) facial droop, arm drift, and speech screen.\n\nNot NIHSS and not a tPA, thrombolysis, or transfer order. severe_stroke_suggested is true iff score ≥ 2 (this paper's cutoff for NIHSS ≥15 / LVO prediction). Sensitivity, PPV, and other operating-point statistics are not returned. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"gaze_deviation","description":"Caller-assigned Katz 2015 conjugate gaze deviation. Integer 0 absent or 2 present (not 1). magent does not examine the patient.","required":true,"schema":{"type":"integer","enum":[0,2]},"example":"0"},{"in":"query","name":"loc_abnormal","description":"Caller-assigned Katz 2015 incorrect level of consciousness (cannot answer age or current month correctly, or cannot follow commands). true if abnormal, false if normal. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"arm_weakness","description":"Caller-assigned Katz 2015 arm weakness: cannot hold arm up for 10 s (arm falls or no effort against gravity). true if present. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"CP-SSS","operationId":"get_api_calc_cpsss","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, severe_stroke_suggested, gaze_deviation, loc_abnormal, arm_weakness, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_cpsss: gaze_deviation 0 or 2; loc_abnormal and arm_weakness true or false (Katz 2015). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cpsss"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CP-SSS (bulk)","operationId":"post_api_calc_cpsss","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_cpsss: gaze_deviation 0 or 2; loc_abnormal and arm_weakness true or false (Katz 2015). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/cpsss"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"arm_weakness":"false","gaze_deviation":"0","loc_abnormal":"false"},{"arm_weakness":"false","gaze_deviation":"0","loc_abnormal":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/gap-index":{"get":{"description":"Sum Ley 2012 GAP index points from sex, age, FVC percent predicted, and DLCO percent predicted or cannot-perform.\n\nWhen an agent needs the published Ley 2012 GAP index total and stage and must not invent a transplant listing or a continuous GAP value.\n\nNot a medical device and not a transplant listing protocol. Stages follow Ley 2012 GAP index points (I 0-3 / II 4-5 / III 6-8).\n\nLey 2012 reported 1-, 2-, and 3-year mortality by GAP stage in derivation and validation cohorts; those cohort proportions are not returned in the JSON body.\n\nProvide exactly one of dlco_percent_predicted or dlco_cannot_perform=true. FVC and DLCO percent predicted are caller-supplied; magent does not compute percent predicted from raw spirometry. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sex","description":"Sex (female or male). Ley 2012: female scores 0; male scores 1.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"age","description":"Age in years (integer 18-120). Ley 2012: <=60 scores 0; 61-65 scores 1; >65 scores 2.","required":true,"schema":{"type":"integer"},"example":"55"},{"in":"query","name":"fvc_percent_predicted","description":"FVC percent predicted (10-150). Ley 2012: >75 scores 0; 50-75 scores 1; <50 scores 2. 75.0 scores 1.","required":true,"schema":{"type":"number"},"example":"80"},{"in":"query","name":"dlco_percent_predicted","description":"DLCO percent predicted (1-150). Provide this or dlco_cannot_perform=true, not both. Ley 2012: >55 scores 0; 36-55 scores 1; <=35 scores 2.","required":false,"schema":{"type":"number"},"example":"60"},{"in":"query","name":"dlco_cannot_perform","description":"true when DLCO cannot be performed (Ley 2012 scores 3). Provide this or dlco_percent_predicted, not both.","required":false,"schema":{"type":"boolean"},"example":"true"}],"summary":"GAP index","operationId":"get_api_calc_gap_index","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, gap_stage, sex, age_years, fvc_percent_predicted, dlco_percent_predicted, dlco_cannot_perform, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_fvc_percent: fvc_percent_predicted must be a number from 10 to 150. Returned before settlement; you are not charged.; invalid_dlco_percent: dlco_percent_predicted must be a number from 1 to 150. Returned before settlement; you are not charged.; invalid_gap_dlco: provide dlco_percent_predicted or dlco_cannot_perform=true, not both (Ley 2012). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gap-index"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"GAP index (bulk)","operationId":"post_api_calc_gap_index","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_fvc_percent: fvc_percent_predicted must be a number from 10 to 150. Returned before settlement; you are not charged.; invalid_dlco_percent: dlco_percent_predicted must be a number from 1 to 150. Returned before settlement; you are not charged.; invalid_gap_dlco: provide dlco_percent_predicted or dlco_cannot_perform=true, not both (Ley 2012). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gap-index"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"55","dlco_percent_predicted":"60","fvc_percent_predicted":"80","sex":"female"},{"age":"55","dlco_percent_predicted":"60","fvc_percent_predicted":"80","sex":"female"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/crcl":{"get":{"description":"Agents must not invent CrCl from model memory. This endpoint computes published Cockcroft–Gault creatinine clearance in mL/min using total body weight; pay per request with x402 USDC on Base.\n\nWhen an agent needs the cited Cockcroft–Gault creatinine-clearance equation rather than a language-model guess, including when a label still doses on CrCl rather than CKD-EPI eGFR. Pay per request with x402 USDC. Not a diagnosis or dosing recommendation.\n\nNot a medical device. Not a treatment recommendation and not a dosing recommendation.\n\nWeight basis is always total body weight. Ideal or adjusted body weight is not applied; call IBW separately if a protocol needs AdjBW.\n\nDoes not convert BUN to creatinine. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120).","required":true,"schema":{"type":"integer"},"example":"65"},{"in":"query","name":"sex","description":"female applies the published 0.85 factor; male does not.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"weight_kg","description":"Total body weight in kilograms. Provide weight_kg or weight_lb.","required":false,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"weight_lb","description":"Total body weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"schema":{"type":"number"},"example":"154"},{"in":"query","name":"creatinine_mg_dl","description":"Serum creatinine in mg/dL. Provide this or creatinine_umol_l.","required":false,"schema":{"type":"number"},"example":"1.1"},{"in":"query","name":"creatinine_umol_l","description":"Serum creatinine in µmol/L. Converted as mg/dL = µmol/L / 88.42.","required":false,"schema":{"type":"number"},"example":"97.2"}],"summary":"Cockcroft–Gault CrCl","operationId":"get_api_calc_crcl","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, sex, weight_kg, creatinine_mg_dl, crcl_ml_min, units, weight_basis, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/crcl"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Cockcroft–Gault CrCl (bulk)","operationId":"post_api_calc_crcl","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/crcl"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"65","creatinine_mg_dl":"1.1","sex":"female","weight_kg":"70"},{"age":"65","creatinine_mg_dl":"1.1","sex":"female","weight_kg":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/alt-70":{"get":{"description":"Sum the Raff 2017 ALT-70 items (unilateral involvement, leukocytosis, tachycardia, age ≥70) and return the published 0-2 / 3-4 / >=5 band.\n\nWhen an agent needs the published Raff 2017 ALT-70 total and must not invent a cellulitis diagnosis or an antibiotic order.\n\nNot a medical device.\n\nNot a cellulitis diagnosis and not an antibiotic order.\n\nRaff 2017 lower-extremity emergency-department derivation. magent does not examine the limb; unilateral is assigned by the caller.\n\nBands are Raff 2017 point regions 0-2, 3-4, and >=5. Percents are not returned. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Raff 2017: scores 2 when ≥70. Age 69 does not score.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"unilateral","description":"Unilateral (asymmetric) lower-extremity involvement (Raff 2017). true or false as assigned by the caller. 3 points if true. magent does not examine the limb.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"wbc_k_ul","description":"WBC in 10^3/µL (same as k/µL or 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500. ≥10 (10,000/µL) scores 1. 9.9 does not score.","required":false,"schema":{"type":"number"},"example":"8"},{"in":"query","name":"wbc_ul","description":"WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000. ≥10,000/µL scores 1.","required":false,"schema":{"type":"number"},"example":"8000"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats per minute (integer 30-220). Raff 2017: scores 1 when ≥90. Heart rate 89 does not score.","required":true,"schema":{"type":"integer"},"example":"80"}],"summary":"ALT-70","operationId":"get_api_calc_alt_70","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, band, age_years, unilateral, wbc_per_ul, heart_rate_bpm, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/alt-70"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ALT-70 (bulk)","operationId":"post_api_calc_alt_70","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/alt-70"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","heart_rate_bpm":"80","unilateral":"false","wbc_k_ul":"8"},{"age":"40","heart_rate_bpm":"80","unilateral":"false","wbc_k_ul":"8"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-fc":{"get":{"description":"Apply the Mearin 2016 Rome IV C2 functional constipation criteria and return symptom_count (0-6) and whether the published C2 box holds (rome_iv_fc).\n\nWhen an agent already has the nine caller-assigned Rome IV C2 flags as in Mearin 2016 and needs whether the published functional constipation box holds. magent does not examine the patient.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose functional constipation.\n\nThe caller assigns the nine flags. magent does not examine the patient.\n\nThis tool is adult Rome IV C2 functional constipation only. Not Rome IV IBS (Mearin 2016 IBS box), not Manning, not opioid-induced constipation as a separate diagnosis, and not child functional constipation. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"criteria_last_3_months_onset_6_months","description":"Criteria fulfilled for the last 3 months with symptom onset at least 6 months prior to diagnosis, as assigned (Mearin 2016 C2). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"straining_gt_25_percent","description":"Straining during more than 25% of defecations (one of six C2 symptom items; at least two required). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"lumpy_or_hard_stools_gt_25_percent","description":"Lumpy or hard stools (Bristol stool form types 1-2) more than 25% of defecations (one of six C2 symptom items; at least two required). true or false as assigned by the caller. magent does not inspect stool.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"incomplete_evacuation_gt_25_percent","description":"Sensation of incomplete evacuation more than 25% of defecations (one of six C2 symptom items; at least two required). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"anorectal_obstruction_gt_25_percent","description":"Sensation of anorectal obstruction/blockage more than 25% of defecations (one of six C2 symptom items; at least two required). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"manual_maneuvers_gt_25_percent","description":"Manual maneuvers to facilitate more than 25% of defecations (one of six C2 symptom items; at least two required). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"fewer_than_3_sbm_per_week","description":"Fewer than three spontaneous bowel movements per week (one of six C2 symptom items; at least two required). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"loose_stools_rare_without_laxatives","description":"Loose stools are rarely present without the use of laxatives, as assigned (Mearin 2016 C2). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"insufficient_criteria_for_ibs","description":"Insufficient criteria for irritable bowel syndrome, as assigned by the caller (Mearin 2016 C2 requires IBS criteria are not met). true or false. magent does not apply the IBS box.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV FC","operationId":"get_api_calc_rome_iv_fc","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, symptom_count, rome_iv_fc, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-fc"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV FC (bulk)","operationId":"post_api_calc_rome_iv_fc","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-fc"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"anorectal_obstruction_gt_25_percent":"false","criteria_last_3_months_onset_6_months":"true","fewer_than_3_sbm_per_week":"true","incomplete_evacuation_gt_25_percent":"false","insufficient_criteria_for_ibs":"true","loose_stools_rare_without_laxatives":"true","lumpy_or_hard_stools_gt_25_percent":"false","manual_maneuvers_gt_25_percent":"false","straining_gt_25_percent":"true"},{"anorectal_obstruction_gt_25_percent":"false","criteria_last_3_months_onset_6_months":"true","fewer_than_3_sbm_per_week":"true","incomplete_evacuation_gt_25_percent":"false","insufficient_criteria_for_ibs":"true","loose_stools_rare_without_laxatives":"true","lumpy_or_hard_stools_gt_25_percent":"false","manual_maneuvers_gt_25_percent":"false","straining_gt_25_percent":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/roth":{"get":{"description":"Echo Chorin 2016 Roth-score measurements (highest number reached counting 1 to 30 in one breath, and elapsed counting time) plus Table 2/discussion threshold flags.\n\nWhen an agent already has caller-measured max_count and counting_time_seconds from a single-breath count to 30 and must not invent a hypoxia class, apply 2021 general-practice cutoffs, or treat the result as a respiratory-distress diagnosis.\n\nNot a medical device. Not a hypoxia diagnosis, triage order, or respiratory-distress class. magent does not time the patient.\n\nCaller supplies max_count (integer 1-30, highest number reached) and counting_time_seconds (greater than 0 and at most 60). magent does not administer the count or run a stopwatch.\n\nChorin 2016 reports correlations, AUCs, and Table 2 sensitivity/specificity rows without a single diagnostic class. magent echoes the two measurements and discussion-quoted threshold flags (max_count <10, counting_time <7 s, max_count <7, counting_time <5 s). It does not invent a hypoxia class.\n\nDoes not apply 2021 COVID general-practice validation cutoffs. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"max_count","description":"Highest number reached counting 1 to 30 in one breath (integer 1-30). Caller supplies the count. magent does not administer the count.","required":true,"schema":{"type":"integer"},"example":"30"},{"in":"query","name":"counting_time_seconds","description":"Elapsed seconds from 1 until the highest number reached (greater than 0 and at most 60). Caller supplies the stopwatch reading. magent does not time the patient.","required":true,"schema":{"type":"number"},"example":"12"}],"summary":"Roth score","operationId":"get_api_calc_roth","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, max_count, counting_time_seconds, max_count_lt_10, counting_time_lt_7_seconds, max_count_lt_7, counting_time_lt_5_seconds, citation, disclaimer."},"400":{"description":"invalid_roth: Roth-score inputs must be max_count 1-30 and counting_time_seconds as used in Chorin 2016. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/roth"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Roth score (bulk)","operationId":"post_api_calc_roth","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_roth: Roth-score inputs must be max_count 1-30 and counting_time_seconds as used in Chorin 2016. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/roth"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"counting_time_seconds":"12","max_count":"30"},{"counting_time_seconds":"12","max_count":"30"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mminds":{"get":{"description":"Sum nine caller-assigned DeCarolis 2007 MINDS items and return the published total (max 46). Does not return severity bands, lorazepam doses, or a RASS-mapped agitation item.\n\nWhen an agent has already assigned DeCarolis 2007 MINDS bands and needs the published 0-46 total, not a benzodiazepine protocol or a hospital-specific RASS modification.\n\nNot a medical device and not a benzodiazepine, lorazepam, or treatment order.\n\nEach finding is caller-assigned. magent does not examine the patient.\n\nmagent publishes DeCarolis 2007 item weights (MINDS 0-46), not a hospital-specific RASS modification of agitation.\n\nDeCarolis 2007 did not publish mild, moderate, or severe cutoffs or lorazepam doses for the total score. magent returns score and max_score only. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"pulse","description":"Caller-assigned DeCarolis 2007 pulse band: lt_90 (0; pulse <90), 90_to_110 (1), or gt_110 (2; pulse >110). magent does not measure pulse.","required":true,"schema":{"type":"string","enum":["lt_90","90_to_110","gt_110"]},"example":"lt_90"},{"in":"query","name":"diastolic_bp","description":"Caller-assigned DeCarolis 2007 diastolic blood-pressure band: lt_90 (0; DBP <90), 90_to_110 (1), or gt_110 (2; DBP >110). magent does not measure blood pressure.","required":true,"schema":{"type":"string","enum":["lt_90","90_to_110","gt_110"]},"example":"lt_90"},{"in":"query","name":"tremor","description":"Caller-assigned DeCarolis 2007 tremor: absent (0), visible (2), moderate (4), or severe (6). magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["absent","visible","moderate","severe"]},"example":"absent"},{"in":"query","name":"sweat","description":"Caller-assigned DeCarolis 2007 sweat: absent (0), moist_palms (2), beads (4), or drenching (6). magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["absent","moist_palms","beads","drenching"]},"example":"absent"},{"in":"query","name":"hallucinations","description":"Caller-assigned DeCarolis 2007 hallucinations: absent (0), mild (1), moderate_intermittent (2), or severe_continuous (3). magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["absent","mild","moderate_intermittent","severe_continuous"]},"example":"absent"},{"in":"query","name":"agitation","description":"Caller-assigned DeCarolis 2007 agitation: normal (0), somewhat_greater (3), moderately_fidgety (6), or pacing_thrashing (9). Not a RASS item. magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["normal","somewhat_greater","moderately_fidgety","pacing_thrashing"]},"example":"normal"},{"in":"query","name":"orientation","description":"Caller-assigned DeCarolis 2007 orientation: x3 (0), x2 (2), x1 (4), disoriented (6), or intubated (0). magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["x3","x2","x1","disoriented","intubated"]},"example":"x3"},{"in":"query","name":"delusions","description":"Caller-assigned DeCarolis 2007 delusions. true scores 6. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":false},{"in":"query","name":"seizures","description":"Caller-assigned DeCarolis 2007 seizures. true scores 6. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":false}],"summary":"MINDS (DeCarolis 2007)","operationId":"get_api_calc_mminds","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_mminds: MINDS inputs must match DeCarolis 2007 pulse, diastolic blood pressure, tremor, sweat, hallucinations, agitation, orientation, delusions, and seizures. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mminds"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"MINDS (DeCarolis 2007) (bulk)","operationId":"post_api_calc_mminds","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_mminds: MINDS inputs must match DeCarolis 2007 pulse, diastolic blood pressure, tremor, sweat, hallucinations, agitation, orientation, delusions, and seizures. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mminds"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"agitation":"normal","delusions":"false","diastolic_bp":"lt_90","hallucinations":"absent","orientation":"x3","pulse":"lt_90","seizures":"false","sweat":"absent","tremor":"absent"},{"agitation":"normal","delusions":"false","diastolic_bp":"lt_90","hallucinations":"absent","orientation":"x3","pulse":"lt_90","seizures":"false","sweat":"absent","tremor":"absent"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/sampson":{"get":{"description":"Estimate LDL-C from total cholesterol, HDL, and triglycerides using Sampson 2020.\n\nWhen an agent needs Sampson LDL arithmetic (including triglycerides up to 800 mg/dL) and must not apply Friedewald TG/5.\n\nNot a diagnosis and not a statin order. Direct LDL assay is out of scope.\n\nTriglycerides above 800 mg/dL (or 9.03 mmol/L) are rejected. Sampson 2020 is not applied above that cap.\n\nSampson 2020 only. Not Friedewald 1972 and not Martin/Hopkins. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"total_cholesterol_mg_dl","description":"Total cholesterol in mg/dL (50-500). Provide the full mg/dL set or the full mmol/L set, not mixed.","required":false,"schema":{"type":"number"},"example":"200"},{"in":"query","name":"hdl_mg_dl","description":"HDL cholesterol in mg/dL (5-150). Same unit system as the other lipids.","required":false,"schema":{"type":"number"},"example":"50"},{"in":"query","name":"triglycerides_mg_dl","description":"Triglycerides in mg/dL (10-800). Values above 800 are rejected; Sampson 2020 is not applied above 800 mg/dL.","required":false,"schema":{"type":"number"},"example":"150"},{"in":"query","name":"total_cholesterol_mmol_l","description":"Total cholesterol in mmol/L (1.3-12.9). Converted as mg/dL = mmol/L * 38.67. Do not mix with mg/dL keys.","required":false,"schema":{"type":"number"},"example":"5.0"},{"in":"query","name":"hdl_mmol_l","description":"HDL cholesterol in mmol/L (0.1-3.9). Converted as mg/dL = mmol/L * 38.67.","required":false,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"triglycerides_mmol_l","description":"Triglycerides in mmol/L (0.1-9.03). Cap is the SI stand-in for 800 mg/dL (mg/dL = mmol/L * 88.57). The Sampson equation is applied in mg/dL.","required":false,"schema":{"type":"number"},"example":"2.2"}],"summary":"Sampson LDL-C","operationId":"get_api_calc_sampson","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, unit, total_cholesterol_mg_dl, hdl_mg_dl, triglycerides_mg_dl, ldl_c_mg_dl, ldl_c_mmol_l, citation, disclaimer."},"400":{"description":"invalid_cholesterol: provide all of total_cholesterol_mg_dl (50-500), hdl_mg_dl (5-150), and triglycerides_mg_dl, or all of total_cholesterol_mmol_l (1.3-12.9), hdl_mmol_l (0.1-3.9), and triglycerides_mmol_l, not mixed. Returned before settlement; you are not charged.; invalid_sampson_triglyceride: triglycerides_mg_dl must be 10-800; triglycerides_mmol_l must be 0.1-9.03. Sampson is not applied above 800 mg/dL. Returned before settlement; you are not charged.; invalid_lipid_inputs: computed LDL-C would be negative; check total cholesterol, HDL, and triglycerides. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sampson"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Sampson LDL-C (bulk)","operationId":"post_api_calc_sampson","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_cholesterol: provide all of total_cholesterol_mg_dl (50-500), hdl_mg_dl (5-150), and triglycerides_mg_dl, or all of total_cholesterol_mmol_l (1.3-12.9), hdl_mmol_l (0.1-3.9), and triglycerides_mmol_l, not mixed. Returned before settlement; you are not charged.; invalid_sampson_triglyceride: triglycerides_mg_dl must be 10-800; triglycerides_mmol_l must be 0.1-9.03. Sampson is not applied above 800 mg/dL. Returned before settlement; you are not charged.; invalid_lipid_inputs: computed LDL-C would be negative; check total cholesterol, HDL, and triglycerides. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/sampson"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"hdl_mg_dl":"50","total_cholesterol_mg_dl":"200","triglycerides_mg_dl":"150"},{"hdl_mg_dl":"50","total_cholesterol_mg_dl":"200","triglycerides_mg_dl":"150"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/stumbl":{"get":{"description":"Sum Battle 2014 Table 4 STUMBL points from caller-assigned age, rib fracture count, chronic lung disease, preinjury anticoagulants, and SpO2, and return the Table 5 complication-probability band.\n\nWhen an agent has already assigned Battle 2014 Table 4 inputs after blunt chest wall trauma and needs the published integer STUMBL total and Table 5 band, not a chest exam, rib count, disposition, or ICU order.\n\nNot a medical device. magent does not examine the chest or count ribs. Rib count and SpO2 are caller-assigned.\n\nNot a disposition, discharge, ICU-admission, or anticoagulant order. Table 5 bands are published complication probabilities (13/29/52/70/80/88%), not later secondary-paper cutoffs.\n\nAge is an integer from 1 to 120 (1 point per decade starting at 10; not the adult 18–120 clamp). Rib count is an integer from 0 to 24. SpO2 is an integer from 50 to 100. No published point ceiling; Table 5 uses 31+ as the top band. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years, integer 1–120. Battle 2014 Table 4: 1 point per additional 10-year increase starting at 10 (div(age, 10); age 10 scores 1, age 67 scores 6, age 1–9 scores 0). Not the adult 18–120 clamp.","required":true,"schema":{"type":"integer"},"example":"67"},{"in":"query","name":"rib_count","description":"Caller-assigned number of rib fractures, integer 0–24. Battle 2014 Table 4: 3 points per additional rib fracture (3 ribs scores 9). magent does not examine the chest or count ribs.","required":true,"schema":{"type":"integer"},"example":"3"},{"in":"query","name":"chronic_lung_disease","description":"Pre-injury chronic lung disease as assigned by the caller (Battle 2014 Table 4). true or false. true scores 5.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"preinjury_anticoagulants","description":"Pre-injury anticoagulant use as assigned by the caller (Battle 2014 Table 4). true or false. true scores 4.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"spo2_percent","description":"Oxygen saturation percent, integer 50–100. Battle 2014 Table 4 footnote c: 2 points per 5% decrease starting at 94% (≥95 scores 0; else 2*(1+div(94-spo2_percent, 5)); 87% scores 4). magent does not measure SpO2.","required":true,"schema":{"type":"integer"},"example":"87"}],"summary":"STUMBL","operationId":"get_api_calc_stumbl","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, stumbl_band, complication_probability_percent, at_risk_for_complications, icu_admission_cutoff, age_years, rib_count, chronic_lung_disease, preinjury_anticoagulants, spo2_percent, components, citation, disclaimer."},"400":{"description":"invalid_stumbl_age: age must be an integer from 1 through 120 (Battle 2014 STUMBL; 1 point per decade starting at 10; not the adult 18-120 clamp). Returned before settlement; you are not charged.; invalid_rib_count: rib_count must be an integer from 0 through 24 (Battle 2014 STUMBL Table 4). Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/stumbl"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"STUMBL (bulk)","operationId":"post_api_calc_stumbl","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_stumbl_age: age must be an integer from 1 through 120 (Battle 2014 STUMBL; 1 point per decade starting at 10; not the adult 18-120 clamp). Returned before settlement; you are not charged.; invalid_rib_count: rib_count must be an integer from 0 through 24 (Battle 2014 STUMBL Table 4). Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/stumbl"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"67","chronic_lung_disease":"true","preinjury_anticoagulants":"false","rib_count":"3","spo2_percent":"87"},{"age":"67","chronic_lung_disease":"true","preinjury_anticoagulants":"false","rib_count":"3","spo2_percent":"87"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/four-ts":{"get":{"description":"Compute the Lo 2006 4Ts score as the sum of four caller-assigned integers 0-2 (thrombocytopenia, timing, thrombosis, other causes).\n\nWhen an agent has already applied the Lo 2006 table and needs the published 4Ts total and pretest-probability band, not a HIT antibody result or HEP score.\n\nNot a diagnosis of HIT.\n\nThis is the 4Ts score (Lo 2006), not the HEP score and not a HIT antibody result.\n\nthrombocytopenia, timing, thrombosis, and other_causes are caller-assigned integers 0-2 using the published Lo 2006 table. magent does not grade platelet counts or day of onset.\n\nBands 0-3 / 4-5 / 6-8 are pretest probability groups (low / intermediate / high), not an antibody result. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"thrombocytopenia","description":"Caller-assigned Lo 2006 thrombocytopenia points (0, 1, or 2). magent does not grade platelet counts. 2: platelet fall >50% AND nadir >=20. 1: fall 30-50% OR nadir 10-19. 0: fall <30% OR nadir <10.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"timing","description":"Caller-assigned Lo 2006 timing points (0, 1, or 2). magent does not infer day of onset. 2: clear onset days 5-10, or <=1 day with prior heparin within 30 days. 1: consistent with days 5-10 but not clear; onset after day 10; or <=1 day with heparin 30-100 days ago. 0: fall too early without recent heparin.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"thrombosis","description":"Caller-assigned Lo 2006 thrombosis points (0, 1, or 2). 2: new thrombosis, skin necrosis, or acute systemic reaction after heparin bolus. 1: progressive/recurrent thrombosis, silent thrombosis, or erythematous skin lesions. 0: none.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"other_causes","description":"Caller-assigned Lo 2006 other (oTher) causes of thrombocytopenia (0, 1, or 2). More points = more HIT-like. 2: no other apparent cause. 1: possible other cause. 0: definite other cause.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"4Ts score","operationId":"get_api_calc_four_ts","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, four_ts_band, components, citation, disclaimer."},"400":{"description":"invalid_four_ts_component: thrombocytopenia, timing, thrombosis, and other_causes must each be 0, 1, or 2. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/four-ts"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"4Ts score (bulk)","operationId":"post_api_calc_four_ts","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_four_ts_component: thrombocytopenia, timing, thrombosis, and other_causes must each be 0, 1, or 2. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/four-ts"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"other_causes":"0","thrombocytopenia":"0","thrombosis":"0","timing":"0"},{"other_causes":"0","thrombocytopenia":"0","thrombosis":"0","timing":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/aldrete":{"get":{"description":"Compute the Aldrete 1970 postanesthetic recovery score as the sum of five caller-assigned 0-2 signs (activity, respiration, circulation, consciousness, color) and return the 1970 recovery-room band.\n\nWhen an agent has already assigned the five Aldrete 1970 signs and needs the published 0-10 total and 0_to_7 / 8_to_9 / 10 band. magent does not examine the patient or issue a PACU discharge order.\n\nNot a medical device and not a PACU discharge, ward-transfer, or monitoring order.\n\nEach sign is a caller-supplied integer 0-2. magent does not observe activity, respiration, blood pressure change, consciousness, or color.\n\nAldrete 1970 five signs including color. Not the 1995 revision that replaced color with SpO2. Not Marshall-Chung PADSS.\n\nTotals of 8 or 9 were acceptable for discharge from the recovery room to the ward; 10 is ideal; 7 or less indicated continuous close observation. That 1970 language is not a discharge order. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"activity","description":"Muscle activity (Aldrete 1970). Integer 0, 1, or 2 as assigned by the caller. 2 = moves 4 extremities voluntarily or on command; 1 = 2 extremities; 0 = none. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"2"},{"in":"query","name":"respiration","description":"Respiration (Aldrete 1970). Integer 0, 1, or 2 as assigned by the caller. 2 = able to deep breathe and cough freely; 1 = dyspnea or limited breathing; 0 = apneic. magent does not auscultate.","required":true,"schema":{"type":"integer"},"example":"2"},{"in":"query","name":"circulation","description":"Circulation (Aldrete 1970). Integer 0, 1, or 2 as assigned by the caller. 2 = BP within 20% of preanesthetic level; 1 = BP 20-50% of preanesthetic; 0 = BP 50% or more from preanesthetic. magent does not measure blood pressure.","required":true,"schema":{"type":"integer"},"example":"2"},{"in":"query","name":"consciousness","description":"Consciousness (Aldrete 1970). Integer 0, 1, or 2 as assigned by the caller. 2 = fully awake; 1 = arousable on calling; 0 = not responding. magent does not examine the patient.","required":true,"schema":{"type":"integer"},"example":"2"},{"in":"query","name":"color","description":"Color (Aldrete 1970). Integer 0, 1, or 2 as assigned by the caller. 2 = pink; 1 = pale, dusky, blotchy, jaundiced, or other; 0 = cyanotic. Not the 1995 SpO2 revision. magent does not observe skin color.","required":true,"schema":{"type":"integer"},"example":"2"}],"summary":"Aldrete","operationId":"get_api_calc_aldrete","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, category, components, citation, disclaimer."},"400":{"description":"invalid_aldrete_component: activity, respiration, circulation, consciousness, and color must each be 0, 1, or 2 (Aldrete 1970). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/aldrete"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Aldrete (bulk)","operationId":"post_api_calc_aldrete","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_aldrete_component: activity, respiration, circulation, consciousness, and color must each be 0, 1, or 2 (Aldrete 1970). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/aldrete"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"activity":"2","circulation":"2","color":"2","consciousness":"2","respiration":"2"},{"activity":"2","circulation":"2","color":"2","consciousness":"2","respiration":"2"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-belching":{"get":{"description":"Apply the Stanghellini 2016 Rome IV belching disorders (B2) diagnostic criteria and return whether the published B2 box holds (rome_iv_belching), with caller-assigned B2a supragastric or B2b gastric origin.\n\nWhen an agent already has the three caller-assigned Stanghellini 2016 Rome IV B2 flags and belching_origin (supragastric or gastric) and needs whether the published belching-disorders box holds. magent does not take a history or measure impedance.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose belching disorders.\n\nThe caller assigns the three flags and belching_origin. magent does not take a history or measure impedance. Objective impedance distinguishes supragastric from gastric belching in the paper; magent does not run impedance.\n\nThis tool is Stanghellini 2016 Rome IV belching disorders (B2) only, with B2a excessive supragastric belching or B2b excessive gastric belching as caller-assigned origin. Not adult aerophagia (historical). Not child H1d aerophagia. Not Rome IV bloating. Not functional dyspepsia. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"bothersome_belching_more_than_3_days_week","description":"Bothersome (severe enough to impact usual activities) belching from the esophagus or stomach more than 3 days a week (Stanghellini 2016 Rome IV B2). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"fulfilled_last_3_months","description":"Criteria fulfilled for the last 3 months, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"onset_at_least_6_months","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"belching_origin","description":"Caller-assigned origin of excessive belching: supragastric (B2a, from the esophagus) or gastric (B2b, from the stomach) (Stanghellini 2016). Objective impedance distinguishes them in the paper; magent does not measure impedance.","required":true,"schema":{"type":"string","enum":["supragastric","gastric"]},"example":"supragastric"}],"summary":"Rome IV belching","operationId":"get_api_calc_rome_iv_belching","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, rome_iv_belching, belching_origin, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_belching: Rome IV belching needs the Stanghellini 2016 gastroduodenal B2 flags and belching_origin supragastric or gastric. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-belching"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV belching (bulk)","operationId":"post_api_calc_rome_iv_belching","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_belching: Rome IV belching needs the Stanghellini 2016 gastroduodenal B2 flags and belching_origin supragastric or gastric. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-belching"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"belching_origin":"supragastric","bothersome_belching_more_than_3_days_week":"true","fulfilled_last_3_months":"true","onset_at_least_6_months":"true"},{"belching_origin":"supragastric","bothersome_belching_more_than_3_days_week":"true","fulfilled_last_3_months":"true","onset_at_least_6_months":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/levothyroxine-dose":{"get":{"description":"Estimate an adult full-replacement daily levothyroxine (LT4) dose from body weight using the ATA 2014 average of approximately 1.6 μg/kg per day.\n\nWhen an agent needs the published ATA adult full-replacement estimate and must not invent TSH-guided titration, a tablet strength, a pediatric dose, or pregnancy-specific dosing.\n\nNot a prescription, TSH-guided titration, pediatric dose, or pregnancy-specific dose. The ATA guideline notes adjustments in pregnancy; this tool is the adult full-replacement estimate only.\n\nThe estimate may need lean-body-mass adjustment (ATA). Elderly and cardiac patients often start lower; magent does not invent a second formula for those groups.\n\nmagent does not choose a tablet strength. Not a medical device. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"weight_kg","description":"Weight in kilograms (1-500). Provide weight_kg or weight_lb.","required":false,"schema":{"type":"number"},"example":"70"},{"in":"query","name":"weight_lb","description":"Weight in pounds (2-1100). Converted as kg = lb * 0.45359237.","required":false,"schema":{"type":"number"},"example":"154"}],"summary":"Levothyroxine dose","operationId":"get_api_calc_levothyroxine_dose","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, weight_kg, daily_lt4_mcg, citation, disclaimer."},"400":{"description":"invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/levothyroxine-dose"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Levothyroxine dose (bulk)","operationId":"post_api_calc_levothyroxine_dose","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_weight: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/levothyroxine-dose"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"weight_kg":"70"},{"weight_kg":"70"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ascod":{"get":{"description":"Echo caller-assigned Amarenco 2013 ASCOD grades for atherosclerosis (A), small-vessel disease (S), cardiac pathology (C), other causes (O), and dissection (D) and return the canonical phenotype string (for example A1-S0-C2-O0-D0). magent does not read imaging and does not convert the five grades into a single ASCOD score.\n\nWhen an agent already has Amarenco 2013 ASCOD grades as assigned by the caller and needs the canonical phenotype string. magent does not apply TOAST or CCS, does not read imaging, and does not assign treatment.\n\nNot a medical device. magent does not read imaging.\n\nThe caller assigns each ASCOD grade (1 potentially causal, 2 causality uncertain, 3 unlikely causal but the disease is present, 0 absence of disease, 9 insufficient workup). magent does not grade from stenosis percent, infarct pattern, or cardiac tests.\n\nNot TOAST and not CCS. ASCOD describes overlapping phenotypes, not a single causative subtype.\n\nThe five grades are independent and are not summed into an ASCOD score. magent does not invent treatment. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"atherosclerosis","description":"Caller-assigned Amarenco 2013 atherosclerosis (A) grade: 1 potentially causal, 2 causality uncertain, 3 unlikely causal but the disease is present, 0 absence of disease, or 9 insufficient workup. magent does not read imaging.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,9]},"example":"0"},{"in":"query","name":"small_vessel","description":"Caller-assigned Amarenco 2013 small-vessel disease (S) grade: 1 potentially causal, 2 causality uncertain, 3 unlikely causal but the disease is present, 0 absence of disease, or 9 insufficient workup. magent does not read imaging.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,9]},"example":"0"},{"in":"query","name":"cardiac","description":"Caller-assigned Amarenco 2013 cardiac pathology (C) grade: 1 potentially causal, 2 causality uncertain, 3 unlikely causal but the disease is present, 0 absence of disease, or 9 insufficient workup. magent does not read imaging.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,9]},"example":"0"},{"in":"query","name":"other","description":"Caller-assigned Amarenco 2013 other causes (O) grade: 1 potentially causal, 2 causality uncertain, 3 unlikely causal but the disease is present, 0 absence of disease, or 9 insufficient workup. magent does not read imaging.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,9]},"example":"0"},{"in":"query","name":"dissection","description":"Caller-assigned Amarenco 2013 dissection (D) grade: 1 potentially causal, 2 causality uncertain, 3 unlikely causal but the disease is present, 0 absence of disease, or 9 insufficient workup. magent does not read imaging.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,9]},"example":"0"}],"summary":"ASCOD","operationId":"get_api_calc_ascod","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, phenotype, atherosclerosis, small_vessel, cardiac, other, dissection, components, citation, disclaimer."},"400":{"description":"invalid_ascod: ASCOD needs Amarenco 2013 grades 0-3 (or 9 insufficient) for A, S, C, O, and D. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ascod"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ASCOD (bulk)","operationId":"post_api_calc_ascod","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ascod: ASCOD needs Amarenco 2013 grades 0-3 (or 9 insufficient) for A, S, C, O, and D. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ascod"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"atherosclerosis":"0","cardiac":"0","dissection":"0","other":"0","small_vessel":"0"},{"atherosclerosis":"0","cardiac":"0","dissection":"0","other":"0","small_vessel":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rome-iv-functional-gallbladder":{"get":{"description":"Apply the Cotton 2016 Rome IV E1a functional gallbladder disorder diagnostic criteria and return whether the published E1a box holds (rome_iv_functional_gallbladder) plus the two supportive flags.\n\nWhen an agent already has the nine caller-assigned Cotton 2016 Rome IV E1a flags and needs whether the published functional gallbladder box holds. magent does not read ultrasound, EUS, or HIDA or decide cholecystectomy.\n\nNot a medical device.\n\nNot a diagnosis. magent does not diagnose functional gallbladder disorder.\n\nThe caller assigns the nine flags. magent does not read ultrasound, EUS, or HIDA scintigraphy, and does not decide cholecystectomy.\n\nThis tool is Cotton 2016 Rome IV E1a functional gallbladder disorder only. Nested E1 biliary pain and absence of gallstones or other structural pathology are required. Low ejection fraction on gallbladder scintigraphy (GBEF) is supportive only and is not required. Normal liver enzymes, conjugated bilirubin, and amylase/lipase are supportive and not required. Not biliary SOD (E1b). Not pancreatic SOD (E2). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"epigastric_or_ruq_pain","description":"Epigastric or right upper quadrant pain, as assigned (Cotton 2016 Rome IV E1 biliary pain). true or false as assigned by the caller. magent does not examine the patient.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"builds_to_steady_level_lasts_30_min_or_longer","description":"Pain builds to a steady level and lasts 30 minutes or longer, as assigned (Cotton 2016 E1). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"occurring_at_different_intervals_not_daily","description":"Pain occurring at different intervals (not daily), as assigned (Cotton 2016 E1). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"severe_enough_to_interrupt_activities_or_ed_visit","description":"Pain severe enough to interrupt usual activities or lead to an emergency department visit, as assigned (Cotton 2016 E1). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"not_significantly_related_to_bowel_movements","description":"Pain not significantly related to bowel movements, as assigned (Cotton 2016 E1). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"not_significantly_relieved_by_postural_change_or_acid_suppression","description":"Pain not significantly relieved by postural change or acid suppression, as assigned (Cotton 2016 E1). true or false as assigned by the caller. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"absence_of_gallstones_or_other_structural_pathology","description":"Absence of gallstones or other structural pathology, as assigned (Cotton 2016 Rome IV E1a). true or false as assigned by the caller. magent does not read ultrasound, EUS, or other imaging.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"low_ef_on_gallbladder_scintigraphy","description":"Low ejection fraction on gallbladder scintigraphy, a supportive criterion that is not required for rome_iv_functional_gallbladder (Cotton 2016). true or false as assigned by the caller. magent does not read HIDA or decide cholecystectomy.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"normal_liver_enzymes_conjugated_bilirubin_amylase_lipase","description":"Normal liver enzymes, conjugated bilirubin, and amylase/lipase, a supportive criterion that is not required for rome_iv_functional_gallbladder (Cotton 2016). true or false as assigned by the caller. magent does not read laboratory results.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Rome IV FGBD","operationId":"get_api_calc_rome_iv_functional_gallbladder","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, low_ef_on_gallbladder_scintigraphy, normal_liver_enzymes_conjugated_bilirubin_amylase_lipase, rome_iv_functional_gallbladder, criteria, citation, disclaimer."},"400":{"description":"invalid_rome_iv_functional_gallbladder: Rome IV functional gallbladder needs the Cotton 2016 E1a biliary-pain and structural-exclusion flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-functional-gallbladder"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Rome IV FGBD (bulk)","operationId":"post_api_calc_rome_iv_functional_gallbladder","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_rome_iv_functional_gallbladder: Rome IV functional gallbladder needs the Cotton 2016 E1a biliary-pain and structural-exclusion flags. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rome-iv-functional-gallbladder"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"absence_of_gallstones_or_other_structural_pathology":"true","builds_to_steady_level_lasts_30_min_or_longer":"true","epigastric_or_ruq_pain":"true","low_ef_on_gallbladder_scintigraphy":"true","normal_liver_enzymes_conjugated_bilirubin_amylase_lipase":"true","not_significantly_related_to_bowel_movements":"true","not_significantly_relieved_by_postural_change_or_acid_suppression":"true","occurring_at_different_intervals_not_daily":"true","severe_enough_to_interrupt_activities_or_ed_visit":"true"},{"absence_of_gallstones_or_other_structural_pathology":"true","builds_to_steady_level_lasts_30_min_or_longer":"true","epigastric_or_ruq_pain":"true","low_ef_on_gallbladder_scintigraphy":"true","normal_liver_enzymes_conjugated_bilirubin_amylase_lipase":"true","not_significantly_related_to_bowel_movements":"true","not_significantly_relieved_by_postural_change_or_acid_suppression":"true","occurring_at_different_intervals_not_daily":"true","severe_enough_to_interrupt_activities_or_ed_visit":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mascc":{"get":{"description":"Sum the Klastersky 2000 MASCC risk-index weights for febrile neutropenia and return low-risk (≥21) or high-risk (<21).\n\nWhen an agent needs the published MASCC point total and must not invent an outpatient-chemotherapy or admission decision.\n\nNot a medical device and not an outpatient-chemotherapy, admission, or discharge order. magent does not examine the patient.\n\nBurden of illness is one caller-assigned value (none_or_mild, moderate, or severe), not cumulative. magent does not grade symptoms from a chart narrative.\n\nno_hypotension is the published SBP >90 mm Hg criterion as assigned by the caller. magent does not read a blood pressure.\n\nsolid_tumor_or_no_prior_fungal is one item: solid tumor or hematologic malignancy without previous fungal infection (Klastersky 2000). magent does not classify tumor type from histology text.\n\nLow-risk is score ≥21 (max 26). High-risk is score <21. This is the published index only. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"burden","description":"Caller-assigned burden of illness (none_or_mild, moderate, or severe). Klastersky 2000: none_or_mild → 5, moderate → 3, severe → 0. One value, not cumulative.","required":true,"schema":{"type":"string","enum":["none_or_mild","moderate","severe"]},"example":"none_or_mild"},{"in":"query","name":"no_hypotension","description":"No hypotension (SBP >90 mm Hg) as assigned by the caller (Klastersky 2000). true scores 5. magent does not read a blood pressure.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"no_copd","description":"No COPD as assigned by the caller (Klastersky 2000). true scores 4.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"solid_tumor_or_no_prior_fungal","description":"Solid tumor, or hematologic malignancy without previous fungal infection, as assigned by the caller (Klastersky 2000). One item. true scores 4.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"outpatient","description":"Outpatient status at fever onset as assigned by the caller (Klastersky 2000). true scores 3.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"no_dehydration","description":"No dehydration requiring parenteral fluids as assigned by the caller (Klastersky 2000). true scores 3.","required":true,"schema":{"type":"boolean"},"example":"true"},{"in":"query","name":"age_lt_60","description":"Age <60 years as assigned by the caller (Klastersky 2000). true scores 2. magent does not parse a numeric age here.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"MASCC","operationId":"get_api_calc_mascc","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, mascc_band, burden, components, citation, disclaimer."},"400":{"description":"invalid_mascc_burden: burden must be none_or_mild, moderate, or severe (Klastersky 2000 MASCC; not cumulative). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mascc"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"MASCC (bulk)","operationId":"post_api_calc_mascc","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_mascc_burden: burden must be none_or_mild, moderate, or severe (Klastersky 2000 MASCC; not cumulative). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mascc"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_lt_60":"true","burden":"none_or_mild","no_copd":"true","no_dehydration":"true","no_hypotension":"true","outpatient":"true","solid_tumor_or_no_prior_fungal":"true"},{"age_lt_60":"true","burden":"none_or_mild","no_copd":"true","no_dehydration":"true","no_hypotension":"true","outpatient":"true","solid_tumor_or_no_prior_fungal":"true"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/ottawa-copd":{"get":{"description":"Sum the ten Stiell 2014 Ottawa COPD Risk Scale flags and return the integer point total (max 16), Table 8 risk band, and tabulated SAE percent when published.\n\nWhen an agent needs the published Stiell 2014 Ottawa COPD Risk Scale point total from caller-assigned flags and must not invent ECG, walk-test, chest-radiograph, or laboratory findings or an admission decision.\n\nNot a medical device.\n\nNot an admission, discharge, or disposition order. Admission-threshold sensitivities of 91.2 / 80.9 / 60.3% at totals 1 / 2 / 3 are classification performance from the derivation cohort, not a recommendation to admit or discharge.\n\nThis is the Stiell 2014 derivation (Tables 6-8). It is not the 2018 validation as the formula source. It is not BAP-65 and not DECAF.\n\nThe caller assigns all ten flags after applying the published cutoffs. magent does not walk the patient, measure heart rate, interpret the ECG, read the chest radiograph, or assay hemoglobin, urea, or serum CO2.\n\nTable 8 SAE percents are returned only for tabulated scores (0-8 and 10). Score 9 and totals >10 had no published SAE percent; none is invented. The paper notes no patients had score >10. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"cabg","description":"Prior coronary artery bypass graft as assigned by the caller (Stiell 2014; 1 point if true). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pvd_intervention","description":"Peripheral vascular disease intervention as assigned by the caller (Stiell 2014; 1 point if true). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"intubation_respiratory","description":"Intubation for respiratory distress as assigned by the caller (Stiell 2014; 2 points if true). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hr_arrival_ge_110","description":"Heart rate on ED arrival >=110/min as assigned by the caller after applying the Stiell 2014 cutoff (2 points if true). true or false. magent does not measure heart rate.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"too_ill_to_walk","description":"Too ill to do the walk test after ED treatment, or heart rate >=120/min with SaO2 <90%, as assigned by the caller (Stiell 2014; one 2-point item, not two). true or false. magent does not walk the patient.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ischemic_ecg","description":"Acute ischemic changes on ECG as assigned by the caller (Stiell 2014; 2 points if true). true or false. magent does not interpret the ECG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pulmonary_congestion","description":"Pulmonary congestion on chest radiograph as assigned by the caller (Stiell 2014; 1 point if true). true or false. magent does not read the chest radiograph.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hemoglobin_lt_100","description":"Hemoglobin <100 g/L as assigned by the caller after applying the Stiell 2014 cutoff (3 points if true). true or false. magent does not assay hemoglobin.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"urea_ge_12","description":"Urea >=12 mmol/L as assigned by the caller after applying the Stiell 2014 cutoff (1 point if true). true or false. magent does not assay urea.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"serum_co2_ge_35","description":"Serum CO2 >=35 mmol/L as assigned by the caller after applying the Stiell 2014 cutoff (1 point if true). true or false. magent does not assay CO2.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Ottawa COPD Risk Scale","operationId":"get_api_calc_ottawa_copd","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, ottawa_copd_band, sae_percent, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ottawa-copd"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Ottawa COPD Risk Scale (bulk)","operationId":"post_api_calc_ottawa_copd","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/ottawa-copd"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"cabg":"false","hemoglobin_lt_100":"false","hr_arrival_ge_110":"false","intubation_respiratory":"false","ischemic_ecg":"false","pulmonary_congestion":"false","pvd_intervention":"false","serum_co2_ge_35":"false","too_ill_to_walk":"false","urea_ge_12":"false"},{"cabg":"false","hemoglobin_lt_100":"false","hr_arrival_ge_110":"false","intubation_respiratory":"false","ischemic_ecg":"false","pulmonary_congestion":"false","pvd_intervention":"false","serum_co2_ge_35":"false","too_ill_to_walk":"false","urea_ge_12":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/rox":{"get":{"description":"Compute the ROX index as pulse-oximetry SpO2 percent divided by inspired oxygen fraction, then divided by respiratory rate.\n\nWhen an agent needs (SpO2/FiO2)/respiratory_rate and must not invent HFNC success or failure, a PaO2/FiO2 ratio, or RSBI.\n\nNot a diagnosis and not a ventilation order.\n\nMagent does not apply the 4.88 12-hour HFNC success/failure cutoff; that threshold is time-contextual in Roca 2016.\n\nThis is not the PaO2/FiO2 (P/F) ratio.\n\nThis is not RSBI (respiratory rate divided by tidal volume). Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"spo2_percent","description":"Pulse-oximetry SpO2 as a percent (50-100).","required":true,"schema":{"type":"number"},"example":"95"},{"in":"query","name":"fio2","description":"Inspired oxygen as a fraction (0.21-1.0), not a percent. Required.","required":true,"schema":{"type":"number"},"example":"0.21"},{"in":"query","name":"respiratory_rate","description":"Respiratory rate in breaths/min (integer 4-80).","required":true,"schema":{"type":"integer"},"example":"20"}],"summary":"ROX index","operationId":"get_api_calc_rox","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, spo2_percent, fio2, respiratory_rate, rox, citation, disclaimer."},"400":{"description":"invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_fio2: fio2 must be a fraction from 0.21 to 1.0. Returned before settlement; you are not charged.; invalid_respiratory_rate: respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rox"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ROX index (bulk)","operationId":"post_api_calc_rox","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_fio2: fio2 must be a fraction from 0.21 to 1.0. Returned before settlement; you are not charged.; invalid_respiratory_rate: respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/rox"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"fio2":"0.21","respiratory_rate":"20","spo2_percent":"95"},{"fio2":"0.21","respiratory_rate":"20","spo2_percent":"95"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/bri":{"get":{"description":"Compute Thomas 2013 body roundness index from height and waist by modeling the body as an ellipse.\n\nWhen an agent needs the published Thomas 2013 BRI and must not invent a body-fat or VAT percentage.\n\nNot a medical device. magent does not measure the patient.\n\nNot a VAT or body-fat diagnosis. Thomas 2013 relates BRI to adipose tissue; this response is BRI only.\n\nDoes not apply all-cause-mortality quintiles. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"height_cm","description":"Height in centimeters. Provide height_cm or height_in.","required":false,"schema":{"type":"number"},"example":"170"},{"in":"query","name":"waist_cm","description":"Waist circumference in centimeters (40-200). Compared to height in cm after normalize.","required":true,"schema":{"type":"number"},"example":"80"},{"in":"query","name":"height_in","description":"Height in inches. Converted as cm = in * 2.54.","required":false,"schema":{"type":"number"},"example":"67"}],"summary":"BRI","operationId":"get_api_calc_bri","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, height_cm, waist_cm, bri, citation, disclaimer."},"400":{"description":"invalid_height: height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.; invalid_waist_range: waist_cm must be a number from 40 to 200. Returned before settlement; you are not charged.; invalid_bri_geometry: waist and height must satisfy waist/(pi*height) < 1 so eccentricity is defined (Thomas 2013 BRI). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bri"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"BRI (bulk)","operationId":"post_api_calc_bri","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_height: height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.; invalid_waist_range: waist_cm must be a number from 40 to 200. Returned before settlement; you are not charged.; invalid_bri_geometry: waist and height must satisfy waist/(pi*height) < 1 so eccentricity is defined (Thomas 2013 BRI). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bri"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"height_cm":"170","waist_cm":"80"},{"height_cm":"170","waist_cm":"80"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/prs":{"get":{"description":"Compute the Lipsett 2022 Pneumonia Risk Score logistic probability of radiographic pneumonia in children 3 months to 18 years, and the supplement integer score 1–6, from age, triage oxygen saturation, fever, rales, and wheeze.\n\nWhen an agent already has caller-assigned pediatric age, triage saturation, fever, rales, and wheeze for a child in whom CXR was considered for suspected pneumonia and needs the published Lipsett 2022 probability and score, not a pneumonia diagnosis and not a CXR or antibiotic order.\n\nNot a medical device. magent does not diagnose pneumonia and does not order a chest radiograph or antibiotics.\n\nNot CURB-65. CURB-65 is an adult severity score. This is the Lipsett 2022 pediatric radiographic-pneumonia model only.\n\nDerived and validated in children whose clinicians already obtained a CXR for suspected pneumonia. Broad use in all respiratory illness may overestimate probability.\n\nAge, saturation, fever, rales, and wheeze are caller-assigned. magent does not auscultate or take a saturation.\n\nScore 1–6 is the published SDC mapping from the logistic probability. magent does not invent additional named risk bands. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_years","description":"Age in years, continuous (0.25-18). Lipsett 2022 enrolled children 3 months to 18 years. Not adult Params.age.","required":true,"schema":{"type":"number"},"example":"2"},{"in":"query","name":"spo2_percent","description":"Triage / first oxygen saturation percent (50-100). Caller-assigned. magent does not measure saturation.","required":true,"schema":{"type":"number"},"example":"99"},{"in":"query","name":"fever","description":"Fever at home or in the ED (Lipsett 2022 SDC: >38°C). true or false. Caller-assigned.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"rales","description":"Rales / crackles on exam as assigned by the caller (Lipsett 2022). true or false. magent does not auscultate.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"wheeze","description":"Wheeze on exam as assigned by the caller (Lipsett 2022). true or false. magent does not auscultate.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"PRS","operationId":"get_api_calc_prs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, spo2_percent, fever, rales, wheeze, logit, probability_percent, score, max_score, citation, disclaimer."},"400":{"description":"invalid_prs: PRS inputs must match Lipsett 2022 age, triage oxygen saturation, fever, rales, and wheeze from that paper. Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/prs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PRS (bulk)","operationId":"post_api_calc_prs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_prs: PRS inputs must match Lipsett 2022 age, triage oxygen saturation, fever, rales, and wheeze from that paper. Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/prs"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_years":"2","fever":"false","rales":"false","spo2_percent":"99","wheeze":"false"},{"age_years":"2","fever":"false","rales":"false","spo2_percent":"99","wheeze":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/orbi":{"get":{"description":"Sum the Auffret 2018 ORBI predictors after STEMI primary PCI and return the integer score (0-36), class I-IV, and derivation-cohort in-hospital cardiogenic-shock percent.\n\nWhen an agent needs the published ORBI point total after STEMI treated by primary PCI and must not invent a shock-treatment order, a cath-lab protocol, or the ORBIT bleeding score.\n\nNot a medical device and not a cath-lab, reperfusion, or shock-treatment order. magent does not examine the patient, read the ECG, or assign TIMI flow.\n\nKillip class is i, ii, or iii as assigned by the caller. Killip IV (cardiogenic shock on admission) is rejected because the derivation excluded those patients.\n\nSBP <125 mm Hg and pulse pressure <45 mm Hg is a single caller-assigned boolean (sbp_lt_125_and_pp_lt_45). magent does not take separate SBP or pulse-pressure numbers.\n\nClass percents are the Auffret 2018 derivation-cohort observed in-hospital cardiogenic-shock rates (I 1.3%, II 6.6%, III 11.7%, IV 31.8%). Validation-cohort rates differ and are not returned.\n\nNot the O'Brien 2015 ORBIT bleeding score. Integer weights round the multivariable adjusted odds ratios; theoretical maximum 36. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_years","description":"Age in years (18-120). Auffret 2018: older than 70 scores 2; 70 or younger scores 0.","required":true,"schema":{"type":"integer"},"example":"60"},{"in":"query","name":"prior_stroke_tia","description":"Prior stroke or TIA (Auffret 2018: 2 points). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"cardiac_arrest_on_admission","description":"Cardiac arrest on admission (Auffret 2018: 3 points). true or false.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"anterior_stemi","description":"Anterior ST-elevation myocardial infarction (Auffret 2018: 1 point). Caller-assigned. magent does not read the ECG.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"fmc_to_ppci_gt_90_min","description":"First medical contact to primary PCI greater than 90 minutes (Auffret 2018: 2 points). true or false. magent does not compute timestamps.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"killip_class","description":"Caller-assigned Killip class after STEMI (Auffret 2018): i (0), ii (2), or iii (6). Killip IV is rejected because the derivation excluded cardiogenic shock on admission. magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["i","ii","iii"]},"example":"i"},{"in":"query","name":"heart_rate","description":"Heart rate in beats per minute (integer 30-220). Auffret 2018: greater than 90 scores 3.","required":true,"schema":{"type":"integer"},"example":"70"},{"in":"query","name":"sbp_lt_125_and_pp_lt_45","description":"Whether systolic BP is <125 mm Hg and pulse pressure is <45 mm Hg together (Auffret 2018: 4 points). Single caller-assigned boolean; magent does not take separate SBP or pulse-pressure numbers.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"glucose_gt_10_mmol_l","description":"Admission glucose >10 mmol/L (Auffret 2018: 3 points). true or false. magent does not convert units.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"left_main_culprit","description":"Whether the culprit lesion is the left main coronary artery (Auffret 2018: 5 points). Caller-assigned. magent does not read the angiogram.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"post_ppci_timi_lt_3","description":"Whether post-primary-PCI TIMI flow is <3 (Auffret 2018: 5 points). Caller-assigned. magent does not assign TIMI flow.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"ORBI","operationId":"get_api_calc_orbi","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, orbi_class, in_hospital_cs_percent, age_years, killip_class, heart_rate, components, citation, disclaimer."},"400":{"description":"invalid_orbi: ORBI needs Auffret 2018 STEMI shock predictors (Killip I–III, hemodynamics, lesion, TIMI) in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/orbi"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ORBI (bulk)","operationId":"post_api_calc_orbi","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_orbi: ORBI needs Auffret 2018 STEMI shock predictors (Killip I–III, hemodynamics, lesion, TIMI) in published ranges. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/orbi"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_years":"60","anterior_stemi":"false","cardiac_arrest_on_admission":"false","fmc_to_ppci_gt_90_min":"false","glucose_gt_10_mmol_l":"false","heart_rate":"70","killip_class":"i","left_main_culprit":"false","post_ppci_timi_lt_3":"false","prior_stroke_tia":"false","sbp_lt_125_and_pp_lt_45":"false"},{"age_years":"60","anterior_stemi":"false","cardiac_arrest_on_admission":"false","fmc_to_ppci_gt_90_min":"false","glucose_gt_10_mmol_l":"false","heart_rate":"70","killip_class":"i","left_main_culprit":"false","post_ppci_timi_lt_3":"false","prior_stroke_tia":"false","sbp_lt_125_and_pp_lt_45":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/gupta-prf":{"get":{"description":"Compute the Gupta 2011 Chest logistic probability of postoperative respiratory failure (mechanical ventilation >48 h after surgery or unplanned intubation within 30 days) from ASA class, functional status, preoperative sepsis, emergency case, and surgery type.\n\nWhen an agent needs the published Gupta 2011 Chest PRF probability and must not invent a ventilator order, a diagnosis, ARISCAT points, or a low/high cutoff.\n\nNot a medical device. Not a diagnosis and not a ventilator order.\n\nGupta 2011 Chest logistic PRF model only. This is not ARISCAT and not a surgical clearance.\n\nGupta 2011 does not publish a low or high PRF cutoff; magent does not invent one.\n\nAge and laboratory values are not in the published table.\n\nfunctional_status, sepsis, emergency, and surgery are caller-assigned published categories. magent does not examine the patient or classify the procedure from a CPT code. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"functional_status","description":"Gupta 2011 Chest functional status as assigned by the caller: independent (reference, 0), partially_dependent (+0.7678), or totally_dependent (+1.4046). magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["independent","partially_dependent","totally_dependent"]},"example":"independent"},{"in":"query","name":"asa_class","description":"ASA physical status 1-5 (Gupta 2011 Chest logistic table; class 5 is the reference). class 1 -3.5265, class 2 -2.0008, class 3 -0.6201, class 4 +0.2441, class 5 adds 0. Caller-assigned integer.","required":true,"schema":{"type":"integer"},"example":"2"},{"in":"query","name":"sepsis","description":"Gupta 2011 Chest preoperative sepsis category as assigned by the caller: none (-0.7840), sirs (reference, 0), sepsis (+0.2752), or septic_shock (+0.9035). magent does not diagnose sepsis.","required":true,"schema":{"type":"string","enum":["none","sirs","sepsis","septic_shock"]},"example":"none"},{"in":"query","name":"emergency","description":"Gupta 2011 Chest emergency case as assigned by the caller: true (reference, 0) or false (elective, -0.5739).","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"surgery","description":"Gupta 2011 Chest procedure category as assigned by the caller. hernia (ventral, inguinal, or femoral) is the reference (0). gbaas is gallbladder, appendix, adrenal, or spleen. thoracic is non-esophageal thoracic. orthopedic is orthopedic or non-vascular extremity. ent excludes thyroid/parathyroid (neck). magent does not classify a CPT code.","required":true,"schema":{"type":"string","enum":["hernia","anorectal","aortic","bariatric","brain","breast","cardiac","ent","foregut_hpb","gbaas","intestinal","neck","obstetric_gynecologic","orthopedic","other_abdomen","peripheral_vascular","skin","spine","thoracic","vein","urology"]},"example":"hernia"}],"summary":"Gupta PRF","operationId":"get_api_calc_gupta_prf","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, functional_status, asa_class, sepsis, emergency, surgery, logit, estimated_probability_percent, citation, disclaimer."},"400":{"description":"invalid_gupta_prf: Gupta postoperative respiratory failure needs the published NSQIP predictors in range. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gupta-prf"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Gupta PRF (bulk)","operationId":"post_api_calc_gupta_prf","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_gupta_prf: Gupta postoperative respiratory failure needs the published NSQIP predictors in range. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gupta-prf"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"asa_class":"2","emergency":"false","functional_status":"independent","sepsis":"none","surgery":"hernia"},{"asa_class":"2","emergency":"false","functional_status":"independent","sepsis":"none","surgery":"hernia"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/hscore":{"get":{"description":"Sum the nine Fardet 2014 Table 4 HScore items from caller-assigned bands and return whether the total is ≥169 (published best cutoff).\n\nWhen an agent has already assigned Fardet 2014 Table 4 bands (not raw labs) and needs the published HScore total and ≥169 cutoff, not an HLH-2004 diagnosis and not a Table 5 probability for every integer.\n\nNot a medical device. Not a diagnosis of reactive hemophagocytic syndrome, HLH, or macrophage activation syndrome.\n\nThis is Fardet 2014 Table 4 HScore only. Not HLH-2004. magent does not interpolate Table 5 probabilities for every integer.\n\nAll nine Table 4 items are required. magent does not take raw labs; the caller assigns published bands.\n\nBone marrow hemophagocytosis is one scored item (35 points if present). It is not required for a diagnosis; this tool is not a diagnosis. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"immunosuppression","description":"Known underlying immunosuppression as assigned by the caller (Fardet 2014 Table 4 footnote: HIV positive or long-term glucocorticoids, cyclosporine, or azathioprine). true scores 18; false scores 0.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"temperature_band","description":"Caller-assigned Fardet 2014 Table 4 temperature band (°C). lt_38_4 (<38.4) scores 0; 38_4_to_39_4 (38.4–39.4) scores 33; gt_39_4 (>39.4) scores 49. magent does not take a raw temperature.","required":true,"schema":{"type":"string"},"example":"lt_38_4"},{"in":"query","name":"organomegaly","description":"Caller-assigned Fardet 2014 Table 4 organomegaly. none scores 0; hepato_or_spleno (hepatomegaly or splenomegaly) scores 23; hepato_and_spleno (hepatomegaly and splenomegaly) scores 38. magent does not examine the patient.","required":true,"schema":{"type":"string"},"example":"none"},{"in":"query","name":"cytopenia_lineages","description":"Caller-assigned number of cytopenia lineages (integer 1, 2, or 3). 1 scores 0; 2 scores 24; 3 scores 34. Zero cytopenias were not assessed in Fardet 2014 and are rejected. Cytopenia definition (paper footnote, caller already applied): Hb ≤9.2 g/dL and/or WBC ≤5000/mm³ and/or platelets ≤110000/mm³. magent does not take those labs.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"ferritin_band","description":"Caller-assigned Fardet 2014 Table 4 ferritin band (ng/ml). lt_2000 (<2000) scores 0; 2000_to_6000 (2000–6000) scores 35; gt_6000 (>6000) scores 50. magent does not take a raw ferritin.","required":true,"schema":{"type":"string"},"example":"lt_2000"},{"in":"query","name":"triglyceride_band","description":"Caller-assigned Fardet 2014 Table 4 triglyceride band (mmol/L). lt_1_5 (<1.5) scores 0; 1_5_to_4 (1.5–4.0) scores 44; gt_4 (>4.0) scores 64. magent does not take a raw triglyceride.","required":true,"schema":{"type":"string"},"example":"lt_1_5"},{"in":"query","name":"fibrinogen_band","description":"Caller-assigned Fardet 2014 Table 4 fibrinogen band (g/L). gt_2_5 (>2.5) scores 0; le_2_5 (≤2.5) scores 30. magent does not take a raw fibrinogen.","required":true,"schema":{"type":"string"},"example":"gt_2_5"},{"in":"query","name":"sgot_band","description":"Caller-assigned Fardet 2014 Table 4 SGOT/AST band (IU/L). lt_30 (<30) scores 0; ge_30 (≥30) scores 19. magent does not take a raw SGOT.","required":true,"schema":{"type":"string"},"example":"lt_30"},{"in":"query","name":"marrow_hemophagocytosis","description":"Hemophagocytosis features on bone marrow aspirate as assigned by the caller (Fardet 2014 Table 4). true scores 35; false scores 0. Not required for a diagnosis; this tool is not a diagnosis.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"HScore","operationId":"get_api_calc_hscore","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, score_ge_169, components, citation, disclaimer."},"400":{"description":"invalid_hscore_band: temperature_band, organomegaly, cytopenia_lineages, ferritin_band, triglyceride_band, fibrinogen_band, and sgot_band must be Fardet 2014 Table 4 values. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hscore"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"HScore (bulk)","operationId":"post_api_calc_hscore","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_hscore_band: temperature_band, organomegaly, cytopenia_lineages, ferritin_band, triglyceride_band, fibrinogen_band, and sgot_band must be Fardet 2014 Table 4 values. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hscore"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"cytopenia_lineages":"1","ferritin_band":"lt_2000","fibrinogen_band":"gt_2_5","immunosuppression":"false","marrow_hemophagocytosis":"false","organomegaly":"none","sgot_band":"lt_30","temperature_band":"lt_38_4","triglyceride_band":"lt_1_5"},{"cytopenia_lineages":"1","ferritin_band":"lt_2000","fibrinogen_band":"gt_2_5","immunosuppression":"false","marrow_hemophagocytosis":"false","organomegaly":"none","sgot_band":"lt_30","temperature_band":"lt_38_4","triglyceride_band":"lt_1_5"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/gout-rule":{"get":{"description":"Sum the Janssens 2010 diagnostic-rule points for acute gouty arthritis without joint-fluid analysis and return low (≤4), intermediate (4.5–7.5), or high (≥8).\n\nWhen an agent needs the published primary-care gout diagnostic-rule total and must not invent a gout diagnosis or replace synovial crystal analysis.\n\nNot a medical device and not a gout diagnosis. magent does not examine joints or replace synovial crystal analysis.\n\nSerum uric acid is a caller-supplied number; magent does not assay it. mg/dL >5.88 or µmol/L >350 scores 3.5; equality does not.\n\nProvide uric_acid_mg_dl (1–20) or uric_acid_umol_l (60–1190), not both. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"sex","description":"Caller-assigned sex (Janssens 2010). male scores 2.0; female scores 0. magent does not assign sex.","required":true,"schema":{"type":"string","enum":["female","male"]},"example":"female"},{"in":"query","name":"previous_arthritis_attack","description":"Previous patient-reported arthritis attack (Janssens 2010). true scores 2.0. magent does not take a history.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"onset_within_1_day","description":"Onset within 1 day (Janssens 2010). true scores 0.5. magent does not timestamp onset.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"joint_redness","description":"Joint redness as assigned by the caller (Janssens 2010). true scores 1.0. magent does not examine joints.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"mtp1_involvement","description":"Involvement of the first metatarsophalangeal joint (Janssens 2010). true scores 2.5. magent does not examine joints.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hypertension_or_cvd","description":"Hypertension or one or more cardiovascular diseases (Janssens 2010). true scores 1.5. magent does not diagnose hypertension or cardiovascular disease.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"uric_acid_mg_dl","description":"Serum uric acid in mg/dL (1-20). Provide this or uric_acid_umol_l, not both. Scores 3.5 when >5.88; 5.88 does not score. magent does not assay uric acid.","required":false,"schema":{"type":"number"},"example":"5.0"},{"in":"query","name":"uric_acid_umol_l","description":"Serum uric acid in µmol/L (60-1190). Provide this or uric_acid_mg_dl, not both. Scores 3.5 when >350; 350 does not score. magent does not assay uric acid.","required":false,"schema":{"type":"number"},"example":"300"}],"summary":"Gout rule","operationId":"get_api_calc_gout_rule","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, gout_band, components, citation, disclaimer."},"400":{"description":"invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_uric_acid: uric_acid_mg_dl (1-20) or uric_acid_umol_l (60-1190) is required, not both. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gout-rule"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Gout rule (bulk)","operationId":"post_api_calc_gout_rule","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_sex: sex must be female or male Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_uric_acid: uric_acid_mg_dl (1-20) or uric_acid_umol_l (60-1190) is required, not both. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gout-rule"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"hypertension_or_cvd":"false","joint_redness":"false","mtp1_involvement":"false","onset_within_1_day":"false","previous_arthritis_attack":"false","sex":"female","uric_acid_mg_dl":"5.0"},{"hypertension_or_cvd":"false","joint_redness":"false","mtp1_involvement":"false","onset_within_1_day":"false","previous_arthritis_attack":"false","sex":"female","uric_acid_mg_dl":"5.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/isth-bat":{"get":{"description":"Sum fourteen caller-assigned Rodeghiero 2010 ISTH/SSC BAT symptom integers (Table S1, 0-4; cns_bleeding 0, 3, or 4) and return the published total (max 56). Does not apply later abnormal cutoffs.\n\nWhen an agent has already assigned Rodeghiero 2010 Table S1 integers for all fourteen symptoms and needs the published sum. magent does not take a bleeding history, diagnose VWD, or apply Elbatarny 2014 / WFH abnormal cutoffs.\n\nNot a medical device and not a diagnosis of VWD or any inherited bleeding disorder.\n\nmagent does not take the bleeding history. Each of the fourteen symptoms is a caller-assigned integer from Rodeghiero 2010 Table S1.\n\ncns_bleeding is 0, 3, or 4 only (never; subdural, any intervention; intracerebral, any intervention). Grades 1 and 2 are not used in Table S1.\n\nThis 2010 proposal letter did not identify an abnormal bleeding score. magent returns score and max_score only and does not apply later Elbatarny 2014 or WFH ≥4 male / ≥6 female / ≥3 child cutoffs.\n\nNegative scores for surgery, tooth extraction, and postpartum bleeding are not in this bleeding score. Only the most severe score ever recorded per symptom, and only symptoms before or at diagnosis, are caller-side. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"epistaxis","description":"Caller-assigned Rodeghiero 2010 Table S1 epistaxis integer (0-4). 0 no/trivial; 1 >5/year or >10 minutes; 2 consultation only; 3 packing, cauterization, or antifibrinolytic; 4 blood transfusion, replacement therapy, or desmopressin. magent does not take the bleeding history.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"cutaneous","description":"Caller-assigned Rodeghiero 2010 Table S1 cutaneous integer (0-4). 0 no/trivial; 1 five or more bruises >1 cm in exposed areas; 2 consultation only; 3 extensive; 4 spontaneous hematoma requiring blood transfusion. magent does not take the bleeding history.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"minor_wounds","description":"Caller-assigned Rodeghiero 2010 Table S1 bleeding from minor wounds integer (0-4). 0 no/trivial; 1 >5/year or >10 minutes; 2 consultation only; 3 surgical hemostasis; 4 blood transfusion, replacement therapy, or desmopressin. magent does not take the bleeding history.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"oral_cavity","description":"Caller-assigned Rodeghiero 2010 Table S1 oral-cavity integer (0-4). 0 no/trivial; 1 present; 2 consultation only; 3 surgical hemostasis or antifibrinolytic; 4 blood transfusion, replacement therapy, or desmopressin. magent does not take the bleeding history.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"gi_bleeding","description":"Caller-assigned Rodeghiero 2010 Table S1 GI bleeding integer (0-4). 0 no/trivial; 1 present not associated with ulcer, portal hypertension, hemorrhoids, or angiodysplasia; 2 consultation only; 3 surgical hemostasis or antifibrinolytic; 4 blood transfusion, replacement therapy, or desmopressin. magent does not take the bleeding history.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"hematuria","description":"Caller-assigned Rodeghiero 2010 Table S1 hematuria integer (0-4). 0 no/trivial; 1 present (macroscopic); 2 consultation only; 3 surgical hemostasis or iron therapy; 4 blood transfusion, replacement therapy, or desmopressin. magent does not take the bleeding history.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"tooth_extraction","description":"Caller-assigned Rodeghiero 2010 Table S1 tooth-extraction integer (0-4). 0 no/trivial or none done; 1 referred in ≤25% of procedures, no intervention; 2 referred in >25% of procedures, no intervention; 3 resuturing or packing; 4 blood transfusion, replacement therapy, or desmopressin. magent does not take the bleeding history.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"surgery","description":"Caller-assigned Rodeghiero 2010 Table S1 surgery integer (0-4). 0 no/trivial or none done; 1 referred in ≤25% of procedures, no intervention; 2 referred in >25% of procedures, no intervention; 3 surgical hemostasis or antifibrinolytics; 4 blood transfusion, replacement therapy, or desmopressin. magent does not take the bleeding history.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"menorrhagia","description":"Caller-assigned Rodeghiero 2010 Table S1 menorrhagia integer (0-4). 0 no/trivial; 1 consultation only, pads more often than every 2 hours, clot and flooding, or PBAC >100; 2 time off work/school >2/year or antifibrinolytics, hormonal, or iron therapy; 3 combined antifibrinolytics and hormonal therapy, or present since menarche and >12 months; 4 acute menorrhagia requiring hospital admission and emergency treatment, transfusion/replacement/desmopressin, or dilatation and curettage, endometrial ablation, or hysterectomy. magent does not take the bleeding history.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"postpartum_hemorrhage","description":"Caller-assigned Rodeghiero 2010 Table S1 postpartum-hemorrhage integer (0-4). 0 no/trivial or no deliveries; 1 consultation only, use of syntocin, or lochia >6 weeks; 2 iron therapy or antifibrinolytics; 3 blood transfusion, replacement therapy, desmopressin, examination under anaesthesia, or uterine balloon/packing; 4 any procedure requiring critical care or surgical intervention. magent does not take the bleeding history.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"muscle_hematomas","description":"Caller-assigned Rodeghiero 2010 Table S1 muscle-hematomas integer (0-4). 0 never; 1 post trauma, no therapy; 2 spontaneous, no therapy; 3 spontaneous or traumatic, requiring desmopressin or replacement therapy; 4 spontaneous or traumatic, requiring surgical intervention or blood transfusion. magent does not take the bleeding history.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"hemarthrosis","description":"Caller-assigned Rodeghiero 2010 Table S1 hemarthrosis integer (0-4). 0 never; 1 post trauma, no therapy; 2 spontaneous, no therapy; 3 spontaneous or traumatic, requiring desmopressin or replacement therapy; 4 spontaneous or traumatic, requiring surgical intervention or blood transfusion. magent does not take the bleeding history.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"},{"in":"query","name":"cns_bleeding","description":"Caller-assigned Rodeghiero 2010 Table S1 CNS bleeding integer (0, 3, or 4 only). 0 never; 3 subdural, any intervention; 4 intracerebral, any intervention. Grades 1 and 2 are not used in Table S1. magent does not take the bleeding history.","required":true,"schema":{"type":"integer","enum":[0,3,4]},"example":"0"},{"in":"query","name":"other_bleeding","description":"Caller-assigned Rodeghiero 2010 Table S1 other bleedings integer, including infancy-specific symptoms (0-4). 0 no/trivial; 1 present; 2 consultation only; 3 surgical hemostasis, antifibrinolytics, or iron therapy; 4 blood transfusion, replacement therapy, or desmopressin. magent does not take the bleeding history.","required":true,"schema":{"type":"integer","enum":[0,1,2,3,4]},"example":"0"}],"summary":"ISTH BAT","operationId":"get_api_calc_isth_bat","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, components, citation, disclaimer."},"400":{"description":"invalid_isth_bat_item: each ISTH BAT symptom rating must be an integer from 0 to 4 (Rodeghiero 2010 Table S1; cns_bleeding is 0, 3, or 4 only). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/isth-bat"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ISTH BAT (bulk)","operationId":"post_api_calc_isth_bat","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_isth_bat_item: each ISTH BAT symptom rating must be an integer from 0 to 4 (Rodeghiero 2010 Table S1; cns_bleeding is 0, 3, or 4 only). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/isth-bat"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"cns_bleeding":"0","cutaneous":"0","epistaxis":"0","gi_bleeding":"0","hemarthrosis":"0","hematuria":"0","menorrhagia":"0","minor_wounds":"0","muscle_hematomas":"0","oral_cavity":"0","other_bleeding":"0","postpartum_hemorrhage":"0","surgery":"0","tooth_extraction":"0"},{"cns_bleeding":"0","cutaneous":"0","epistaxis":"0","gi_bleeding":"0","hemarthrosis":"0","hematuria":"0","menorrhagia":"0","minor_wounds":"0","muscle_hematomas":"0","oral_cavity":"0","other_bleeding":"0","postpartum_hemorrhage":"0","surgery":"0","tooth_extraction":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/adhere":{"get":{"description":"Apply the Fonarow 2005 ADHERE classification and regression tree for in-hospital mortality risk in acutely decompensated heart failure from admission BUN, systolic blood pressure, and serum creatinine.\n\nWhen an agent has caller-supplied admission BUN, systolic BP, and creatinine and needs the published ADHERE CART terminal group, not the paper's logistic regression, not GWTG-HF, and not a treatment or ICU order.\n\nNot a medical device. magent does not examine the patient and does not measure BUN, blood pressure, or creatinine.\n\nNot a heart-failure diagnosis or treatment/ICU order. This is the Fonarow 2005 CART bedside tree only, not the paper's logistic regression.\n\nThis is not GWTG-HF. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"bun_mg_dl","description":"Admission blood urea nitrogen in mg/dL (1-200). Fonarow 2005 CART first split is BUN >= 43. magent does not measure BUN.","required":true,"schema":{"type":"number"},"example":"20"},{"in":"query","name":"systolic_bp_mm_hg","description":"Admission systolic blood pressure in mm Hg (integer 50-250). Fonarow 2005 CART second split is SBP < 115. magent does not measure blood pressure.","required":true,"schema":{"type":"integer"},"example":"140"},{"in":"query","name":"creatinine_mg_dl","description":"Admission serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l, not both. Fonarow 2005 CART consults creatinine only when BUN >= 43 and SBP < 115; the split is creatinine >= 2.75. magent does not measure creatinine.","required":false,"schema":{"type":"number"},"example":"1.0"},{"in":"query","name":"creatinine_umol_l","description":"Admission serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42. Provide this or creatinine_mg_dl, not both.","required":false,"schema":{"type":"number"},"example":"88.4"}],"summary":"ADHERE","operationId":"get_api_calc_adhere","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, bun_mg_dl, systolic_bp_mm_hg, creatinine_mg_dl, adhere_risk, citation, disclaimer."},"400":{"description":"invalid_bun: bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/adhere"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"ADHERE (bulk)","operationId":"post_api_calc_adhere","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_bun: bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/adhere"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bun_mg_dl":"20","creatinine_mg_dl":"1.0","systolic_bp_mm_hg":"140"},{"bun_mg_dl":"20","creatinine_mg_dl":"1.0","systolic_bp_mm_hg":"140"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/gupta-mica":{"get":{"description":"Compute the Gupta 2011 Table 2 logistic probability of 30-day myocardial infarction or cardiac arrest after surgery from age, ASA class, functional status, creatinine category, and surgery type.\n\nWhen an agent needs the published Gupta 2011 MICA probability and must not invent an operative-clearance decision, a diagnosis, RCRI points, or a low/high cutoff.\n\nNot a medical device. Not a diagnosis and not a surgical clearance.\n\nGupta 2011 Table 2 MICA logistic model only. This is not the Revised Cardiac Risk Index (RCRI).\n\nGupta 2011 does not publish a low or high risk cutoff; magent does not invent one.\n\ncreatinine is the published category normal, abnormal (>1.5 mg/dL), or missing. magent does not parse a creatinine number.\n\nfunctional_status and surgery are caller-assigned published categories. magent does not examine the patient or classify the procedure from a CPT code. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Gupta 2011 Table 2: +0.02 per year.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"functional_status","description":"Gupta 2011 functional status as assigned by the caller: independent (reference, 0), partially_dependent (+0.65), or totally_dependent (+1.03). magent does not examine the patient.","required":true,"schema":{"type":"string","enum":["independent","partially_dependent","totally_dependent"]},"example":"independent"},{"in":"query","name":"asa_class","description":"ASA physical status 1-5 (Gupta 2011 Table 2; class 5 is the reference). class 1 -5.17, class 2 -3.29, class 3 -1.92, class 4 -0.95, class 5 adds 0. Caller-assigned integer.","required":true,"schema":{"type":"integer"},"example":"2"},{"in":"query","name":"creatinine","description":"Gupta 2011 creatinine category as assigned by the caller: normal (reference, 0), abnormal (>1.5 mg/dL, +0.61), or missing (-0.10). Do not send a creatinine number.","required":true,"schema":{"type":"string","enum":["normal","abnormal","missing"]},"example":"normal"},{"in":"query","name":"surgery","description":"Gupta 2011 Table 2 procedure category as assigned by the caller. hernia is the reference (0). gbaas is gallbladder, adrenal, appendix, or spleen (laparoscopic cholecystectomy in the paper example). magent does not classify a CPT code.","required":true,"schema":{"type":"string","enum":["hernia","anorectal","aortic","bariatric","brain","breast","cardiac","ent","foregut_hpb","gbaas","intestinal","neck","obstetric_gynecologic","orthopedic","other_abdomen","peripheral_vascular","skin","spine","thoracic","vein","urology"]},"example":"gbaas"}],"summary":"Gupta MICA","operationId":"get_api_calc_gupta_mica","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, age_years, functional_status, asa_class, creatinine, surgery, logit, estimated_probability_percent, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_gupta_mica: each Gupta 2011 MICA item must be a published category for that field. Returned before settlement; you are not charged.; invalid_gupta_surgery: surgery must be a Gupta 2011 Table 2 procedure category (hernia is the reference). Returned before settlement; you are not charged.; invalid_asa_class: asa_class must be an integer from 1 to 5 (Gupta 2011 ASA physical status). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gupta-mica"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Gupta MICA (bulk)","operationId":"post_api_calc_gupta_mica","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_gupta_mica: each Gupta 2011 MICA item must be a published category for that field. Returned before settlement; you are not charged.; invalid_gupta_surgery: surgery must be a Gupta 2011 Table 2 procedure category (hernia is the reference). Returned before settlement; you are not charged.; invalid_asa_class: asa_class must be an integer from 1 to 5 (Gupta 2011 ASA physical status). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/gupta-mica"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","asa_class":"2","creatinine":"normal","functional_status":"independent","surgery":"gbaas"},{"age":"40","asa_class":"2","creatinine":"normal","functional_status":"independent","surgery":"gbaas"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/feurea":{"get":{"description":"Compute fractional excretion of urea (FEUN) from BUN, urine urea nitrogen, plasma creatinine, and urine creatinine.\n\nWhen diuretics make FENa unhelpful and an agent must not invent FEUrea from a language model.\n\nNot a diagnosis of prerenal azotemia or ATN. Carvounis bands are published FEUN cut-points (low ≤35%, high >35%), not a clinical order.\n\nFENa is a separate tool. This calculator does not compute FENa.\n\nDiuretics and CKD can change interpretation. Arithmetic only from the four laboratory values. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"bun_mg_dl","description":"Blood urea nitrogen in mg/dL (1-200). Same units as urine urea nitrogen.","required":true,"schema":{"type":"number"},"example":"20"},{"in":"query","name":"urine_urea_mg_dl","description":"Urine urea nitrogen in mg/dL (1-2000). Same units as BUN.","required":true,"schema":{"type":"number"},"example":"200"},{"in":"query","name":"creatinine_mg_dl","description":"Plasma creatinine in mg/dL. Provide this or creatinine_umol_l.","required":false,"schema":{"type":"number"},"example":"2"},{"in":"query","name":"creatinine_umol_l","description":"Plasma creatinine in µmol/L. Converted as mg/dL = µmol/L / 88.42.","required":false,"schema":{"type":"number"},"example":"176.84"},{"in":"query","name":"urine_creatinine_mg_dl","description":"Urine creatinine in mg/dL (1-500). Provide this or urine_creatinine_umol_l.","required":false,"schema":{"type":"number"},"example":"100"},{"in":"query","name":"urine_creatinine_umol_l","description":"Urine creatinine in µmol/L (88-44210). Converted as mg/dL = µmol/L / 88.42.","required":false,"schema":{"type":"number"},"example":"8842"}],"summary":"FEUrea","operationId":"get_api_calc_feurea","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, bun_mg_dl, urine_urea_mg_dl, creatinine_mg_dl, urine_creatinine_mg_dl, feurea_percent, carvounis_band, units, citation, disclaimer."},"400":{"description":"invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_bun: bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.; invalid_urine_urea: urine_urea_mg_dl must be a number from 1 to 2000. Returned before settlement; you are not charged.; invalid_urine_creatinine: urine_creatinine_mg_dl (1-500) or urine_creatinine_umol_l (88-44210) is required. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/feurea"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"FEUrea (bulk)","operationId":"post_api_calc_feurea","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_bun: bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.; invalid_urine_urea: urine_urea_mg_dl must be a number from 1 to 2000. Returned before settlement; you are not charged.; invalid_urine_creatinine: urine_creatinine_mg_dl (1-500) or urine_creatinine_umol_l (88-44210) is required. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/feurea"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bun_mg_dl":"20","creatinine_mg_dl":"2","urine_creatinine_mg_dl":"100","urine_urea_mg_dl":"200"},{"bun_mg_dl":"20","creatinine_mg_dl":"2","urine_creatinine_mg_dl":"100","urine_urea_mg_dl":"200"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/simon-broome":{"get":{"description":"Apply the 1991 Simon Broome Register adult definite familial hypercholesterolaemia rule and return definite or not_definite from one lipid value plus a caller-assigned tendon-xanthoma flag.\n\nWhen an agent already has adult total cholesterol or LDL cholesterol and a caller-assigned tendon-xanthoma flag (patient or listed relative) and needs the 1991 definite-register classification. magent does not assay lipids or examine tendons. Not possible FH and not a DNA-based classifier.\n\nNot a medical device and not a diagnosis of familial hypercholesterolaemia.\n\nmagent does not assay lipids or examine tendons. The caller supplies exactly one lipid and the xanthoma flag.\n\nAdult definite FH as used for the 1991 register only. Does not classify possible FH, apply child cholesterol cutoffs (6.7 / 4.0 mmol/L), or use DNA mutation evidence.\n\nTendon xanthomas in the patient or a relative (parent, child, grandparent, sibling, uncle, or aunt) are caller-assigned. magent does not take a pedigree. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"total_cholesterol_mmol_l","description":"Total cholesterol in mmol/L (1.3-20). Adult threshold is >7.5 mmol/L (7.5 does not meet). Provide exactly one of total_cholesterol_mmol_l, total_cholesterol_mg_dl, ldl_mmol_l, or ldl_mg_dl. magent does not assay lipids.","required":false,"schema":{"type":"number"},"example":"8.0"},{"in":"query","name":"total_cholesterol_mg_dl","description":"Total cholesterol in mg/dL (50-800). Converted to mmol/L as mg/dL / 38.67, then compared with >7.5. Provide exactly one lipid parameter.","required":false,"schema":{"type":"number"},"example":"310"},{"in":"query","name":"ldl_mmol_l","description":"LDL cholesterol in mmol/L (1-15). Adult threshold is >4.9 mmol/L (4.9 does not meet). Provide exactly one lipid parameter. magent does not assay lipids.","required":false,"schema":{"type":"number"},"example":"5.0"},{"in":"query","name":"ldl_mg_dl","description":"LDL cholesterol in mg/dL (40-600). Converted to mmol/L as mg/dL / 38.67, then compared with >4.9. Provide exactly one lipid parameter.","required":false,"schema":{"type":"number"},"example":"200"},{"in":"query","name":"tendon_xanthoma_patient_or_relative","description":"Tendon xanthomas in the patient or a relative (parent, child, grandparent, sibling, uncle, or aunt) as assigned by the caller. true or false. magent does not examine tendons or take a pedigree.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"Simon Broome","operationId":"get_api_calc_simon_broome","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, lipid_mmol_l, lipid_kind, cholesterol_threshold_met, tendon_xanthoma_patient_or_relative, classification, components, citation, disclaimer."},"400":{"description":"invalid_simon_lipid: provide exactly one of total_cholesterol_mmol_l (1.3-20), total_cholesterol_mg_dl (50-800), ldl_mmol_l (1-15), or ldl_mg_dl (40-600). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/simon-broome"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Simon Broome (bulk)","operationId":"post_api_calc_simon_broome","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_simon_lipid: provide exactly one of total_cholesterol_mmol_l (1.3-20), total_cholesterol_mg_dl (50-800), ldl_mmol_l (1-15), or ldl_mg_dl (40-600). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/simon-broome"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"tendon_xanthoma_patient_or_relative":"true","total_cholesterol_mmol_l":"8.0"},{"tendon_xanthoma_patient_or_relative":"true","total_cholesterol_mmol_l":"8.0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/apri":{"get":{"description":"Compute the AST to platelet ratio index (APRI) from AST, laboratory AST ULN, and platelet count.\n\nWhen an agent needs Wai 2003 APRI arithmetic and must not invent FIB-4, a NAFLD fibrosis score, or an AST ULN of 40.\n\nNot a diagnosis. Wai 2003 cut-offs are published training-set ROC coordinates, not a biopsy.\n\nThis is not FIB-4 and not the NAFLD fibrosis score.\n\nDerived in chronic hepatitis C; magent does not re-derive cut-offs for other diseases.\n\nast_uln_u_l is required caller input; magent does not assume an AST ULN of 40 U/L. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"ast_u_l","description":"Aspartate aminotransferase in U/L (1-10000).","required":true,"schema":{"type":"number"},"example":"90"},{"in":"query","name":"ast_uln_u_l","description":"Laboratory AST upper limit of normal in U/L (5-200). Required; magent does not assume 40.","required":true,"schema":{"type":"number"},"example":"45"},{"in":"query","name":"platelets_10e9_l","description":"Platelet count in 10^9/L (1-2000).","required":true,"schema":{"type":"number"},"example":"120"}],"summary":"APRI","operationId":"get_api_calc_apri","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, ast_u_l, ast_uln_u_l, platelets_10e9_l, apri, wai_fibrosis_band, wai_cirrhosis_band, citation, disclaimer."},"400":{"description":"invalid_ast: ast_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.; invalid_ast_uln: ast_uln_u_l must be a number from 5 to 200. Returned before settlement; you are not charged.; invalid_platelets: platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/apri"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"APRI (bulk)","operationId":"post_api_calc_apri","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_ast: ast_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.; invalid_ast_uln: ast_uln_u_l must be a number from 5 to 200. Returned before settlement; you are not charged.; invalid_platelets: platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/apri"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"ast_u_l":"90","ast_uln_u_l":"45","platelets_10e9_l":"120"},{"ast_u_l":"90","ast_uln_u_l":"45","platelets_10e9_l":"120"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/michigan-picc":{"get":{"description":"Sum the Chopra 2017 Michigan Risk Score factors for PICC-associated thrombosis and return class I–IV with Table 4 observed percents.\n\nWhen an agent needs the published Michigan PICC-DVT point total (not Padua, not IMPROVE) and must not invent a PICC order or lumen count.\n\nNot a medical device and not a diagnosis of PICC-associated thrombosis. magent does not examine the patient; flags are caller-assigned.\n\nNot a PICC order, insertion, or removal decision.\n\nmagent does not count lumens. Caller assigns single, double, or triple; triple includes quad as published.\n\nVTE history is one 3-tier field (never / remote / within_30_days). Remote and recent are not added.\n\nObserved percents are Chopra 2017 Table 4 (class I 0.9%, II 1.6%, III 2.7%, IV 4.7%). Not Padua or IMPROVE. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"other_cvc","description":"Another CVC present when the index PICC is placed, as assigned by the caller (Chopra 2017). true or false. true scores 1. magent does not count catheters.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"wbc_k_ul","description":"WBC in 10^3/µL (same as 10^9/L) at PICC insertion. Provide wbc_k_ul or wbc_ul. Range 0.01-500. >12 scores 1 (12.0 does not).","required":false,"schema":{"type":"number"},"example":"8"},{"in":"query","name":"wbc_ul","description":"WBC in cells/µL (same as cells/mm^3) at PICC insertion. Provide wbc_k_ul or wbc_ul. Range 10-500000. >12000 scores 1 (12000 does not; 12001 does).","required":false,"schema":{"type":"number"},"example":"8000"},{"in":"query","name":"active_cancer","description":"Active cancer as assigned by the caller (Chopra 2017). true or false. true scores 2.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"picc_lumens","description":"PICC lumen count as assigned by the caller (Chopra 2017). single scores 0; double scores 2; triple scores 3. triple includes quad as published. magent does not count lumens.","required":true,"schema":{"type":"string","enum":["single","double","triple"]},"example":"single"},{"in":"query","name":"vte_history","description":"One 3-tier VTE history field (Chopra 2017). never scores 0; remote (prior VTE beyond 30 days) scores 2; within_30_days scores 3. Do not add remote and recent.","required":true,"schema":{"type":"string","enum":["never","remote","within_30_days"]},"example":"never"}],"summary":"Michigan PICC-DVT risk score","operationId":"get_api_calc_michigan_picc","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk_class, observed_vte_percent, picc_lumens, vte_history, wbc_ul, components, citation, disclaimer."},"400":{"description":"invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_picc_lumens: picc_lumens must be single, double, or triple (Chopra 2017 Michigan PICC-DVT Risk Score; triple includes quad). Returned before settlement; you are not charged.; invalid_vte_recency: vte_history must be never, remote, or within_30_days (Chopra 2017; remote is prior VTE beyond 30 days). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/michigan-picc"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Michigan PICC-DVT risk score (bulk)","operationId":"post_api_calc_michigan_picc","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_wbc: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.; invalid_picc_lumens: picc_lumens must be single, double, or triple (Chopra 2017 Michigan PICC-DVT Risk Score; triple includes quad). Returned before settlement; you are not charged.; invalid_vte_recency: vte_history must be never, remote, or within_30_days (Chopra 2017; remote is prior VTE beyond 30 days). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/michigan-picc"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"active_cancer":"false","other_cvc":"false","picc_lumens":"single","vte_history":"never","wbc_k_ul":"8"},{"active_cancer":"false","other_cvc":"false","picc_lumens":"single","vte_history":"never","wbc_k_ul":"8"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/smart-cop":{"get":{"description":"Compute the Charles 2008 SMART-COP point total and IRVS risk band for community-acquired pneumonia.\n\nWhen an agent needs the published Charles 2008 SMART-COP total and IRVS band and must not invent a site-of-care or ICU-admission decision.\n\nNot a medical device and not a site-of-care, admission, ICU, or treatment protocol.\n\nCharles 2008 SMART-COP only. Not CURB-65, CRB-65, or PSI/PORT. Those are separate tools.\n\nRespiratory rate and oxygenation cutoffs are age-adjusted at 50 years (≤50 vs >50) as published.\n\nProvide exactly one of pao2_mm_hg, spo2_percent, or pf_ratio. magent does not combine them.\n\nAlbumin is g/dL or g/L, not mixed. arterial_ph is optional; omitted pH scores 0 (Charles 2008 missing-pH assumption).\n\nmagent does not interpret chest radiographs or assess confusion. multilobar_cxr and confusion are caller-assigned flags. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age","description":"Age in years (18-120). Age ≤50 uses RR ≥25, PaO2 <70, SpO2 ≤93%, P/F <333. Age >50 uses RR ≥30, PaO2 <60, SpO2 ≤90%, P/F <250.","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"systolic_mm_hg","description":"Systolic blood pressure in mm Hg (50-250). Scores 2 when <90; 90 does not score (Charles 2008 S).","required":true,"schema":{"type":"number"},"example":"120"},{"in":"query","name":"multilobar_cxr","description":"Multilobar involvement on chest radiograph as assigned by the caller (Charles 2008 M). true or false. 1 point if true. magent does not interpret radiographs.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"albumin_g_dl","description":"Albumin in g/dL (1-6). Provide this or albumin_g_l, not both. Scores 1 when <3.5; 3.5 does not score (Charles 2008 A).","required":false,"schema":{"type":"number"},"example":"4.0"},{"in":"query","name":"albumin_g_l","description":"Albumin in g/L (10-60). Converted as g/dL = g/L / 10. Provide this or albumin_g_dl, not both. Scores 1 when <35 g/L.","required":false,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"respiratory_rate","description":"Respiratory rate in breaths/min (integer 4-80). Age ≤50: ≥25 scores 1 (24 does not). Age >50: ≥30 scores 1 (29 does not). Charles 2008 R.","required":true,"schema":{"type":"integer"},"example":"16"},{"in":"query","name":"heart_rate_bpm","description":"Heart rate in beats per minute (integer 30-220). Scores 1 when ≥125; 124 does not score (Charles 2008 T).","required":true,"schema":{"type":"integer"},"example":"80"},{"in":"query","name":"confusion","description":"New or acute confusion as assigned by the caller (Charles 2008 C). true or false. 1 point if true. magent does not assess mental status.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pao2_mm_hg","description":"Arterial PaO2 in mm Hg (20-700). Provide exactly one of pao2_mm_hg, spo2_percent, or pf_ratio. Age ≤50: <70 scores 2. Age >50: <60 scores 2.","required":false,"schema":{"type":"number"},"example":"90"},{"in":"query","name":"spo2_percent","description":"Oxygen saturation percent (50-100). Provide exactly one of pao2_mm_hg, spo2_percent, or pf_ratio. Age ≤50: ≤93 scores 2. Age >50: ≤90 scores 2.","required":false,"schema":{"type":"number"},"example":"98"},{"in":"query","name":"pf_ratio","description":"PaO2/FiO2 ratio (20-800). Provide exactly one of pao2_mm_hg, spo2_percent, or pf_ratio. Age ≤50: <333 scores 2. Age >50: <250 scores 2.","required":false,"schema":{"type":"number"},"example":"400"},{"in":"query","name":"arterial_ph","description":"Arterial pH (6.80-7.80). Optional. Scores 2 when <7.35; 7.35 does not score. Omitted pH scores 0 (Charles 2008 missing-pH assumption).","required":false,"schema":{"type":"number"},"example":"7.40"}],"summary":"SMART-COP","operationId":"get_api_calc_smart_cop","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, irvs_risk, age_years, systolic_mm_hg, albumin_g_dl, respiratory_rate, heart_rate_bpm, pao2_mm_hg, spo2_percent, pf_ratio, arterial_ph, components, citation, disclaimer."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_respiratory_rate: respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_smart_cop_oxygen: provide exactly one of pao2_mm_hg, spo2_percent, or pf_ratio (Charles 2008). Returned before settlement; you are not charged.; invalid_pao2: pao2_mm_hg must be a number from 20 to 700. Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_pf_ratio: pf_ratio must be a number from 20 to 800. Returned before settlement; you are not charged.; invalid_arterial_ph: arterial_ph must be a number from 6.80 to 7.80. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/smart-cop"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"SMART-COP (bulk)","operationId":"post_api_calc_smart_cop","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_systolic_bp: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_respiratory_rate: respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.; invalid_heart_rate: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.; invalid_smart_cop_oxygen: provide exactly one of pao2_mm_hg, spo2_percent, or pf_ratio (Charles 2008). Returned before settlement; you are not charged.; invalid_pao2: pao2_mm_hg must be a number from 20 to 700. Returned before settlement; you are not charged.; invalid_spo2: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.; invalid_pf_ratio: pf_ratio must be a number from 20 to 800. Returned before settlement; you are not charged.; invalid_arterial_ph: arterial_ph must be a number from 6.80 to 7.80. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/smart-cop"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","albumin_g_dl":"4.0","arterial_ph":"7.40","confusion":"false","heart_rate_bpm":"80","multilobar_cxr":"false","respiratory_rate":"16","spo2_percent":"98","systolic_mm_hg":"120"},{"age":"40","albumin_g_dl":"4.0","arterial_ph":"7.40","confusion":"false","heart_rate_bpm":"80","multilobar_cxr":"false","respiratory_rate":"16","spo2_percent":"98","systolic_mm_hg":"120"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/mgps":{"get":{"description":"Apply the McMillan 2007 modified Glasgow Prognostic Score (mGPS) from caller-supplied CRP in mg/L and albumin.\n\nWhen an agent has CRP in mg/L and albumin and needs the published McMillan 2007 modified GPS (0–2), not original GPS, not hs-mGPS, and not a cancer diagnosis or treatment order.\n\nNot a medical device. magent does not examine the patient and does not assay CRP or albumin.\n\nThis is McMillan 2007 modified GPS only. Isolated hypoalbuminaemia scores 0. It is not original GPS (which scored hypoalbuminaemia alone as 1) and not hs-mGPS.\n\nNot a cancer diagnosis or treatment order. Does not return survival months or percents. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"crp_mg_l","description":"C-reactive protein in mg/L (0-500), not mg/dL. McMillan 2007 elevated CRP is >10 mg/L. CRP = 10 is not elevated and scores mGPS 0 regardless of albumin. magent does not assay CRP.","required":true,"schema":{"type":"number"},"example":"5"},{"in":"query","name":"albumin_g_l","description":"Serum albumin in g/L (10-60). Provide this or albumin_g_dl, not both. McMillan 2007 hypoalbuminaemia is <35 g/L (35 is not low). Ignored when CRP ≤ 10 mg/L. magent does not assay albumin.","required":false,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"albumin_g_dl","description":"Serum albumin in g/dL (1-6). Converted as g/L = g/dL × 10. Provide this or albumin_g_l, not both.","required":false,"schema":{"type":"number"},"example":"4.0"}],"summary":"mGPS","operationId":"get_api_calc_mgps","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, crp_mg_l, albumin_g_l, mgps, citation, disclaimer."},"400":{"description":"invalid_crp: crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mgps"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"mGPS (bulk)","operationId":"post_api_calc_mgps","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_crp: crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/mgps"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"albumin_g_l":"40","crp_mg_l":"5"},{"albumin_g_l":"40","crp_mg_l":"5"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/midas":{"get":{"description":"Sum five caller-assigned MIDAS day counts over the last 3 months and return the 0-450 total and published grades I–IV.\n\nWhen an agent has already assigned the five 3-month day counts and needs the published MIDAS total and grade, not a migraine diagnosis, treatment order, GAD-7, or PHQ-9.\n\nNot a medical device and not a migraine diagnosis.\n\nmissed_work_days, reduced_work_days, missed_household_days, reduced_household_days, and missed_social_days are caller-assigned integers 0-90 for the last 3 months. magent does not assign the counts or de-duplicate reduced days from missed days.\n\nmagent does not include MIDAS questions A (headache days) or B (pain 0-10) in the score.\n\nPublished grades used with this instrument: Grade I 0-5 little/minimal, Grade II 6-10 mild, Grade III 11-20 moderate, Grade IV ≥21 severe. Not a triptan or prophylaxis treatment order. Not GAD-7. Not PHQ-9. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"missed_work_days","description":"Caller-assigned MIDAS item 1 (integer 0-90): days of missed paid work or school in the last 3 months. magent does not assign the count.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"reduced_work_days","description":"Caller-assigned MIDAS item 2 (integer 0-90): days work or school productivity was reduced by half or more in the last 3 months. Do not double-count days already in missed_work_days; the caller assigns the count. magent does not de-duplicate days.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"missed_household_days","description":"Caller-assigned MIDAS item 3 (integer 0-90): days household work was not done in the last 3 months. magent does not assign the count.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"reduced_household_days","description":"Caller-assigned MIDAS item 4 (integer 0-90): days household productivity was reduced by half or more in the last 3 months. Do not double-count days already in missed_household_days; the caller assigns the count. magent does not de-duplicate days.","required":true,"schema":{"type":"integer"},"example":"0"},{"in":"query","name":"missed_social_days","description":"Caller-assigned MIDAS item 5 (integer 0-90): days of missed family, social, or leisure activities in the last 3 months. magent does not assign the count.","required":true,"schema":{"type":"integer"},"example":"0"}],"summary":"MIDAS","operationId":"get_api_calc_midas","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, midas_grade, components, citation, disclaimer."},"400":{"description":"invalid_midas: MIDAS needs five 3-month day counts (work missed, work ≥50% reduced, household missed, household ≥50% reduced, social missed). Returned before settlement; you are not charged.; invalid_midas_days: each MIDAS day count must be an integer from 0 to 90 (last 3 months). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/midas"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"MIDAS (bulk)","operationId":"post_api_calc_midas","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_midas: MIDAS needs five 3-month day counts (work missed, work ≥50% reduced, household missed, household ≥50% reduced, social missed). Returned before settlement; you are not charged.; invalid_midas_days: each MIDAS day count must be an integer from 0 to 90 (last 3 months). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/midas"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"missed_household_days":"0","missed_social_days":"0","missed_work_days":"0","reduced_household_days":"0","reduced_work_days":"0"},{"missed_household_days":"0","missed_social_days":"0","missed_work_days":"0","reduced_household_days":"0","reduced_work_days":"0"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/peld":{"get":{"description":"Compute the McDiarmid 2002 Pediatric End-Stage Liver Disease listing arithmetic from bilirubin, INR, albumin, age, and growth failure.\n\nWhen an agent needs the published PELD integer and must not invent waitlist exception points.\n\nNot a transplant listing protocol or allocation decision.\n\nMcDiarmid 2002 listing arithmetic only. Does not add waitlist exception points, status 1, or creatinine.\n\nBilirubin, INR, and albumin below 1.0 are floored at 1.0 before ln (same class of lab floor as OPTN MELD).\n\nPELD is for children under 12 years. Age 12 and older is rejected. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"age_years","description":"Age in years (0-11 inclusive). PELD is for children under 12. Age under 1 adds 0.436 before scaling.","required":true,"schema":{"type":"number"},"example":"2"},{"in":"query","name":"bilirubin_mg_dl","description":"Total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l, not both. Floored at 1.0 before ln.","required":false,"schema":{"type":"number"},"example":"4.0"},{"in":"query","name":"bilirubin_umol_l","description":"Total bilirubin in µmol/L. Converted as mg/dL = µmol/L / 17.1.","required":false,"schema":{"type":"number"},"example":"68.4"},{"in":"query","name":"inr","description":"INR (0.8-10). Floored at 1.0 before ln.","required":true,"schema":{"type":"number"},"example":"1.5"},{"in":"query","name":"albumin_g_dl","description":"Albumin in g/dL (1-6). Provide this or albumin_g_l, not both. Floored at 1.0 before ln.","required":false,"schema":{"type":"number"},"example":"2.5"},{"in":"query","name":"albumin_g_l","description":"Albumin in g/L. Converted as g/dL = g/L / 10.","required":false,"schema":{"type":"number"},"example":"25"},{"in":"query","name":"growth_failure","description":"Growth failure as assigned by the caller. true adds 0.667 before scaling.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"PELD","operationId":"get_api_calc_peld","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, bilirubin_mg_dl, albumin_g_dl, inr, bilirubin_used_mg_dl, albumin_used_g_dl, inr_used, age_years, age_lt_1, growth_failure, peld, citation, disclaimer."},"400":{"description":"invalid_peld_age: age_years must be a number from 0 to 11 (PELD is for children under 12). Returned before settlement; you are not charged.; invalid_bilirubin: bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_inr: inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/peld"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"PELD (bulk)","operationId":"post_api_calc_peld","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_peld_age: age_years must be a number from 0 to 11 (PELD is for children under 12). Returned before settlement; you are not charged.; invalid_bilirubin: bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.; invalid_albumin: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.; invalid_inr: inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/peld"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age_years":"2","albumin_g_dl":"2.5","bilirubin_mg_dl":"4.0","growth_failure":"false","inr":"1.5"},{"age_years":"2","albumin_g_dl":"2.5","bilirubin_mg_dl":"4.0","growth_failure":"false","inr":"1.5"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/bun-creatinine-ratio":{"get":{"description":"Compute the Richards 1990 blood urea nitrogen to creatinine ratio and whether that ratio is >= 36 (suggests upper gastrointestinal bleeding).\n\nWhen an agent needs the published Richards 1990 BUN/creatinine ratio and must not invent a lower-GI class, an endoscopy order, or Glasgow-Blatchford urea bands.\n\nNot a medical device.\n\nNot a diagnosis. magent does not locate a gastrointestinal bleed and does not order endoscopy.\n\nA ratio >= 36 suggests upper gastrointestinal bleeding. A ratio < 36 is not helpful in locating the source; magent does not classify that as lower GI bleeding.\n\nRichards 1990: no patient with lower GI bleeding had a ratio >= 36; 38% of patients with upper GI bleeding had a ratio >= 36. Those figures are not returned in the JSON body.\n\nNot the Glasgow-Blatchford urea or BUN tables. This tool does not score Blatchford bands. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"bun_mg_dl","description":"Blood urea nitrogen in mg/dL (1-200). Richards 1990 ratio uses BUN in mg/dL. Not a Glasgow-Blatchford urea band. magent does not assay BUN.","required":true,"schema":{"type":"number"},"example":"36"},{"in":"query","name":"creatinine_mg_dl","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l, not both. magent does not assay creatinine.","required":false,"schema":{"type":"number"},"example":"1"},{"in":"query","name":"creatinine_umol_l","description":"Serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42. Provide this or creatinine_mg_dl, not both.","required":false,"schema":{"type":"number"},"example":"88.42"}],"summary":"BUN/creatinine ratio","operationId":"get_api_calc_bun_creatinine_ratio","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, bun_mg_dl, creatinine_mg_dl, bun_creatinine_ratio, suggests_upper_gi_bleeding, citation, disclaimer."},"400":{"description":"invalid_bun: bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bun-creatinine-ratio"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"BUN/creatinine ratio (bulk)","operationId":"post_api_calc_bun_creatinine_ratio","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_bun: bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.; invalid_creatinine: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/bun-creatinine-ratio"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"bun_mg_dl":"36","creatinine_mg_dl":"1"},{"bun_mg_dl":"36","creatinine_mg_dl":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/lansky":{"get":{"description":"Return the Lansky 1987 Play-Performance Scale 0-100 from a caller-assigned integer, with a stable label.\n\nWhen an agent already has a Lansky Play-Performance Scale 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100 as in Lansky 1987 (parent-rated play-performance over the past week) and needs the published score and label. magent does not observe the child or assign performance status. Not Karnofsky. Not ECOG.\n\nNot a medical device and not a performance-status assignment. magent does not observe the child.\n\nLansky 1987 Play-Performance Scale decades 0-100. Grade 0 (unresponsive) is scored. Parent-rated play-performance over the past week. Ages 1-16 in Lansky 1987; the caller assigns lps.\n\nNot Karnofsky and not ECOG. The caller assigns lps 0-100. magent does not examine the child. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"lps","description":"Lansky 1987 Play-Performance Scale 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100 as assigned by the caller from parent-rated play-performance over the past week (100 fully active, normal; 90 minor restrictions in physically strenuous activity; 80 active, but tires more quickly; 70 greater restriction of play and less time spent in play; 60 up and around, but active play minimal, keeps busy with quieter activities; 50 lying around much of the day, but gets dressed, no active play, participates in all quiet play and activities; 40 mostly in bed, participates in quiet activities; 30 in bed, needs assistance even for quiet play; 20 sleeping often, play entirely limited to very passive activities; 10 does not play, does not get out of bed; 0 unresponsive). Grade 0 (unresponsive) is scored. magent does not observe the child.","required":true,"schema":{"type":"integer"},"example":"100"}],"summary":"Lansky","operationId":"get_api_calc_lansky","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, lps, lps_label, components, citation, disclaimer."},"400":{"description":"invalid_lansky: lps must be 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100 (Lansky 1987). Grade 0 (unresponsive) is scored. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/lansky"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Lansky (bulk)","operationId":"post_api_calc_lansky","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_lansky: lps must be 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100 (Lansky 1987). Grade 0 (unresponsive) is scored. Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/lansky"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"lps":"100"},{"lps":"100"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/reveal-pah":{"get":{"description":"Sum Benza 2019 REVEAL 2.0 points from etiology, demographics, renal insufficiency, WHO functional class, 6-month hospitalization, vitals, 6MWD, BNP or NT-proBNP, echo, DLCO, and hemodynamics, and return the published low / intermediate / high 12-month mortality category.\n\nWhen an agent needs the published REVEAL 2.0 point total and three-category 12-month mortality band and must not invent a PAH diagnosis, a dose, REVEAL 1.0 cutoffs, or REVEAL Lite 2.\n\nNot a medical device. Not a PAH diagnosis, transplant listing, or a medication dose.\n\nCaller-assigned inputs. magent does not walk the patient, assay BNP, interpret the echocardiogram, measure DLCO, or catheterize.\n\nREVEAL 2.0 only (Benza 2019). Not the 2012 REVEAL 1.0 calculator and not REVEAL Lite 2. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"who_fc","description":"WHO / NYHA functional class 1, 2, 3, or 4 (Benza 2019). FC I -1; II 0; III +1; IV +2. Caller-assigned; magent does not interview the patient.","required":true,"schema":{"type":"integer"},"example":"1"},{"in":"query","name":"etiology","description":"PAH subgroup (Benza 2019). other (including idiopathic) 0; ctd +1; poph +3; heritable +2. Mutually exclusive. Caller-assigned.","required":true,"schema":{"type":"string","enum":["other","ctd","poph","heritable"]},"example":"other"},{"in":"query","name":"age","description":"Age in years (18-120). Male and age >60 scores +2 (Benza 2019).","required":true,"schema":{"type":"integer"},"example":"40"},{"in":"query","name":"male","description":"Male sex as assigned by the caller. true or false. Scores +2 only when age >60.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"renal_insufficiency","description":"eGFR <60 mL/min/1.73 m2 or renal insufficiency by clinical judgment when eGFR is unavailable (Benza 2019). true or false. +1 if true. magent does not compute eGFR.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hospitalization_6mo","description":"All-cause hospitalization in the prior 6 months (Benza 2019). true or false. +1 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"sbp_lt_110","description":"Systolic blood pressure <110 mmHg as assigned by the caller (Benza 2019). true or false. +1 if true. magent does not measure blood pressure.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"hr_gt_96","description":"Heart rate >96 bpm as assigned by the caller (Benza 2019 REVEAL 2.0, not the 1.0 >92 cutoff). true or false. +1 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"six_minute_walk_m","description":"Six-minute walk distance in meters 0-1000 (Benza 2019). >=440 -2; 320-<440 -1; 165-<320 0; <165 +1. Caller-assigned; magent does not time the walk.","required":true,"schema":{"type":"number"},"example":"480"},{"in":"query","name":"bnp_pg_ml","description":"BNP in pg/mL 0-35000 (Benza 2019). <50 -2; 50-<200 0; 200-<800 +1; >=800 +2. Omit only when sending nt_probnp_pg_ml instead. magent does not assay BNP.","required":true,"schema":{"type":"number"},"example":"40"},{"in":"query","name":"nt_probnp_pg_ml","description":"NT-proBNP in pg/mL 0-35000 when BNP is not sent (Benza 2019). <300 -2; 300-<1100 0; >=1100 +2. BNP is used when both are sent.","required":false,"schema":{"type":"number"},"example":"200"},{"in":"query","name":"pericardial_effusion","description":"Pericardial effusion on echocardiography as assigned by the caller (Benza 2019). true or false. +1 if true. magent does not read the echocardiogram.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"dlco_lt_40","description":"DLCO <40% predicted as assigned by the caller (Benza 2019 REVEAL 2.0, not the 1.0 <=32 / >=80 bands). true or false. +1 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"mrap_gt_20","description":"Mean right atrial pressure >20 mmHg within 1 year as assigned by the caller (Benza 2019). true or false. +1 if true. magent does not catheterize.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pvr_lt_5","description":"Pulmonary vascular resistance <5 Wood units as assigned by the caller (Benza 2019 REVEAL 2.0, not the 1.0 >32 WU band). true or false. -1 if true.","required":true,"schema":{"type":"boolean"},"example":"true"}],"summary":"REVEAL 2.0","operationId":"get_api_calc_reveal_pah","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, risk, who_fc, etiology, age_years, male, renal_insufficiency, hospitalization_6mo, sbp_lt_110, hr_gt_96, six_minute_walk_m, bnp_pg_ml, nt_probnp_pg_ml, pericardial_effusion, dlco_lt_40, mrap_gt_20, pvr_lt_5, components, citation, disclaimer."},"400":{"description":"invalid_who_fc: who_fc must be 1, 2, 3, or 4 (Benza 2019 REVEAL 2.0 WHO functional class). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_reveal_6mwd: six_minute_walk_m must be a number from 0 to 1000. Returned before settlement; you are not charged.; invalid_bnp_pg_ml: bnp_pg_ml must be a number from 0 to 35000 (Reed 2010 ROSE). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/reveal-pah"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"REVEAL 2.0 (bulk)","operationId":"post_api_calc_reveal_pah","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_who_fc: who_fc must be 1, 2, 3, or 4 (Benza 2019 REVEAL 2.0 WHO functional class). Returned before settlement; you are not charged.; invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_age: age must be an integer from 18 to 120 Returned before settlement; you are not charged.; invalid_reveal_6mwd: six_minute_walk_m must be a number from 0 to 1000. Returned before settlement; you are not charged.; invalid_bnp_pg_ml: bnp_pg_ml must be a number from 0 to 35000 (Reed 2010 ROSE). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/reveal-pah"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"age":"40","bnp_pg_ml":"40","dlco_lt_40":"false","etiology":"other","hospitalization_6mo":"false","hr_gt_96":"false","male":"false","mrap_gt_20":"false","pericardial_effusion":"false","pvr_lt_5":"true","renal_insufficiency":"false","sbp_lt_110":"false","six_minute_walk_m":"480","who_fc":"1"},{"age":"40","bnp_pg_ml":"40","dlco_lt_40":"false","etiology":"other","hospitalization_6mo":"false","hr_gt_96":"false","male":"false","mrap_gt_20":"false","pericardial_effusion":"false","pvr_lt_5":"true","renal_insufficiency":"false","sbp_lt_110":"false","six_minute_walk_m":"480","who_fc":"1"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/hestia":{"get":{"description":"Apply the Zondag 2011 Hestia exclusion checklist and return whether outpatient treatment of acute PE is eligible from 11 caller-assigned items.\n\nWhen an agent already has proven acute PE in an adult, as in the Hestia Study, and needs the published outpatient-eligibility checklist from caller-assigned findings.\n\nNot a diagnosis of pulmonary embolism or of outpatient safety.\n\nThis tool is the Zondag 2011 Hestia exclusion checklist only. It is not PESI and not sPESI.\n\nThe caller assigns all 11 items. magent does not examine the patient or assign the 11 items.\n\nOutpatient eligibility is the published checklist only: any yes excludes home treatment. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"hemodynamically_unstable","description":"Hemodynamic instability left to the clinician, including SBP <100 mmHg with heart rate >100 or ICU admission, as assigned by the caller. true or false. magent does not measure blood pressure or heart rate.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"thrombolysis_or_embolectomy","description":"Thrombolysis or embolectomy necessary. true or false as assigned by the caller. magent does not decide reperfusion.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"high_bleeding_risk","description":"Active bleeding or high risk of bleeding as assigned by the caller (paper: GI bleeding in the preceding 14 days, stroke <4 weeks, operation <2 weeks, bleeding disorder or platelets <75×10^9/L, or uncontrolled hypertension SBP >180 or DBP >110). true or false. magent does not compute bleeding risk.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"oxygen_gt_24h","description":"More than 24 h of oxygen supply to keep SaO2 >90%, as assigned by the caller. true or false. magent does not compute oxygen duration or saturation.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pe_on_anticoagulation","description":"Pulmonary embolism diagnosed during anticoagulant treatment. true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"iv_pain_meds_gt_24h","description":"Severe pain needing intravenous pain medication for more than 24 h. true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"medical_or_social_admission","description":"Medical or social reason for hospital treatment >24 h (paper: infection, malignancy, no support system). true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"creatinine_clearance_lt_30","description":"Creatinine clearance <30 mL/min by Cockcroft-Gault, as assigned by the caller. true or false. magent does not compute Cockcroft-Gault.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"severe_liver_impairment","description":"Severe liver impairment as judged by the caller (paper: physician judgement). true or false. magent does not grade liver impairment.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"pregnant","description":"Pregnancy. true or false as assigned by the caller.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"history_of_hit","description":"Documented history of heparin-induced thrombocytopenia (HIT). true or false as assigned by the caller. magent does not diagnose HIT.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"Hestia criteria","operationId":"get_api_calc_hestia","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, outpatient_eligible, criteria, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hestia"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"Hestia criteria (bulk)","operationId":"post_api_calc_hestia","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/hestia"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","description":"Same keys as GET query parameters"},"maxItems":25,"minItems":1}}},"example":{"items":[{"creatinine_clearance_lt_30":"false","hemodynamically_unstable":"false","high_bleeding_risk":"false","history_of_hit":"false","iv_pain_meds_gt_24h":"false","medical_or_social_admission":"false","oxygen_gt_24h":"false","pe_on_anticoagulation":"false","pregnant":"false","severe_liver_impairment":"false","thrombolysis_or_embolectomy":"false"},{"creatinine_clearance_lt_30":"false","hemodynamically_unstable":"false","high_bleeding_risk":"false","history_of_hit":"false","iv_pain_meds_gt_24h":"false","medical_or_social_admission":"false","oxygen_gt_24h":"false","pe_on_anticoagulation":"false","pregnant":"false","severe_liver_impairment":"false","thrombolysis_or_embolectomy":"false"}]}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"per-item","currency":"USD","amount":"0.005","max_items":25,"formula":"unit_amount + extra_item_amount * (n - 1)","extra_item_amount":"0.002"}}}},"/api/calc/csrs":{"get":{"description":"Compute the Thiruganasambandamoorthy 2016 Canadian Syncope Risk Score from caller-assigned ED clinical flags and ECG numbers.\n\nWhen an agent needs the published CSRS arithmetic after ED syncope assessment and must not invent a disposition or 30-day percent from a narrative.\n\nNot a medical device. Not a disposition protocol and not a syncope diagnosis.\n\nDerivation enrolled adults ≥16 years presenting within 24 hours of syncope. Age is not a CSRS component.\n\nAbstract and Figure 2 score QRS axis < −30° or >100°. Some reprints of Table 3 list >110°. magent uses the Figure 2 / abstract cutoff (>100°). Axis −30° and 100° do not score; −31° and 101° do.\n\nCaller assigns clinical flags and supplies ECG numbers. magent does not read an ECG tracing.\n\nQRS duration 130 ms does not score; 131 ms does. QTc 480 ms does not score; 481 ms does. SBP 90 and 180 mm Hg are not out of range (the paper is <90 or >180); that criterion is a caller-assigned boolean.\n\nThis tool does not return 30-day percents or later five-tier labels. Requires x402 V2 payment (USDC on Base).","parameters":[{"in":"query","name":"predisposition_vasovagal","description":"Predisposition to vasovagal syncope (Thiruganasambandamoorthy 2016). true or false. Scores -1 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"heart_disease","description":"History of heart disease (Thiruganasambandamoorthy 2016). true or false. Scores 1 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"sbp_lt_90_or_gt_180","description":"Any ED systolic BP <90 or >180 mm Hg (caller-assigned; SBP 90 and 180 are not out of range). true or false. Scores 2 if true. magent does not take a numeric SBP.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"elevated_troponin","description":"Troponin above the 99th percentile (Thiruganasambandamoorthy 2016). true or false. Scores 2 if true.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"qrs_axis_deg","description":"QRS axis in degrees (-180 to 180). Scores 1 when < -30 or > 100 (Figure 2 / abstract; not table 110). -30 and 100 do not score; -31 and 101 do.","required":true,"schema":{"type":"number"},"example":"0"},{"in":"query","name":"qrs_duration_ms","description":"QRS duration in milliseconds (40-300). Scores 1 when >130. 130 does not score; 131 does.","required":true,"schema":{"type":"number"},"example":"80"},{"in":"query","name":"qtc_ms","description":"QTc in milliseconds (200-800). Scores 2 when >480. 480 does not score; 481 does.","required":true,"schema":{"type":"number"},"example":"400"},{"in":"query","name":"ed_vasovagal_syncope","description":"ED diagnosis of vasovagal syncope (Thiruganasambandamoorthy 2016). true or false. Scores -2 if true. Cannot be true together with ed_cardiac_syncope.","required":true,"schema":{"type":"boolean"},"example":"false"},{"in":"query","name":"ed_cardiac_syncope","description":"ED diagnosis of cardiac syncope (Thiruganasambandamoorthy 2016). true or false. Scores 2 if true. Cannot be true together with ed_vasovagal_syncope.","required":true,"schema":{"type":"boolean"},"example":"false"}],"summary":"CSRS","operationId":"get_api_calc_csrs","responses":{"200":{"description":"200 JSON fields: formula, formula_expression, score, max_score, qrs_axis_deg, qrs_duration_ms, qtc_ms, components, citation, disclaimer."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_qrs_axis: qrs_axis_deg must be a number from -180 to 180 (Thiruganasambandamoorthy 2016 CSRS). Returned before settlement; you are not charged.; invalid_qrs_duration: qrs_duration_ms must be a number from 40 to 300 (Thiruganasambandamoorthy 2016 CSRS). Returned before settlement; you are not charged.; invalid_qtc_ms: qtc_ms must be a number from 200 to 800 (Thiruganasambandamoorthy 2016 CSRS). Returned before settlement; you are not charged.; invalid_csrs_ed_diagnosis: ed_vasovagal_syncope and ed_cardiac_syncope cannot both be true (Thiruganasambandamoorthy 2016 CSRS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: Payment facilitator is not configured; facilitator_unauthorized: Payment facilitator rejected credentials; kyt_risk_detected: Payment facilitator declined this request after compliance screening; request_blocked_by_location: Payment facilitator blocked this request by location; opaque_403: Payment facilitator returned HTTP 403 without a JSON reason; ledger_unavailable: Payment ledger unavailable; payment_unavailable: Payment processing unavailable"}},"security":[{"x402":[]}],"externalDocs":{"url":"https://magentlab.com/docs/csrs"},"x-payment-info":{"scheme":"exact","protocols":[{"x402":{}}],"maxTimeoutSeconds":600,"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"assetTransferMethod":"eip3009","paymentFlow":"upfront"}},"post":{"description":"POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement. Requires x402 V2 payment. Amount is unit_amount + extra_item_amount * (n - 1). Max 25 items.","summary":"CSRS (bulk)","operationId":"post_api_calc_csrs","responses":{"200":{"description":"Envelope: count, path, items (each item is the GET 200 body)."},"400":{"description":"invalid_flag: boolean clinical flags must be true or false Returned before settlement; you are not charged.; invalid_qrs_axis: qrs_axis_deg must be a number from -180 to 180 (Thiruganasambandamoorthy 2016 CSRS). Returned before settlement; you are not charged.; invalid_qrs_duration: qrs_duration_ms must be a number from 40 to 300 (Thiruganasambandamoorthy 2016 CSRS). Returned before settlement; you are not charged.; invalid_qtc_ms: qtc_ms must be a number from 200 to 800 (Thiruganasambandamoorthy 2016 CSRS). Returned before settlement; you are not charged.; invalid_csrs_ed_diagnosis: ed_vasovagal_syncope and ed_cardiac_syncope cannot both be true (Thiruganasambandamoorthy 2016 CSRS). Returned before settlement; you are not charged.; invalid_items: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.; invalid_item_count: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.; invalid_item: each items entry must be a JSON object Returned before settlement; you are not charged."},"402":{"description":"Unpaid or invalid PAYMENT-SIGNATURE. Decode the PAYMENT-REQUIRED header (base64 JSON). HTTP 503 is not a new quote — retry the same PAYMENT-SIGNATURE."},"409":{"description":"payment_in_progress: The same authorization nonce is already being settled; retry shortly"},"429":{"description":"rate_limited: Too many requests from this client"},"503":{"description":"settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE; settle_failed: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly; facilitator_unavailable: Payment facilitator unavailable; facilitator_misconfigured: P