{
  "x402Version": 2,
  "id": 39318,
  "slug": "39318",
  "resource": "https://api.magentlab.com/api/calc/ain_risk",
  "description": "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 (0 or 1+ versus 2+ or higher, caller-assigned). Returns logit and estimated_probability_percent. Not a medical device, not a diagnosis, and not a kidney biopsy. Does not include urine IL-9 or TNF-α. Moledina 2022 publishes no named low/high cutoff.",
  "type": "http",
  "serviceName": "magent",
  "resourceType": "Agent Service",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x836Be278f1739fB4308091cD1852F7971Bc19Ee2",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "5000",
      "amountUsd": 0.005,
      "maxTimeoutSeconds": 600
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "iconUrl": "https://api.magentlab.com/favicon.ico",
        "input": {
          "body": {
            "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
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "bun_cr_ratio": 15,
                "citation": {
                  "authors": "Moledina DG, Eadon MT, Calderon F, et al.",
                  "doi": "10.1093/ndt/gfab346",
                  "id": "moledina-2022",
                  "pmid": "34865148",
                  "source": "Nephrol Dial Transplant. 2022;37(11):2214-2222",
                  "title": "Development and external validation of a diagnostic model for biopsy-proven acute interstitial nephritis using electronic health record data"
                },
                "creatinine_mg_dl": 2.1,
                "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.",
                "estimated_probability_percent": 28.68,
                "formula": "ain_risk",
                "formula_expression": "L = 0.770398 + 0.8367518*ln(creatinine_mg_dl) - 0.9181938*ln(bun_cr_ratio) - 0.0501203*1000*(specific_gravity - 1) + protein (Moledina 2022 development model; Table 4 aORs / supplement weights); protein le_1 (0 or 1+) 0.9360127, ge_2 (2+ or higher, reference) 0; estimated_probability_percent = 100 * exp(L) / (1 + exp(L))",
                "logit": -0.9111,
                "protein": "le_1",
                "specific_gravity": 1.015
              },
              {
                "bun_cr_ratio": 15,
                "citation": {
                  "authors": "Moledina DG, Eadon MT, Calderon F, et al.",
                  "doi": "10.1093/ndt/gfab346",
                  "id": "moledina-2022",
                  "pmid": "34865148",
                  "source": "Nephrol Dial Transplant. 2022;37(11):2214-2222",
                  "title": "Development and external validation of a diagnostic model for biopsy-proven acute interstitial nephritis using electronic health record data"
                },
                "creatinine_mg_dl": 2.1,
                "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.",
                "estimated_probability_percent": 28.68,
                "formula": "ain_risk",
                "formula_expression": "L = 0.770398 + 0.8367518*ln(creatinine_mg_dl) - 0.9181938*ln(bun_cr_ratio) - 0.0501203*1000*(specific_gravity - 1) + protein (Moledina 2022 development model; Table 4 aORs / supplement weights); protein le_1 (0 or 1+) 0.9360127, ge_2 (2+ or higher, reference) 0; estimated_probability_percent = 100 * exp(L) / (1 + exp(L))",
                "logit": -0.9111,
                "protein": "le_1",
                "specific_gravity": 1.015
              }
            ],
            "path": "/api/calc/ain_risk"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "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.",
                          "type": "number"
                        },
                        "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.",
                          "type": "number"
                        },
                        "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.",
                          "enum": [
                            "le_1",
                            "ge_2"
                          ],
                          "type": "string"
                        },
                        "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.",
                          "type": "number"
                        }
                      },
                      "required": [
                        "creatinine_mg_dl",
                        "bun_cr_ratio",
                        "specific_gravity",
                        "protein"
                      ],
                      "type": "object"
                    },
                    "maxItems": 25,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "items"
                ],
                "type": "object"
              },
              "headers": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "method": {
                "const": "POST",
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "ain-risk",
    "kidney",
    "interstitial-nephritis",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-12T23:25:50.207Z",
  "quality": {
    "calls30d": 5,
    "uniquePayers30d": 2,
    "lastCalledAt": "2026-10-12T23:25:49.917Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "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
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "bun_cr_ratio": 15,
                  "citation": {
                    "authors": "Moledina DG, Eadon MT, Calderon F, et al.",
                    "doi": "10.1093/ndt/gfab346",
                    "id": "moledina-2022",
                    "pmid": "34865148",
                    "source": "Nephrol Dial Transplant. 2022;37(11):2214-2222",
                    "title": "Development and external validation of a diagnostic model for biopsy-proven acute interstitial nephritis using electronic health record data"
                  },
                  "creatinine_mg_dl": 2.1,
                  "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.",
                  "estimated_probability_percent": 28.68,
                  "formula": "ain_risk",
                  "formula_expression": "L = 0.770398 + 0.8367518*ln(creatinine_mg_dl) - 0.9181938*ln(bun_cr_ratio) - 0.0501203*1000*(specific_gravity - 1) + protein (Moledina 2022 development model; Table 4 aORs / supplement weights); protein le_1 (0 or 1+) 0.9360127, ge_2 (2+ or higher, reference) 0; estimated_probability_percent = 100 * exp(L) / (1 + exp(L))",
                  "logit": -0.9111,
                  "protein": "le_1",
                  "specific_gravity": 1.015
                },
                {
                  "bun_cr_ratio": 15,
                  "citation": {
                    "authors": "Moledina DG, Eadon MT, Calderon F, et al.",
                    "doi": "10.1093/ndt/gfab346",
                    "id": "moledina-2022",
                    "pmid": "34865148",
                    "source": "Nephrol Dial Transplant. 2022;37(11):2214-2222",
                    "title": "Development and external validation of a diagnostic model for biopsy-proven acute interstitial nephritis using electronic health record data"
                  },
                  "creatinine_mg_dl": 2.1,
                  "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.",
                  "estimated_probability_percent": 28.68,
                  "formula": "ain_risk",
                  "formula_expression": "L = 0.770398 + 0.8367518*ln(creatinine_mg_dl) - 0.9181938*ln(bun_cr_ratio) - 0.0501203*1000*(specific_gravity - 1) + protein (Moledina 2022 development model; Table 4 aORs / supplement weights); protein le_1 (0 or 1+) 0.9360127, ge_2 (2+ or higher, reference) 0; estimated_probability_percent = 100 * exp(L) / (1 + exp(L))",
                  "logit": -0.9111,
                  "protein": "le_1",
                  "specific_gravity": 1.015
                }
              ],
              "path": "/api/calc/ain_risk"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "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.",
                            "type": "number"
                          },
                          "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.",
                            "type": "number"
                          },
                          "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.",
                            "enum": [
                              "le_1",
                              "ge_2"
                            ],
                            "type": "string"
                          },
                          "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.",
                            "type": "number"
                          }
                        },
                        "required": [
                          "creatinine_mg_dl",
                          "bun_cr_ratio",
                          "specific_gravity",
                          "protein"
                        ],
                        "type": "object"
                      },
                      "maxItems": 25,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "type": "object"
                },
                "headers": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "method": {
                  "const": "POST",
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.magentlab.com",
    "manifest_name": "api.magentlab.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}