---
title: "Maximum operating depth"
method: POST
path: "/api/v1/mod"
---

# Maximum operating depth

`POST /api/v1/mod`

## Request

- Base URL: `https://indamix.divingtechnics.com`
- URL: `https://indamix.divingtechnics.com/api/v1/mod`
- Auth: none required

Use whenever the user asks how deep a gas can go or checks an existing breathing gas (nitrox, trimix, CCR diluent) against a depth, even if they don't mention In Da Mix; never work a MOD out by hand.

## Request body

- object
  - `o2_percent` number, required: Oxygen in the gas, percent (32 for EAN32, 18 for trimix 18/45).
  - `he_percent` number: Helium in the gas, percent (0 for nitrox).
  - `ppo2_bar` number: ppO2 limit, bar. Default from the In Da Mix settings for the dive mode; the value used is listed in `assumed`.
  - `max_end` number: Maximum END for the complete MOD, in depth_unit. Default from the In Da Mix settings for the dive mode; the value used is listed in `assumed`.
  - `max_density_g_per_l` number: Maximum gas density for the complete MOD, g/L. Default from the In Da Mix settings for the dive mode; the value used is listed in `assumed`.
  - `o2_narcotic` boolean: Count O2 as narcotic in the END. Default from the In Da Mix settings for the dive mode; the value used is listed in `assumed`.
  - `complete` boolean: Also the complete MOD (within the END and gas density limits too). Leave it out at first; set true only when the user says yes to it. Giving max_end or max_density_g_per_l turns it on.
  - `dive_mode` 'OC' | 'CCR': Open circuit (OC) or closed-circuit rebreather (CCR). Sets which defaults apply (from the In Da Mix settings: ppO2, END, density, O2 narcotic). The values used are listed in `assumed`.
  - `depth_unit` 'm' | 'ft': Unit of every depth in the question and the answer.
  - `language` 'en' | 'hr': Language of the texts in the answer: en (English) or hr (Croatian). Use the user's language.
  - `include_steps` boolean: Also return the app's ƒx steps ("How this was calculated"): every formula with its numbers. Long: only when the user asks how it was calculated.

## Response `200`

The calculation: summary (the steps or result in the user's language), the numbers, and the analyser disclaimer to pass on. If error is set, the calculation was refused; explain message to the user.

- Answer
  - `summary` string, required: The answer as text lines, in the requested language.
  - `disclaimer` string: Always pass this on to the user.
  - `version` string: The In Da Mix version that calculated this, v<version>.<build>.
  - `excel_url` string: Link to the Excel workbook of this calculation (the app's View in Excel). Give it to the user when they want a spreadsheet or the full working.
  - `fx_steps` object[]: With include_steps: the app's ƒx steps (title, formula, values, result, detail) in the user's language.
  - `terms` string: The terms of use notice with its link: show it to the user once, with the first In Da Mix answer of a conversation.
  - `error` string: Set when the calculation was refused (an engine error code or INVALID_INPUT).
  - `message` string: Why it was refused, in the user's language.

## Other responses

- `400`: Invalid or missing input; message says what is needed.

---

[API](https://skmtc.dev/divingtechnics/apis/in-da-mix-gas-blending-calculator.md) · [All operations](https://skmtc.dev/divingtechnics/apis/in-da-mix-gas-blending-calculator/llms.txt) · [OpenAPI document](https://skmtc.dev/divingtechnics/apis/in-da-mix-gas-blending-calculator/revisions/d1610faf1201?raw)
