MAGENT

LIVE

Glucocorticoid dose conversion

Convert a glucocorticoid dose among hydrocortisone, prednisone, and dexamethasone using Meikle 1977 equivalent doses (20 mg : 5 mg : 0.75 mg).

Also searched as

  • steroid conversion
  • glucocorticoid equivalent dose
  • hydrocortisone prednisone dexamethasone
  • Meikle Tyler 1977
  • corticosteroid dose conversion
  • prednisone equivalent

LIVE $0.005 USDC GET /api/calc/steroid_conversion

Markdown: /docs/steroid-conversion.md · Canonical: https://magentlab.com/docs/steroid-conversion

Not a medical device. Not a diagnosis, dose, or listing recommendation.

What it computes

Convert a glucocorticoid dose among hydrocortisone, prednisone, and dexamethasone using Meikle 1977 equivalent doses (20 mg : 5 mg : 0.75 mg).

When to use

When an agent needs a published equivalent dose among those three agents and must not invent a conversion table or add unpublished steroids.

When not to use

  • Not a taper or stress-dose protocol.
  • Mineralocorticoid activity is not converted.
  • Only hydrocortisone, prednisone, and dexamethasone as published by Meikle 1977.
  • magent does not recommend a regimen.

Formula

equivalent_dose_mg = dose_mg * (to_equivalent_mg / from_equivalent_mg); hydrocortisone 20 mg = prednisone 5 mg = dexamethasone 0.75 mg (Meikle 1977)

Citation

Title
Potency and duration of action of glucocorticoids. Effects of hydrocortisone, prednisone and dexamethasone on human pituitary-adrenal function
Authors
Meikle AW, Tyler FH
Source
Am J Med. 1977;63(2):200-207
DOI
10.1016/0002-9343(77)90233-9

Worked example

20 mg hydrocortisone to prednisone

Given: dose_mg=20from=hydrocortisoneto=prednisone

  1. Meikle 1977 equivalents: hydrocortisone 20 mg, prednisone 5 mg
  2. equivalent_dose_mg = 20 * (5 / 20) = 5 mg prednisone

20 mg hydrocortisone to dexamethasone

Given: dose_mg=20from=hydrocortisoneto=dexamethasone

  1. Meikle 1977 equivalents: hydrocortisone 20 mg, dexamethasone 0.75 mg
  2. equivalent_dose_mg = 20 * (0.75 / 20) = 0.75 mg dexamethasone

Identity 5 mg prednisone

Given: dose_mg=5from=prednisoneto=prednisone

  1. Same agent: to_eq / from_eq = 1
  2. equivalent_dose_mg = 5 mg prednisone

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/steroid_conversion?from=hydrocortisone&to=prednisone&dose_mg=20

Full URL: https://api.magentlab.com/api/calc/steroid_conversion?from=hydrocortisone&to=prednisone&dose_mg=20

Call

Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params return HTTP 400 before any quote or charge.

curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/steroid_conversion?from=hydrocortisone&to=prednisone&dose_mg=20"

Parameters

Name Type Required Description
from string required · hydrocortisone, prednisone, dexamethasone Source glucocorticoid. hydrocortisone, prednisone, or dexamethasone (Meikle 1977).
to string required · hydrocortisone, prednisone, dexamethasone Target glucocorticoid. hydrocortisone, prednisone, or dexamethasone (Meikle 1977).
dose_mg number required Dose of the source glucocorticoid in milligrams (0.1-5000).

Bulk (POST)

POST the same path with a JSON items array. Price is n times the GET unit. Invalid items return HTTP 400 before settlement.

POST /api/calc/steroid_conversion Max 25 unit_amount * n PREVIEW

  • 1 to 25 items. Each item uses the same keys as the GET query parameters.
  • The first invalid item fails the whole request (index in the 400 JSON). You are not charged.
  • HTTP 200 is {count, path, items}. Each items[i] is the GET 200 body for that row.
  • Catalog misses (empty matches, found=false) stay paid 200s inside that slot.
  • x402 resource URL is this path plus n and body_sha256. Browsers that prefer text/html get the same paywall as GET; Pay retries POST with the same items.

Example request (fixture)

{
  "items": [
    {
      "dose_mg": "20",
      "from": "hydrocortisone",
      "to": "prednisone"
    },
    {
      "dose_mg": "20",
      "from": "hydrocortisone",
      "to": "prednisone"
    }
  ]
}

Open bulk paywall →

Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.

Example 200 (fixture)

{
  "count": 2,
  "path": "/api/calc/steroid_conversion",
  "items": [
    {
      "from": "hydrocortisone",
      "to": "prednisone",
      "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.",
      "citation": {
        "authors": "Meikle AW, Tyler FH",
        "doi": "10.1016/0002-9343(77)90233-9",
        "id": "meikle-1977",
        "source": "Am J Med. 1977;63(2):200-207",
        "title": "Potency and duration of action of glucocorticoids. Effects of hydrocortisone, prednisone and dexamethasone on human pituitary-adrenal function"
      },
      "formula": "steroid_conversion",
      "formula_expression": "equivalent_dose_mg = dose_mg * (to_equivalent_mg / from_equivalent_mg); hydrocortisone 20 mg = prednisone 5 mg = dexamethasone 0.75 mg (Meikle 1977)",
      "dose_mg": 20.0,
      "equivalent_dose_mg": 5.0,
      "from_equivalent_mg": 20.0,
      "to_equivalent_mg": 5.0
    },
    {
      "from": "hydrocortisone",
      "to": "prednisone",
      "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.",
      "citation": {
        "authors": "Meikle AW, Tyler FH",
        "doi": "10.1016/0002-9343(77)90233-9",
        "id": "meikle-1977",
        "source": "Am J Med. 1977;63(2):200-207",
        "title": "Potency and duration of action of glucocorticoids. Effects of hydrocortisone, prednisone and dexamethasone on human pituitary-adrenal function"
      },
      "formula": "steroid_conversion",
      "formula_expression": "equivalent_dose_mg = dose_mg * (to_equivalent_mg / from_equivalent_mg); hydrocortisone 20 mg = prednisone 5 mg = dexamethasone 0.75 mg (Meikle 1977)",
      "dose_mg": 20.0,
      "equivalent_dose_mg": 5.0,
      "from_equivalent_mg": 20.0,
      "to_equivalent_mg": 5.0
    }
  ]
}

Response

Field Type Description
formula string steroid_conversion
formula_expression string Equivalent-dose conversion using Meikle 1977 factors
from string Normalized source glucocorticoid
to string Normalized target glucocorticoid
dose_mg number Input dose in milligrams
equivalent_dose_mg number Converted dose in milligrams of the target glucocorticoid
from_equivalent_mg number Meikle 1977 equivalent milligrams for the source agent
to_equivalent_mg number Meikle 1977 equivalent milligrams for the target agent
citation object Meikle and Tyler 1977
disclaimer string Not-a-device notice

Example JSON

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "from": "hydrocortisone",
  "to": "prednisone",
  "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.",
  "citation": {
    "authors": "Meikle AW, Tyler FH",
    "doi": "10.1016/0002-9343(77)90233-9",
    "id": "meikle-1977",
    "source": "Am J Med. 1977;63(2):200-207",
    "title": "Potency and duration of action of glucocorticoids. Effects of hydrocortisone, prednisone and dexamethasone on human pituitary-adrenal function"
  },
  "formula": "steroid_conversion",
  "formula_expression": "equivalent_dose_mg = dose_mg * (to_equivalent_mg / from_equivalent_mg); hydrocortisone 20 mg = prednisone 5 mg = dexamethasone 0.75 mg (Meikle 1977)",
  "dose_mg": 20.0,
  "equivalent_dose_mg": 5.0,
  "from_equivalent_mg": 20.0,
  "to_equivalent_mg": 5.0
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_steroid from and to must be hydrocortisone, prednisone, or dexamethasone. Returned before settlement; you are not charged.
400 invalid_steroid_dose dose_mg must be a number from 0.1 to 5000. Returned before settlement; you are not charged.
400 invalid_items POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
400 invalid_item_count items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
400 invalid_item each items entry must be a JSON object Returned before settlement; you are not charged.

Related tools

  • Morphine milligram equivalents — Compute morphine milligram equivalents from a CDC 2022 table opioid and daily dose (or transdermal fentanyl mcg/hr).

Payment

Required query parameters must be present and valid. Invalid params return HTTP 400 JSON before settlement. magent does not charge. Fix the params, then request a new 402 quote for that complete URL. Catalog misses (empty matches, found=false) are valid paid 200s. Unpaid valid requests return HTTP 402 with a base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake and shared payment errors: Payments. Stdio MCP: /docs/mcp.

Guarantees

  • Invalid query parameters return HTTP 400 before settlement. You are not charged.
  • Settlement finishes before the tool executes (paymentFlow upfront). Uncertain or failed settlement fails closed (HTTP 503). Retry the same PAYMENT-SIGNATURE.
  • HTTP 402 is unpaid only. Do not sign a second authorization because of a 503.
  • Execution is timeout-bounded and concurrency-capped.
  • Calculator inputs are stored encrypted for allowlisted operators (Magent Console). They are not in public logs, SSH lookups, catalog, or rollups. Request logs store path without query.