{"service":"magent","tools":[{"scheme":"exact","path":"/v1/tools/ping","description":"Payment smoke-test endpoint","parameters":[{"in":"query","name":"probe","type":"string","description":"Ignored. Payment smoke test takes no input.","required":false,"example":"ok"}],"errors":[{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"amount":"1000","method":"GET","example_response":{"ok":true,"service":"magent"},"response_fields":[{"name":"ok","type":"boolean","description":"Always true after a successful settle"},{"name":"service","type":"string","description":"Product name"}],"display_price":"$0.001","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","example_url":"https://api.magentlab.com/v1/tools/ping","docs_url":"https://api.magentlab.com/docs/tools/ping","x402Version":2},{"scheme":"exact","path":"/api/ontology/translate","description":"Map a natural-language drug, diagnosis, or lab phrase to a current RxNorm, ICD-10-CM, or LOINC code. Use when an agent must not hallucinate or invent a billing/pharmacy code.","parameters":[{"in":"query","name":"query","type":"string","description":"Natural-language drug, diagnosis, or lab description. Max 512 characters. Do not send patient names.","required":true,"example":"Tylenol 500mg"},{"in":"query","name":"system","type":"string","enum":["rxnorm","icd10","loinc"],"description":"Restrict to rxnorm, icd10 (ICD-10-CM), or loinc. Omit to search all.","required":false,"example":"rxnorm"},{"in":"query","name":"tty","type":"string","enum":["SCD","SBD","IN","PIN","MIN","BN","GPCK","BPCK","DF","SCDC","SBDC","SCDF","SBDF","CM","LN"],"description":"Restrict term type. Pharmacy orders typically want SCD. ICD-10-CM is CM; LOINC is LN.","required":false,"example":"SCD"},{"default":5,"in":"query","name":"limit","type":"integer","description":"Number of ranked matches to return (1-25). Default 5.","required":false,"example":"5"},{"default":35,"in":"query","name":"min_score","type":"integer","description":"Minimum rank score 0-100. Default 35.","required":false,"example":"35"},{"default":false,"in":"query","name":"include_obsolete","type":"boolean","description":"Include deprecated/obsolete codes. Default false.","required":false,"example":"false"},{"default":true,"in":"query","name":"billable_only","type":"boolean","description":"ICD-10-CM: return only HIPAA billable codes, not headers. Default true.","required":false,"example":"true"}],"errors":[{"code":"invalid_query","message":"query is required and must be 1-512 characters","status":400},{"code":"invalid_system","message":"system must be rxnorm, icd10, or loinc","status":400},{"code":"invalid_tty","message":"tty must be a known RxNorm, ICD-10-CM, or LOINC term type","status":400},{"code":"invalid_limit","message":"limit must be an integer from 1 to 25","status":400},{"code":"invalid_min_score","message":"min_score must be an integer from 0 to 100","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"amount":"5000","method":"GET","example_response":{"system":"rxnorm","matches":[{"code":"198440","status":"current","system":"rxnorm","display":"acetaminophen 500 MG Oral Tablet","tty":"SCD","obsolete":false,"billable":null,"score":95}],"query":"Tylenol 500mg","disclaimer":"Not a medical device. Deterministic published-formula or coded-ontology output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.","catalog":{"coverage":"full","icd10cm_fy":"FY2026-04","license":{"icd10cm":"ICD-10-CM from CMS/NCHS. US claims codes, not WHO ICD-10.","loinc":"This material contains content from LOINC (http://loinc.org). LOINC is copyright © Regenstrief Institute, Inc. and the Logical Observation Identifiers Names and Codes (LOINC) Committee and is available at no cost under the license at http://loinc.org/license. LOINC® is a registered United States trademark of Regenstrief Institute, Inc.","rxnorm":"This product uses publicly available data courtesy of the U.S. National Library of Medicine (NLM), National Institutes of Health, Department of Health and Human Services; NLM is not responsible for the product and does not endorse or recommend this or any other product."},"loinc_version":"2.82","notes":"ICD-10 entries are ICD-10-CM (US claims), not WHO ICD-10. RxNorm is Current Prescribable Content until a licensed full monthly ingest lands.","rxnorm_release":"2026-08-03","source":"postgres ingest","systems":["rxnorm","icd10","loinc"],"version":"icd10:FY2026-04|loinc:2.82|rxnorm:2026-08-03"},"match_count":1,"match_quality":"high"},"response_fields":[{"name":"query","type":"string","description":"Echo of the submitted query"},{"name":"system","type":"string","description":"rxnorm, icd10, loinc, or all"},{"name":"match_count","type":"integer","description":"Number of ranked matches returned"},{"name":"match_quality","type":"string","description":"none, low, or high"},{"name":"matches","type":"array","description":"Ranked codes. First row is the best deterministic hit."},{"name":"catalog","type":"object","description":"Seed vs ingested vs full coverage metadata"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"display_price":"$0.005","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","example_url":"https://api.magentlab.com/api/ontology/translate?query=Tylenol%20500mg&system=rxnorm","docs_url":"https://api.magentlab.com/docs/ontology","x402Version":2},{"scheme":"exact","path":"/api/calc/bsa_mosteller","description":"Mosteller body surface area from height and weight. Use for oncology dosing arithmetic. Deterministic published formula with citation; not a dosing recommendation.","parameters":[{"in":"query","name":"height_cm","type":"number","description":"Height in centimeters. Provide height_cm or height_in.","required":false,"example":"170"},{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"example":"70"},{"in":"query","name":"height_in","type":"number","description":"Height in inches. Converted as cm = in * 2.54.","required":false,"example":"67"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"example":"154"}],"errors":[{"code":"invalid_height","message":"height_cm (50-250) or height_in (20-98) is required","status":400},{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"amount":"5000","method":"GET","example_response":{"disclaimer":"Not a medical device. Deterministic published-formula or coded-ontology output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.","bsa_m2":1.8181,"citation":{"authors":"Mosteller RD","doi":"10.1056/NEJM198710223171717","id":"mosteller-1987","source":"N Engl J Med. 1987;317(17):1098","title":"Simplified calculation of body-surface area"},"formula":"mosteller","formula_expression":"BSA_m2 = sqrt((height_cm * weight_kg) / 3600)","height_cm":170.0,"weight_kg":70.0},"response_fields":[{"name":"formula","type":"string","description":"mosteller"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"height_cm","type":"number","description":"Normalized height in cm"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"bsa_m2","type":"number","description":"Body surface area in m^2, 4 decimal places"},{"name":"citation","type":"object","description":"Peer-reviewed formula citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"display_price":"$0.005","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","example_url":"https://api.magentlab.com/api/calc/bsa_mosteller?height_cm=170&weight_kg=70","docs_url":"https://api.magentlab.com/docs/bsa","x402Version":2},{"scheme":"exact","path":"/api/calc/egfr_ckd_epi","description":"CKD-EPI 2021 creatinine eGFR (race-free). Use when an agent must not guess kidney function from a language model. Deterministic published formula with citation.","parameters":[{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL. Provide this or creatinine_umol_l.","required":false,"example":"1.1"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L. Converted as mg/dL = µmol/L / 88.42.","required":false,"example":"97.2"},{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). CKD-EPI 2021 is validated in adults.","required":true,"example":"65"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used by the published equation. female or male.","required":true,"example":"female"}],"errors":[{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120","status":400},{"code":"invalid_sex","message":"sex must be female or male","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"amount":"5000","method":"GET","example_response":{"units":"mL/min/1.73m2","disclaimer":"Not a medical device. Deterministic published-formula or coded-ontology output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.","citation":{"authors":"Inker LA, Eneanya ND, Coresh J, et al.","doi":"10.1056/NEJMoa2102953","id":"inker-2021","source":"N Engl J Med. 2021;385(19):1737-1749","title":"New Creatinine- and Cystatin C-Based Equations to Estimate GFR without Race"},"formula":"ckd_epi_2021_creatinine","formula_expression":"142 * min(Scr/κ,1)^α * max(Scr/κ,1)^(-1.200) * 0.9938^age * (1.012 if female)","age_years":65,"sex":"female","creatinine_mg_dl":1.1,"egfr_ml_min_1_73m2":55.8},"response_fields":[{"name":"formula","type":"string","description":"ckd_epi_2021_creatinine"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"creatinine_mg_dl","type":"number","description":"Normalized creatinine"},{"name":"age_years","type":"integer","description":"Age used in the equation"},{"name":"sex","type":"string","description":"female or male"},{"name":"egfr_ml_min_1_73m2","type":"number","description":"Estimated GFR, 1 decimal place"},{"name":"units","type":"string","description":"mL/min/1.73m2"},{"name":"citation","type":"object","description":"NEJM 2021 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"display_price":"$0.005","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","example_url":"https://api.magentlab.com/api/calc/egfr_ckd_epi?creatinine_mg_dl=1.1&age=65&sex=female","docs_url":"https://api.magentlab.com/docs/egfr","x402Version":2},{"scheme":"exact","path":"/api/calc/cha2ds2_vasc","description":"CHA2DS2-VASc score from discrete clinical flags. Use for stroke-risk stratification arithmetic in atrial fibrillation. Deterministic published score with citation.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). ≥75 scores 2; 65-74 scores 1.","required":true,"example":"78"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female scores 1 (Sc); male scores 0.","required":true,"example":"female"},{"in":"query","name":"chf","type":"boolean","description":"Congestive heart failure or LV dysfunction. true or false.","required":true,"example":"false"},{"in":"query","name":"hypertension","type":"boolean","description":"Hypertension history. true or false.","required":true,"example":"true"},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes mellitus. true or false.","required":true,"example":"true"},{"in":"query","name":"stroke_tia","type":"boolean","description":"Prior stroke, TIA, or thromboembolism. true or false (2 points).","required":true,"example":"false"},{"in":"query","name":"vascular_disease","type":"boolean","description":"Prior MI, peripheral artery disease, or aortic plaque. true or false.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120","status":400},{"code":"invalid_sex","message":"sex must be female or male","status":400},{"code":"invalid_flag","message":"chf, hypertension, diabetes, stroke_tia, and vascular_disease must be true or false","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"amount":"5000","method":"GET","example_response":{"components":[{"factor":"congestive_heart_failure","points":0,"present":false},{"factor":"hypertension","points":1,"present":true},{"value":78,"factor":"age","points":2,"present":true},{"factor":"diabetes","points":1,"present":true},{"factor":"stroke_tia_thromboembolism","points":0,"present":false},{"factor":"vascular_disease","points":0,"present":false},{"factor":"sex_female","points":1,"present":true}],"disclaimer":"Not a medical device. Deterministic published-formula or coded-ontology output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.","citation":{"authors":"Lip GYH, Nieuwlaat R, Pisters R, Lane DA, Crijns HJ","doi":"10.1378/chest.09-1584","id":"lip-2010","source":"Chest. 2010;137(2):263-272","title":"Refining clinical risk stratification for predicting stroke and thromboembolism in atrial fibrillation using a novel risk factor-based approach: the euro heart survey on atrial fibrillation"},"formula":"cha2ds2_vasc","age_years":78,"max_score":9,"score":5,"sex":"female"},"response_fields":[{"name":"formula","type":"string","description":"cha2ds2_vasc"},{"name":"score","type":"integer","description":"Total points 0-9"},{"name":"max_score","type":"integer","description":"Always 9"},{"name":"sex","type":"string","description":"female or male"},{"name":"age_years","type":"integer","description":"Age used for A2/A scoring"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Chest 2010 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"display_price":"$0.005","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","example_url":"https://api.magentlab.com/api/calc/cha2ds2_vasc?age=78&sex=female&chf=false&hypertension=true&diabetes=true&stroke_tia=false&vascular_disease=false","docs_url":"https://api.magentlab.com/docs/cha2ds2-vasc","x402Version":2}],"base_url":"https://api.magentlab.com","playbooks":[{"name":"Prior authorization coding","description":"Map a chart phrase to ICD-10-CM and a medication phrase to RxNorm before submitting a claim or eRx.","slug":"prior-auth","bundle_path":null,"bundle_url":null,"docs_url":"https://api.magentlab.com/docs/ontology","sequence":[{"path":"/api/ontology/translate","method":"GET","example_url":"https://api.magentlab.com/api/ontology/translate?query=Tylenol%20500mg&system=rxnorm"},{"path":"/api/ontology/translate","method":"GET","example_url":"https://api.magentlab.com/api/ontology/translate?query=type%202%20diabetes&system=icd10"}]},{"name":"Oncology dosing arithmetic","description":"Compute Mosteller BSA from height and weight. Do not let a model multiply.","slug":"oncology-bsa","bundle_path":null,"bundle_url":null,"docs_url":"https://api.magentlab.com/docs/bsa","sequence":[{"path":"/api/calc/bsa_mosteller","method":"GET","example_url":"https://api.magentlab.com/api/calc/bsa_mosteller?height_cm=170&weight_kg=70"}]},{"name":"Kidney function + stroke risk","description":"eGFR then CHA2DS2-VASc when a chart needs both kidney function and AF stroke risk.","slug":"risk-calcs","bundle_path":null,"bundle_url":null,"docs_url":"https://api.magentlab.com/docs/egfr","sequence":[{"path":"/api/calc/egfr_ckd_epi","method":"GET","example_url":"https://api.magentlab.com/api/calc/egfr_ckd_epi?creatinine_mg_dl=1.1&age=65&sex=female"},{"path":"/api/calc/cha2ds2_vasc","method":"GET","example_url":"https://api.magentlab.com/api/calc/cha2ds2_vasc?age=78&sex=female&chf=false&hypertension=true&diabetes=true&stroke_tia=false&vascular_disease=false"}]}],"docs_url":"https://api.magentlab.com/docs","ontology":{"coverage":"full","icd10cm_fy":"FY2026-04","license":{"icd10cm":"ICD-10-CM from CMS/NCHS. US claims codes, not WHO ICD-10.","loinc":"This material contains content from LOINC (http://loinc.org). LOINC is copyright © Regenstrief Institute, Inc. and the Logical Observation Identifiers Names and Codes (LOINC) Committee and is available at no cost under the license at http://loinc.org/license. LOINC® is a registered United States trademark of Regenstrief Institute, Inc.","rxnorm":"This product uses publicly available data courtesy of the U.S. National Library of Medicine (NLM), National Institutes of Health, Department of Health and Human Services; NLM is not responsible for the product and does not endorse or recommend this or any other product."},"loinc_version":"2.82","notes":"ICD-10 entries are ICD-10-CM (US claims), not WHO ICD-10. RxNorm is Current Prescribable Content until a licensed full monthly ingest lands.","rxnorm_release":"2026-08-03","source":"postgres ingest","systems":["rxnorm","icd10","loinc"],"version":"icd10:FY2026-04|loinc:2.82|rxnorm:2026-08-03"},"x402Version":2}