{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ivive-app/json-schema/ivive-app-sensitivity-request-schema.json",
  "title": "SensitivityRequest",
  "description": "The same inputs as a calculation, plus the range to vary each over.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ivive-app-openapi.json#/components/schemas/SensitivityRequest",
  "properties": {
    "clint": {
      "type": "number",
      "minimum": 0.0,
      "title": "Clint",
      "description": "Intrinsic clearance (µL/min/mg microsomal protein). Use ge=0: zero clearance is physiologically valid."
    },
    "fu_mic": {
      "type": "number",
      "maximum": 1.0,
      "exclusiveMinimum": 0.0,
      "title": "Fu Mic",
      "description": "Unbound fraction in microsomes (0–1). Corrects for non-specific microsomal binding."
    },
    "fu_p": {
      "type": "number",
      "maximum": 1.0,
      "minimum": 0.0,
      "title": "Fu P",
      "description": "Unbound fraction in plasma (0–1). Plasma protein binding correction."
    },
    "rb": {
      "type": "number",
      "maximum": 50.0,
      "exclusiveMinimum": 0.0,
      "title": "Rb",
      "description": "Blood-to-plasma concentration ratio. fu_b = fu_p / Rb. Output is blood clearance.",
      "default": 1.0
    },
    "species": {
      "type": "string",
      "enum": [
        "human",
        "rat",
        "dog"
      ],
      "title": "Species",
      "description": "Species for physiological parameters (Qh, MPPGL, liver weight)."
    },
    "model": {
      "type": "string",
      "enum": [
        "well-stirred",
        "parallel-tube"
      ],
      "title": "Model",
      "description": "IVIVE model. well-stirred (venous equilibrium) or parallel-tube (sinusoidal perfusion).",
      "default": "well-stirred"
    },
    "assay_type": {
      "type": "string",
      "enum": [
        "microsomes",
        "hepatocytes"
      ],
      "title": "Assay Type",
      "description": "Assay type for CLint scaling. microsomes: uses MPPGL (mg/g) × 1e-3; hepatocytes: uses HPGL (×10⁶ cells/g) × 1e-3.",
      "default": "microsomes"
    },
    "correction_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Correction Id",
      "description": "Saved lab correction (/api/correction-equations) to apply. Must match species and assay_type. Corrects predicted plasma CL and replaces the reference band with one from the lab's compounds."
    },
    "clint_censored": {
      "type": "boolean",
      "title": "Clint Censored",
      "description": "Set when the assay reported CLint below its limit of quantification and `clint` is that limit rather than a measurement. CLint then lies in [0, clint), so every clearance output is an upper bound: `upper_bound` is true, no observed-CL band is returned, and the clint_below_loq flag fires.",
      "default": false
    },
    "clint_range": {
      "anyOf": [
        {
          "$ref": "#/$defs/InputRange"
        },
        {
          "type": "null"
        }
      ],
      "description": "CLint range in the assay's units, e.g. {\"low\": 10, \"high\": 40}."
    },
    "fu_mic_range": {
      "anyOf": [
        {
          "$ref": "#/$defs/InputRange"
        },
        {
          "type": "null"
        }
      ],
      "description": "fu,mic range (0–1), e.g. {\"low\": 0.5, \"high\": 0.9}."
    },
    "fu_p_range": {
      "anyOf": [
        {
          "$ref": "#/$defs/InputRange"
        },
        {
          "type": "null"
        }
      ],
      "description": "A predicted fu,p carries its 50% range; pass it to see what it costs."
    }
  },
  "type": "object",
  "required": [
    "clint",
    "fu_mic",
    "fu_p",
    "species"
  ],
  "$defs": {
    "InputRange": {
      "properties": {
        "low": {
          "type": "number",
          "exclusiveMinimum": 0.0,
          "title": "Low",
          "description": "Low end, in the input's own units, e.g. 0.05 for fu,p."
        },
        "high": {
          "type": "number",
          "exclusiveMinimum": 0.0,
          "title": "High",
          "description": "High end, in the input's own units, e.g. 0.2 for fu,p."
        }
      },
      "type": "object",
      "required": [
        "low",
        "high"
      ],
      "title": "InputRange"
    }
  }
}