65trust / 100

Calc Aih Original

by magent in Other

x402 APIFailing, checked 2 h ago

Alvarez 1999 revised original IAIHG AIH score, not Hennes 2008 simplified. Caller-assigned sex, ALP:AST/ALT ratio, globulin/IgG, ANA/SMA/LKM titer, AMA, viral markers, drugs, alcohol, additive histology, other autoimmune disease; optional HLA/other autoantibodies if seronegative and treatment response. Pretreatment definite >15 / probable 10-15; posttreatment definite >17 / probable 12-17. magent does not read histology. Not a diagnosis or immunosuppression order.

POST
https://api.magentlab.com/api/calc/aih_original
Price
$0.007
per call in USDC
Uptime
88.9%
last 30 days
Response time
192 ms
503 ms slowest 5%
Last check
Failed
2 h ago, next any minute now

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Latest check failed 2 h ago: Timed out

Status and outage history · Atom feed · Watch with other listings

How to call it

POST https://api.magentlab.com/api/calc/aih_original

Each call costs $0.007 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

POST https://api.magentlab.com/api/calc/aih_original
content-type: application/json

{
  "items": [
    {
      "alcohol_intake": "gt_60",
      "alp_ratio": "gt_3",
      "ama_positive": true,
      "autoantibody_titer": "lt_1_40",
      "biliary_changes": true,
      "globulin_igg": "lt_1x",
      "hepatotoxic_drugs": true,
      "hla_dr3_or_dr4": false,
      "interface_hepatitis": false,
      "liver_cell_rosettes": false,
      "lymphoplasmacytic_infiltrate": false,
      "other_atypical_histology": true,
      "other_autoantibodies": false,
      "other_autoimmune_disease": false,
      "sex": "male",
      "treatment_response": "none",
      "viral_markers_positive": true
    },
    {
      "alcohol_intake": "gt_60",
      "alp_ratio": "gt_3",
      "ama_positive": true,
      "autoantibody_titer": "lt_1_40",
      "biliary_changes": true,
      "globulin_igg": "lt_1x",
      "hepatotoxic_drugs": true,
      "hla_dr3_or_dr4": false,
      "interface_hepatitis": false,
      "liver_cell_rosettes": false,
      "lymphoplasmacytic_infiltrate": false,
      "other_atypical_histology": true,
      "other_autoantibodies": false,
      "other_autoimmune_disease": false,
      "sex": "male",
      "treatment_response": "none",
      "viral_markers_positive": true
    }
  ]
}

Parameters

ParameterTypeRequiredDescription
itemsarray of objectYes

Example response

The provider's example. We can't check it without paying.

Example response, 240 lines
{
  "count": 2,
  "items": [
    {
      "aih_band": "not_aih",
      "citation": {
        "authors": "Alvarez F, Berg PA, Bianchi FB, et al.",
        "doi": "10.1016/s0168-8278(99)80297-9",
        "id": "alvarez-1999",
        "pmid": "10580593",
        "source": "J Hepatol. 1999;31(5):929-938",
        "title": "International Autoimmune Hepatitis Group Report: review of criteria for diagnosis of autoimmune hepatitis"
      },
      "components": [
        {
          "factor": "sex",
          "points": 0,
          "present": false,
          "value": "male"
        },
        {
          "factor": "alp_ratio",
          "points": -2,
          "present": true,
          "value": "gt_3"
        },
        {
          "factor": "globulin_igg",
          "points": 0,
          "present": false,
          "value": "lt_1x"
        },
        {
          "factor": "autoantibody_titer",
          "points": 0,
          "present": false,
          "value": "lt_1_40"
        },
        {
          "factor": "ama_positive",
          "points": -4,
          "present": true
        },
        {
          "factor": "viral_markers_positive",
          "points": -3,
          "present": true,
          "value": true
        },
        {
          "factor": "hepatotoxic_drugs",
          "points": -4,
          "present": true,
          "value": true
        },
        {
          "factor": "alcohol_intake",
          "points": -2,
          "present": true,
          "value": "gt_60"
        },
        {
          "factor": "interface_hepatitis",
          "points": 0,
          "present": false
        },
        {
          "factor": "lymphoplasmacytic_infiltrate",
          "points": 0,
          "present": false
        },
        {
          "factor": "liver_cell_rosettes",
          "points": 0,
          "present": false
        },
        {
          "factor": "typical_histology_absent",
          "points": -5,
          "present": true
        },
        {
          "factor": "biliary_changes",
          "points": -3,
          "present": true
        },
        {
          "factor": "other_atypical_histology",
          "points": -3,
          "present": true
        },
        {
          "factor": "other_autoimmune_disease",
          "points": 0,
          "present": false
        },
        {
          "factor": "other_autoantibodies",
          "points": 0,
          "present": false
        },
        {
          "factor": "hla_dr3_or_dr4",
          "points": 0,
          "present": false
        },
        {
          "factor": "treatment_response",
          "points": 0,
          "present": false,
          "value": "none"
        }
      ],
      "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
      "formula": "aih_original",
      "formula_expression": "revised original IAIHG AIH (Alvarez 1999) = sex (male 0, female 2) + alp_ratio (lt_1_5 2, 1_5_to_3 0, gt_3 -2) + globulin_igg (lt_1x 0, 1_to_1_5x 1, 1_5_to_2x 2, gt_2x 3) + autoantibody_titer (lt_1_40 0, 1_40 1, 1_80 2, gt_1_80 3) + ama_positive (true -4) + viral_markers (positive -3, negative 3) + hepatotoxic_drugs (true -4, false 1) + alcohol (lt_25 2, 25_to_60 0, gt_60 -2) + histology (interface 3, lymphoplasmacytic 1, rosettes 1, none of those -5, biliary -3, other atypical -3; additive) + other_autoimmune_disease (true 2) + other_autoantibodies (true 2 if titer lt_1_40) + hla_dr3_or_dr4 (true 1 if titer lt_1_40) + treatment_response (complete 2, relapse 3); max 26; pretreatment definite >15, probable 10-15; posttreatment definite >17, probable 12-17",
      "max_score": 26,
      "score": -26,
      "timing": "pretreatment"
    },
    {
      "aih_band": "not_aih",
      "citation": {
        "authors": "Alvarez F, Berg PA, Bianchi FB, et al.",
        "doi": "10.1016/s0168-8278(99)80297-9",
        "id": "alvarez-1999",
        "pmid": "10580593",
        "source": "J Hepatol. 1999;31(5):929-938",
        "title": "International Autoimmune Hepatitis Group Report: review of criteria for diagnosis of autoimmune hepatitis"
      },
      "components": [
        {
          "factor": "sex",
          "points": 0,
          "present": false,
          "value": "male"
        },
        {
          "factor": "alp_ratio",
          "points": -2,
          "present": true,
          "value": "gt_3"
        },
        {
          "factor": "globulin_igg",
          "points": 0,
          "present": false,
          "value": "lt_1x"
        },
        {
          "factor": "autoantibody_titer",
          "points": 0,
          "present": false,
          "value": "lt_1_40"
        },
        {
          "factor": "ama_positive",
          "points": -4,
          "present": true
        },
        {
          "factor": "viral_markers_positive",
          "points": -3,
          "present": true,
          "value": true
        },
        {
          "factor": "hepatotoxic_drugs",
          "points": -4,
          "present": true,
          "value": true
        },
        {
          "factor": "alcohol_intake",
          "points": -2,
          "present": true,
          "value": "gt_60"
        },
        {
          "factor": "interface_hepatitis",
          "points": 0,
          "present": false
        },
        {
          "factor": "lymphoplasmacytic_infiltrate",
          "points": 0,
          "present": false
        },
        {
          "factor": "liver_cell_rosettes",
          "points": 0,
          "present": false
        },
        {
          "factor": "typical_histology_absent",
          "points": -5,
          "present": true
        },
        {
          "factor": "biliary_changes",
          "points": -3,
          "present": true
        },
        {
          "factor": "other_atypical_histology",
          "points": -3,
          "present": true
        },
        {
          "factor": "other_autoimmune_disease",
          "points": 0,
          "present": false
        },
        {
          "factor": "other_autoantibodies",
          "points": 0,
          "present": false
        },
        {
          "factor": "hla_dr3_or_dr4",
          "points": 0,
          "present": false
        },
        {
          "factor": "treatment_response",
          "points": 0,
          "present": false,
          "value": "none"
        }
      ],
      "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
      "formula": "aih_original",
      "formula_expression": "revised original IAIHG AIH (Alvarez 1999) = sex (male 0, female 2) + alp_ratio (lt_1_5 2, 1_5_to_3 0, gt_3 -2) + globulin_igg (lt_1x 0, 1_to_1_5x 1, 1_5_to_2x 2, gt_2x 3) + autoantibody_titer (lt_1_40 0, 1_40 1, 1_80 2, gt_1_80 3) + ama_positive (true -4) + viral_markers (positive -3, negative 3) + hepatotoxic_drugs (true -4, false 1) + alcohol (lt_25 2, 25_to_60 0, gt_60 -2) + histology (interface 3, lymphoplasmacytic 1, rosettes 1, none of those -5, biliary -3, other atypical -3; additive) + other_autoimmune_disease (true 2) + other_autoantibodies (true 2 if titer lt_1_40) + hla_dr3_or_dr4 (true 1 if titer lt_1_40) + treatment_response (complete 2, relapse 3); max 26; pretreatment definite >15, probable 10-15; posttreatment definite >17, probable 12-17",
      "max_score": 26,
      "score": -26,
      "timing": "pretreatment"
    }
  ],
  "path": "/api/calc/aih_original"
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.007.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://api.magentlab.com/api/calc/aih_original' \
  -H 'content-type: application/json' \
  --data-raw '{"items":[{"alcohol_intake":"gt_60","alp_ratio":"gt_3","ama_positive":true,"autoantibody_titer":"lt_1_40","biliary_changes":true,"globulin_igg":"lt_1x","hepatotoxic_drugs":true,"hla_dr3_or_dr4":false,"interface_hepatitis":false,"liver_cell_rosettes":false,"lymphoplasmacytic_infiltrate":false,"other_atypical_histology":true,"other_autoantibodies":false,"other_autoimmune_disease":false,"sex":"male","treatment_response":"none","viral_markers_positive":true},{"alcohol_intake":"gt_60","alp_ratio":"gt_3","ama_positive":true,"autoantibody_titer":"lt_1_40","biliary_changes":true,"globulin_igg":"lt_1x","hepatotoxic_drugs":true,"hla_dr3_or_dr4":false,"interface_hepatitis":false,"liver_cell_rosettes":false,"lymphoplasmacytic_infiltrate":false,"other_atypical_histology":true,"other_autoantibodies":false,"other_autoimmune_disease":false,"sex":"male","treatment_response":"none","viral_markers_positive":true}]}'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://api.magentlab.com/api/calc/aih_original' \
  -H 'content-type: application/json' \
  --data-raw '{"items":[{"alcohol_intake":"gt_60","alp_ratio":"gt_3","ama_positive":true,"autoantibody_titer":"lt_1_40","biliary_changes":true,"globulin_igg":"lt_1x","hepatotoxic_drugs":true,"hla_dr3_or_dr4":false,"interface_hepatitis":false,"liver_cell_rosettes":false,"lymphoplasmacytic_infiltrate":false,"other_atypical_histology":true,"other_autoantibodies":false,"other_autoimmune_disease":false,"sex":"male","treatment_response":"none","viral_markers_positive":true},{"alcohol_intake":"gt_60","alp_ratio":"gt_3","ama_positive":true,"autoantibody_titer":"lt_1_40","biliary_changes":true,"globulin_igg":"lt_1x","hepatotoxic_drugs":true,"hla_dr3_or_dr4":false,"interface_hepatitis":false,"liver_cell_rosettes":false,"lymphoplasmacytic_infiltrate":false,"other_atypical_histology":true,"other_autoantibodies":false,"other_autoimmune_disease":false,"sex":"male","treatment_response":"none","viral_markers_positive":true}]}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.007 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.007" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.007 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.magentlab.com%2Fapi%2Fcalc%2Faih_original&method=POST
const res = await pay("https://api.magentlab.com/api/calc/aih_original", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "items": [
      {
        "alcohol_intake": "gt_60",
        "alp_ratio": "gt_3",
        "ama_positive": true,
        "autoantibody_titer": "lt_1_40",
        "biliary_changes": true,
        "globulin_igg": "lt_1x",
        "hepatotoxic_drugs": true,
        "hla_dr3_or_dr4": false,
        "interface_hepatitis": false,
        "liver_cell_rosettes": false,
        "lymphoplasmacytic_infiltrate": false,
        "other_atypical_histology": true,
        "other_autoantibodies": false,
        "other_autoimmune_disease": false,
        "sex": "male",
        "treatment_response": "none",
        "viral_markers_positive": true
      },
      {
        "alcohol_intake": "gt_60",
        "alp_ratio": "gt_3",
        "ama_positive": true,
        "autoantibody_titer": "lt_1_40",
        "biliary_changes": true,
        "globulin_igg": "lt_1x",
        "hepatotoxic_drugs": true,
        "hla_dr3_or_dr4": false,
        "interface_hepatitis": false,
        "liver_cell_rosettes": false,
        "lymphoplasmacytic_infiltrate": false,
        "other_atypical_histology": true,
        "other_autoantibodies": false,
        "other_autoimmune_disease": false,
        "sex": "male",
        "treatment_response": "none",
        "viral_markers_positive": true
      }
    ]
  }),
});
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.007 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.007"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://api.magentlab.com/api/calc/aih_original",
        json={
            "items": [
                {
                    "alcohol_intake": "gt_60",
                    "alp_ratio": "gt_3",
                    "ama_positive": True,
                    "autoantibody_titer": "lt_1_40",
                    "biliary_changes": True,
                    "globulin_igg": "lt_1x",
                    "hepatotoxic_drugs": True,
                    "hla_dr3_or_dr4": False,
                    "interface_hepatitis": False,
                    "liver_cell_rosettes": False,
                    "lymphoplasmacytic_infiltrate": False,
                    "other_atypical_histology": True,
                    "other_autoantibodies": False,
                    "other_autoimmune_disease": False,
                    "sex": "male",
                    "treatment_response": "none",
                    "viral_markers_positive": True,
                },
                {
                    "alcohol_intake": "gt_60",
                    "alp_ratio": "gt_3",
                    "ama_positive": True,
                    "autoantibody_titer": "lt_1_40",
                    "biliary_changes": True,
                    "globulin_igg": "lt_1x",
                    "hepatotoxic_drugs": True,
                    "hla_dr3_or_dr4": False,
                    "interface_hepatitis": False,
                    "liver_cell_rosettes": False,
                    "lymphoplasmacytic_infiltrate": False,
                    "other_atypical_histology": True,
                    "other_autoantibodies": False,
                    "other_autoimmune_disease": False,
                    "sex": "male",
                    "treatment_response": "none",
                    "viral_markers_positive": True,
                },
            ],
        },
    )
    print(res.status_code, res.text)

Security scan

1 finding

  • Charges more than its listed price in payment
    Listed at $0.005, charges $0.007

Recent checks

WhenResultHTTPTimePrice
2 h agoTimed out---
8 h agoTimed out---
12 h agoTimed out---
17 h agoTimed out---
22 h agoPassed402182 ms$0.007
Show 10 older checks
27 h agoPassed402381 ms$0.007
31 h agoPassed402193 ms$0.007
36 h agoPassed402159 ms$0.007
41 h agoPassed402266 ms$0.007
45 h agoPassed402153 ms$0.007
2 days agoPassed402151 ms$0.007
2 days agoPassed402241 ms$0.007
2 days agoPassed402177 ms$0.007
3 days agoPassed402395 ms$0.007
3 days agoPassed402192 ms$0.007

History

11 Oct 2026Price changed from $0.005 to $0.007