# magent S/F Ratio Calculator

> magent S/F Ratio Calculator 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-15).

Calculates the SpO2/FiO2 (S/F) ratio by dividing pulse-oximetry SpO2 percentage by inspired oxygen fraction, returning the ratio rounded to one decimal place.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/sf_ratio
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/magent-s-f-ratio-calculator-9ab4abab
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_U1Nvsn_bDeRHj6oSWNKLH

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-s-f-ratio-calculator-9ab4abab
```

Example prompt: Calculate the S/F ratio for my patient who has an SpO2 of 94% and is on 40% inspired oxygen (FiO2 of 0.40).

## When to prefer this

Choose this endpoint when you need a fast, non-invasive oxygenation index and arterial blood gas (PaO2) is unavailable or impractical — i.e., when you have pulse-oximetry SpO2 but not a measured PaO2. Use the sibling PaO2/FiO2 endpoint instead when arterial blood gas values are available. Do not use this for ROX index (which incorporates respiratory rate) or for formal ARDS/Berlin criteria banding.

## Known failure modes

- FiO2 outside 0.21–1.0 range returns validation error
- SpO2 outside 50–100% range returns validation error
- Missing required query parameters returns 400 error
- Payment not provided or declined returns 402 error

## How this service works

SpO2/FiO2 (S/F) ratio as pulse-oximetry SpO2 percent divided by inspired oxygen as a fraction (0.21–1.0) (Rice 2007). Returns the ratio rounded to one decimal. Magent does not apply ARDS or Berlin bands. This is not the PaO2/FiO2 (P/F) ratio and not the ROX index.

## Output

Returns a single numeric S/F ratio (SpO2% ÷ FiO2 fraction) rounded to one decimal place. This is the Rice 2007 surrogate oxygenation index — not the P/F ratio and not the ROX index.

## 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": [
      "spo2_percent",
      "fio2"
     ],
     "properties": {
      "fio2": {
       "type": "number",
       "description": "Inspired oxygen as a fraction (0.21-1.0), not a percent. Required."
      },
      "spo2_percent": {
       "type": "number",
       "description": "Pulse-oximetry SpO2 as a percent (50-100)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/api/calc/sf_ratio",
  "count": 2,
  "items": [
   {
    "fio2": 0.21,
    "formula": "sf_ratio",
    "citation": {
     "id": "rice-2007",
     "doi": "10.1378/chest.07-0617",
     "title": "Comparison of the SpO2/FIO2 ratio and the PaO2/FIO2 ratio in patients with acute lung injury or ARDS",
     "source": "Chest. 2007;132(2):410-417",
     "authors": "Rice TW, Wheeler AP, Bernard GR, Hayden DL, Schoenfeld DA, Ware LB"
    },
    "sf_ratio": 452.4,
    "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.",
    "spo2_percent": 95,
    "formula_expression": "sf_ratio = spo2_percent / fio2"
   },
   {
    "fio2": 0.21,
    "formula": "sf_ratio",
    "citation": {
     "id": "rice-2007",
     "doi": "10.1378/chest.07-0617",
     "title": "Comparison of the SpO2/FIO2 ratio and the PaO2/FIO2 ratio in patients with acute lung injury or ARDS",
     "source": "Chest. 2007;132(2):410-417",
     "authors": "Rice TW, Wheeler AP, Bernard GR, Hayden DL, Schoenfeld DA, Ware LB"
    },
    "sf_ratio": 452.4,
    "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.",
    "spo2_percent": 95,
    "formula_expression": "sf_ratio = spo2_percent / fio2"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-s-f-ratio-calculator-9ab4abab/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)
