{
  "x402Version": 2,
  "id": 39573,
  "slug": "39573",
  "resource": "https://api.magentlab.com/api/calc/saag",
  "description": "Runyon 1992 SAAG as serum albumin minus ascites albumin in g/dL, rounded to one decimal. portal_hypertension_physiology is true when SAAG >= 1.1 g/dL. Gradient only; not Light-style exudate/transudate criteria for ascites. Not a diagnosis. magent does not diagnose portal hypertension or peritonitis. Serum and ascites albumin as g/dL or g/L.",
  "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": [
              {
                "albumin_g_dl": 3.5,
                "albumin_g_l": 35,
                "ascites_albumin_g_dl": 2,
                "ascites_albumin_g_l": 20
              },
              {
                "albumin_g_dl": 3.5,
                "albumin_g_l": 35,
                "ascites_albumin_g_dl": 2,
                "ascites_albumin_g_l": 20
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "albumin_g_dl": 3.5,
                "ascites_albumin_g_dl": 2,
                "citation": {
                  "authors": "Runyon BA, Montano AA, Akriviadis EA, Antillon MR, Irving MA, McHutchison JG",
                  "doi": "10.7326/0003-4819-117-3-215",
                  "id": "runyon-1992",
                  "source": "Ann Intern Med. 1992;117(3):215-220",
                  "title": "The serum-ascites albumin gradient is superior to the exudate-transudate concept in the differential diagnosis of ascites"
                },
                "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": "saag",
                "formula_expression": "saag_g_dl = albumin_g_dl - ascites_albumin_g_dl",
                "portal_hypertension_physiology": true,
                "saag_g_dl": 1.5
              },
              {
                "albumin_g_dl": 3.5,
                "ascites_albumin_g_dl": 2,
                "citation": {
                  "authors": "Runyon BA, Montano AA, Akriviadis EA, Antillon MR, Irving MA, McHutchison JG",
                  "doi": "10.7326/0003-4819-117-3-215",
                  "id": "runyon-1992",
                  "source": "Ann Intern Med. 1992;117(3):215-220",
                  "title": "The serum-ascites albumin gradient is superior to the exudate-transudate concept in the differential diagnosis of ascites"
                },
                "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": "saag",
                "formula_expression": "saag_g_dl = albumin_g_dl - ascites_albumin_g_dl",
                "portal_hypertension_physiology": true,
                "saag_g_dl": 1.5
              }
            ],
            "path": "/api/calc/saag"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "albumin_g_dl": {
                          "description": "Serum albumin in g/dL (1-6). Provide this or albumin_g_l, not both.",
                          "type": "number"
                        },
                        "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.",
                          "type": "number"
                        },
                        "ascites_albumin_g_dl": {
                          "description": "Ascites albumin in g/dL (0.1-6). Provide this or ascites_albumin_g_l, not both. May be lower than serum albumin.",
                          "type": "number"
                        },
                        "ascites_albumin_g_l": {
                          "description": "Ascites albumin in g/L (1-60). Converted as g/dL = g/L / 10. Provide this or ascites_albumin_g_dl, not both.",
                          "type": "number"
                        }
                      },
                      "required": [],
                      "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": [
    "saag",
    "ascites",
    "albumin",
    "liver",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-12T13:52:05.575Z",
  "quality": {
    "calls30d": 3,
    "uniquePayers30d": 1,
    "lastCalledAt": "2026-10-12T13:52:05.451Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "albumin_g_dl": 3.5,
                  "albumin_g_l": 35,
                  "ascites_albumin_g_dl": 2,
                  "ascites_albumin_g_l": 20
                },
                {
                  "albumin_g_dl": 3.5,
                  "albumin_g_l": 35,
                  "ascites_albumin_g_dl": 2,
                  "ascites_albumin_g_l": 20
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "albumin_g_dl": 3.5,
                  "ascites_albumin_g_dl": 2,
                  "citation": {
                    "authors": "Runyon BA, Montano AA, Akriviadis EA, Antillon MR, Irving MA, McHutchison JG",
                    "doi": "10.7326/0003-4819-117-3-215",
                    "id": "runyon-1992",
                    "source": "Ann Intern Med. 1992;117(3):215-220",
                    "title": "The serum-ascites albumin gradient is superior to the exudate-transudate concept in the differential diagnosis of ascites"
                  },
                  "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": "saag",
                  "formula_expression": "saag_g_dl = albumin_g_dl - ascites_albumin_g_dl",
                  "portal_hypertension_physiology": true,
                  "saag_g_dl": 1.5
                },
                {
                  "albumin_g_dl": 3.5,
                  "ascites_albumin_g_dl": 2,
                  "citation": {
                    "authors": "Runyon BA, Montano AA, Akriviadis EA, Antillon MR, Irving MA, McHutchison JG",
                    "doi": "10.7326/0003-4819-117-3-215",
                    "id": "runyon-1992",
                    "source": "Ann Intern Med. 1992;117(3):215-220",
                    "title": "The serum-ascites albumin gradient is superior to the exudate-transudate concept in the differential diagnosis of ascites"
                  },
                  "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": "saag",
                  "formula_expression": "saag_g_dl = albumin_g_dl - ascites_albumin_g_dl",
                  "portal_hypertension_physiology": true,
                  "saag_g_dl": 1.5
                }
              ],
              "path": "/api/calc/saag"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "albumin_g_dl": {
                            "description": "Serum albumin in g/dL (1-6). Provide this or albumin_g_l, not both.",
                            "type": "number"
                          },
                          "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.",
                            "type": "number"
                          },
                          "ascites_albumin_g_dl": {
                            "description": "Ascites albumin in g/dL (0.1-6). Provide this or ascites_albumin_g_l, not both. May be lower than serum albumin.",
                            "type": "number"
                          },
                          "ascites_albumin_g_l": {
                            "description": "Ascites albumin in g/L (1-60). Converted as g/dL = g/L / 10. Provide this or ascites_albumin_g_dl, not both.",
                            "type": "number"
                          }
                        },
                        "required": [],
                        "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"
  }
}