# magent AIH Original Score (Alvarez 1999)

> magent AIH Original Score (Alvarez 1999) is a paid API for AI agents from api.magentlab.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Calculates the Alvarez 1999 revised original IAIHG autoimmune hepatitis (AIH) scoring system, returning a numeric score with pretreatment and posttreatment diagnostic thresholds.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/aih_original
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/magent-aih-original-score-alvarez-1999-e9cbee3c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LpuV2fQuupiQaAwYfBvnL

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability magent-aih-original-score-alvarez-1999-e9cbee3c
```

Example prompt: Calculate the original Alvarez 1999 AIH score for a female patient: ALP:AST ratio less than 1.5x ULN, IgG between 1.5 and 2x ULN, ANA titer 1:80 (1+ category), AMA negative, no viral markers, no hepatotoxic drugs, alcohol under 25 g/day, interface hepatitis present, lymphoplasmacytic infiltrate present, liver cell rosettes present, no biliary changes, no atypical histology, and no other autoimmune disease — what's the pretreatment score and does it meet definite or probable AIH?

## When to prefer this

Use this endpoint when you need the full 1999 Alvarez revised original IAIHG AIH scoring system rather than the simpler 2008 Hennes simplified score. Prefer it when histology data is available and you want granular multi-component scoring including HLA, treatment response thresholds, and additive histology sub-components. Not appropriate as a standalone diagnosis or to replace clinical judgment.

## Known failure modes

- Missing required query parameters (sex, alp_ratio, globulin_igg, autoantibody_titer, ama_positive, viral_markers_positive, hepatotoxic_drugs, alcohol_intake, histology fields, other_autoimmune_disease) returns a 400 error
- Invalid enum values for categorical parameters return validation errors
- HLA parameter ignored unless autoantibody_titer is lt_1_40 (seronegative), so passing it in non-seronegative contexts has no scoring effect
- Payment failure or missing x402 header causes payment-required rejection

## How this service works

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.

## Output

Returns a numeric AIH score computed from all weighted input parameters, along with interpretation of that score against the Alvarez 1999 pretreatment thresholds (definite >15, probable 10–15) and posttreatment thresholds (definite >17, probable 12–17). Does not provide a diagnosis or treatment recommendation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "sex",
      "alp_ratio",
      "globulin_igg",
      "autoantibody_titer",
      "ama_positive",
      "viral_markers_positive",
      "hepatotoxic_drugs",
      "alcohol_intake",
      "interface_hepatitis",
      "lymphoplasmacytic_infiltrate",
      "liver_cell_rosettes",
      "biliary_changes",
      "other_atypical_histology",
      "other_autoimmune_disease"
     ],
     "properties": {
      "sex": {
       "enum": [
        "female",
        "male"
       ],
       "type": "string",
       "description": "Caller-assigned sex (Alvarez 1999). female scores 2; male scores 0. magent does not examine the patient."
      },
      "alp_ratio": {
       "enum": [
        "lt_1_5",
        "1_5_to_3",
        "gt_3"
       ],
       "type": "string",
       "description": "Caller-assigned ALP:(AST or ALT) ratio as multiples of ULN (Alvarez 1999 note 1). lt_1_5 (<1.5) scores 2; 1_5_to_3 (1.5–3.0) scores 0; gt_3 (>3) scores -2. magent does not take raw enzymes."
      },
      "ama_positive": {
       "type": "boolean",
       "description": "Caller-assigned antimitochondrial antibody. true scores -4; false scores 0 (Alvarez 1999). magent does not assay AMA."
      },
      "globulin_igg": {
       "enum": [
        "lt_1x",
        "1_to_1_5x",
        "1_5_to_2x",
        "gt_2x"
       ],
       "type": "string",
       "description": "Caller-assigned serum globulin or IgG as multiples of ULN (Alvarez 1999). lt_1x scores 0; 1_to_1_5x scores 1; 1_5_to_2x scores 2; gt_2x scores 3. magent does not assay globulin or IgG."
      },
      "alcohol_intake": {
       "enum": [
        "lt_25",
        "25_to_60",
        "gt_60"
       ],
       "type": "string",
       "description": "Caller-assigned average alcohol intake (Alvarez 1999). lt_25 (<25 g/day) scores 2; 25_to_60 scores 0 (gap between the tabulated <25 and >60 cells); gt_60 (>60 g/day) scores -2."
      },
      "hla_dr3_or_dr4": 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-aih-original-score-alvarez-1999-e9cbee3c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.magentlab.com](https://www.zero.xyz/host/api.magentlab.com/llms.txt)
