{"openapi":"3.1.0","info":{"title":"In Da Mix gas blending calculator","version":"1.24.0030","description":"Gas blending calculations for scuba divers and blenders (nitrox, trimix, heliair, heliox): fill steps, gas and bank use, fills per bank, top-up, What If, best mix, MOD and O2 decant days, with the app's ƒx steps and Excel workbook. The same engine as the In Da Mix app. Results are calculation aids: always tell the user to analyse the gas."},"servers":[{"url":"https://indamix.divingtechnics.com"}],"security":[],"paths":{"/api/v1/blend":{"post":{"operationId":"blend","summary":"Blend a mix (fill steps)","description":"Use whenever the user asks how to blend, mix, fill or prepare a breathing gas, even if they don't mention In Da Mix.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mix_type":{"type":"string","enum":["nitrox","trimix","heliair","heliox"],"description":"nitrox (O2 + air), trimix (He + O2 + air), heliair (He + air), heliox (He + O2)."},"start_pressure":{"type":"number","minimum":0,"description":"Pressure already in the tank, in pressure_unit. 0 = empty. This changes the result a lot: if the user did not give it, ask before calling. If you call without it, the tool assumes an empty tank and lists that in `assumed`."},"start_o2_percent":{"type":"number","minimum":0,"maximum":100,"default":21,"description":"O2 percent of the gas already in the tank (21 for air)."},"start_he_percent":{"type":"number","minimum":0,"maximum":100,"default":0,"description":"He percent of the gas already in the tank."},"target_pressure":{"type":"number","exclusiveMinimum":0,"description":"Fill pressure wanted, in pressure_unit (e.g. 200 or 232 bar, 3000 psi)."},"target_o2_percent":{"type":"number","minimum":0,"maximum":100,"description":"O2 percent of the mix wanted (nitrox, trimix, heliox)."},"target_he_percent":{"type":"number","minimum":0,"maximum":100,"description":"He percent of the mix wanted (trimix, heliair, heliox)."},"how":{"type":"string","enum":["partial_pressure","continuous"],"default":"partial_pressure","description":"partial_pressure: add pure He and O2 to the tank, then top up with air. continuous: He / O2 go into the compressor intake (a premix stream)."},"helium_first":{"type":"boolean","default":true,"description":"Partial pressure: add helium before oxygen (trimix, heliox)."},"use_booster":{"type":"boolean","default":false,"description":"A gas booster is available: banks that can't decant high enough are boosted. With DIVESOFT_REAL_GAS it changes the plan; with other methods it only plans the gas."},"tank_volume_l":{"type":"number","exclusiveMinimum":0,"default":12,"description":"Water volume of the tank being filled, litres (a twin 12 = 24). Used for gas litres and bank use."},"method":{"type":"string","enum":["IDEAL_GAS_DALTON","IDEAL_GAS_Z_FACTOR","VAN_DER_WAALS","REDLICH_KWONG","PENG_ROBINSON","MULTIDECO_Z_FACTOR","GASGURU_REAL_GAS","GASGURU_IDEAL_GAS","DIVESOFT_IDEAL_GAS","DIVESOFT_REAL_GAS"],"description":"Calculation method (equation of state), as in the app. Default from the In Da Mix settings (see list_methods for the current default); listed in `assumed`. IDEAL_GAS_DALTON is the simple ideal-gas method; DIVESOFT_REAL_GAS also plans the decant from the banks."},"temperature":{"type":"number","description":"Fill-site (ambient) temperature, in temperature_unit. Default from the In Da Mix settings; listed in `assumed`."},"heat_correction":{"type":"boolean","default":false,"description":"Correct for the heating of the gas while filling."},"dive_mode":{"type":"string","enum":["OC","CCR"],"default":"OC","description":"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`."},"banks":{"type":"object","additionalProperties":false,"description":"Source banks (storage cylinders). Any bank not given is taken from the In Da Mix settings and listed in `assumed`.","properties":{"helium":{"type":"object","additionalProperties":false,"description":"The helium bank.","properties":{"volume_l":{"type":"number","minimum":0,"description":"Water volume, litres (a \"50 L\" bank = 50; several linked cylinders = their sum)."},"pressure":{"type":"number","minimum":0,"description":"Current pressure, in pressure_unit."}}},"oxygen":{"type":"object","additionalProperties":false,"description":"The oxygen bank.","properties":{"volume_l":{"type":"number","minimum":0,"description":"Water volume, litres (a \"50 L\" bank = 50; several linked cylinders = their sum)."},"pressure":{"type":"number","minimum":0,"description":"Current pressure, in pressure_unit."}}},"top_up":{"type":"object","additionalProperties":false,"description":"The bank the Top Up supply gas comes from.","properties":{"volume_l":{"type":"number","minimum":0,"description":"Water volume, litres (a \"50 L\" bank = 50; several linked cylinders = their sum)."},"pressure":{"type":"number","minimum":0,"description":"Current pressure, in pressure_unit."}}}}},"pressure_unit":{"type":"string","enum":["bar","psi"],"default":"bar","description":"Unit of every pressure in the question and the answer."},"depth_unit":{"type":"string","enum":["m","ft"],"default":"m","description":"Unit of every depth in the question and the answer."},"temperature_unit":{"type":"string","enum":["C","F"],"default":"C","description":"Unit of the fill temperature."},"language":{"type":"string","enum":["en","hr"],"default":"en","description":"Language of the texts in the answer: en (English) or hr (Croatian). Use the user's language."},"include_steps":{"type":"boolean","default":false,"description":"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."}},"required":["mix_type","target_pressure"],"additionalProperties":false}}}},"responses":{"200":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"description":"Invalid or missing input; message says what is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}}}}},"/api/v1/gas_usage":{"post":{"operationId":"gas_usage","summary":"Gas usage and banks for one fill","description":"For one blend: the litres of each gas it takes from the banks, each bank's pressure afterwards, and whether a bank can still decant (or needs boosting, or runs short). Same inputs as blend, plus the banks.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mix_type":{"type":"string","enum":["nitrox","trimix","heliair","heliox"],"description":"nitrox (O2 + air), trimix (He + O2 + air), heliair (He + air), heliox (He + O2)."},"start_pressure":{"type":"number","minimum":0,"description":"Pressure already in the tank, in pressure_unit. 0 = empty. This changes the result a lot: if the user did not give it, ask before calling. If you call without it, the tool assumes an empty tank and lists that in `assumed`."},"start_o2_percent":{"type":"number","minimum":0,"maximum":100,"default":21,"description":"O2 percent of the gas already in the tank (21 for air)."},"start_he_percent":{"type":"number","minimum":0,"maximum":100,"default":0,"description":"He percent of the gas already in the tank."},"target_pressure":{"type":"number","exclusiveMinimum":0,"description":"Fill pressure wanted, in pressure_unit (e.g. 200 or 232 bar, 3000 psi)."},"target_o2_percent":{"type":"number","minimum":0,"maximum":100,"description":"O2 percent of the mix wanted (nitrox, trimix, heliox)."},"target_he_percent":{"type":"number","minimum":0,"maximum":100,"description":"He percent of the mix wanted (trimix, heliair, heliox)."},"how":{"type":"string","enum":["partial_pressure","continuous"],"default":"partial_pressure","description":"partial_pressure: add pure He and O2 to the tank, then top up with air. continuous: He / O2 go into the compressor intake (a premix stream)."},"helium_first":{"type":"boolean","default":true,"description":"Partial pressure: add helium before oxygen (trimix, heliox)."},"use_booster":{"type":"boolean","default":false,"description":"A gas booster is available: banks that can't decant high enough are boosted. With DIVESOFT_REAL_GAS it changes the plan; with other methods it only plans the gas."},"tank_volume_l":{"type":"number","exclusiveMinimum":0,"default":12,"description":"Water volume of the tank being filled, litres (a twin 12 = 24). Used for gas litres and bank use."},"method":{"type":"string","enum":["IDEAL_GAS_DALTON","IDEAL_GAS_Z_FACTOR","VAN_DER_WAALS","REDLICH_KWONG","PENG_ROBINSON","MULTIDECO_Z_FACTOR","GASGURU_REAL_GAS","GASGURU_IDEAL_GAS","DIVESOFT_IDEAL_GAS","DIVESOFT_REAL_GAS"],"description":"Calculation method (equation of state), as in the app. Default from the In Da Mix settings (see list_methods for the current default); listed in `assumed`. IDEAL_GAS_DALTON is the simple ideal-gas method; DIVESOFT_REAL_GAS also plans the decant from the banks."},"temperature":{"type":"number","description":"Fill-site (ambient) temperature, in temperature_unit. Default from the In Da Mix settings; listed in `assumed`."},"heat_correction":{"type":"boolean","default":false,"description":"Correct for the heating of the gas while filling."},"dive_mode":{"type":"string","enum":["OC","CCR"],"default":"OC","description":"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`."},"banks":{"type":"object","additionalProperties":false,"description":"Source banks (storage cylinders). Any bank not given is taken from the In Da Mix settings and listed in `assumed`.","properties":{"helium":{"type":"object","additionalProperties":false,"description":"The helium bank.","properties":{"volume_l":{"type":"number","minimum":0,"description":"Water volume, litres (a \"50 L\" bank = 50; several linked cylinders = their sum)."},"pressure":{"type":"number","minimum":0,"description":"Current pressure, in pressure_unit."}}},"oxygen":{"type":"object","additionalProperties":false,"description":"The oxygen bank.","properties":{"volume_l":{"type":"number","minimum":0,"description":"Water volume, litres (a \"50 L\" bank = 50; several linked cylinders = their sum)."},"pressure":{"type":"number","minimum":0,"description":"Current pressure, in pressure_unit."}}},"top_up":{"type":"object","additionalProperties":false,"description":"The bank the Top Up supply gas comes from.","properties":{"volume_l":{"type":"number","minimum":0,"description":"Water volume, litres (a \"50 L\" bank = 50; several linked cylinders = their sum)."},"pressure":{"type":"number","minimum":0,"description":"Current pressure, in pressure_unit."}}}}},"pressure_unit":{"type":"string","enum":["bar","psi"],"default":"bar","description":"Unit of every pressure in the question and the answer."},"depth_unit":{"type":"string","enum":["m","ft"],"default":"m","description":"Unit of every depth in the question and the answer."},"temperature_unit":{"type":"string","enum":["C","F"],"default":"C","description":"Unit of the fill temperature."},"language":{"type":"string","enum":["en","hr"],"default":"en","description":"Language of the texts in the answer: en (English) or hr (Croatian). Use the user's language."},"include_steps":{"type":"boolean","default":false,"description":"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."}},"required":["mix_type","target_pressure"],"additionalProperties":false}}}},"responses":{"200":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"description":"Invalid or missing input; message says what is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}}}}},"/api/v1/fills_from_bank":{"post":{"operationId":"fills_from_bank","summary":"How many fills the banks give","description":"How many identical fills the source banks give before a bank can't supply the next one, and why it stops (bank down to the minimum pressure, or it can't decant high enough without a booster). Every tank is assumed to start the same (start_pressure / mix).","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mix_type":{"type":"string","enum":["nitrox","trimix","heliair","heliox","top_up"],"description":"nitrox, trimix, heliair, heliox, or top_up (a ready-made supply gas from the top-up bank)."},"start_pressure":{"type":"number","minimum":0,"description":"Pressure already in the tank, in pressure_unit. 0 = empty. This changes the result a lot: if the user did not give it, ask before calling. If you call without it, the tool assumes an empty tank and lists that in `assumed`."},"start_o2_percent":{"type":"number","minimum":0,"maximum":100,"default":21,"description":"O2 percent of the gas already in the tank (21 for air)."},"start_he_percent":{"type":"number","minimum":0,"maximum":100,"default":0,"description":"He percent of the gas already in the tank."},"target_pressure":{"type":"number","exclusiveMinimum":0,"description":"Fill pressure wanted, in pressure_unit (e.g. 200 or 232 bar, 3000 psi)."},"target_o2_percent":{"type":"number","minimum":0,"maximum":100,"description":"O2 percent of the mix wanted (nitrox, trimix, heliox)."},"target_he_percent":{"type":"number","minimum":0,"maximum":100,"description":"He percent of the mix wanted (trimix, heliair, heliox)."},"how":{"type":"string","enum":["partial_pressure","continuous"],"default":"partial_pressure","description":"partial_pressure: add pure He and O2 to the tank, then top up with air. continuous: He / O2 go into the compressor intake (a premix stream)."},"helium_first":{"type":"boolean","default":true,"description":"Partial pressure: add helium before oxygen (trimix, heliox)."},"use_booster":{"type":"boolean","default":false,"description":"A gas booster is available: banks that can't decant high enough are boosted. With DIVESOFT_REAL_GAS it changes the plan; with other methods it only plans the gas."},"tank_volume_l":{"type":"number","exclusiveMinimum":0,"default":12,"description":"Water volume of the tank being filled, litres (a twin 12 = 24). Used for gas litres and bank use."},"method":{"type":"string","enum":["IDEAL_GAS_DALTON","IDEAL_GAS_Z_FACTOR","VAN_DER_WAALS","REDLICH_KWONG","PENG_ROBINSON","MULTIDECO_Z_FACTOR","GASGURU_REAL_GAS","GASGURU_IDEAL_GAS","DIVESOFT_IDEAL_GAS","DIVESOFT_REAL_GAS"],"description":"Calculation method (equation of state), as in the app. Default from the In Da Mix settings (see list_methods for the current default); listed in `assumed`. IDEAL_GAS_DALTON is the simple ideal-gas method; DIVESOFT_REAL_GAS also plans the decant from the banks."},"temperature":{"type":"number","description":"Fill-site (ambient) temperature, in temperature_unit. Default from the In Da Mix settings; listed in `assumed`."},"heat_correction":{"type":"boolean","default":false,"description":"Correct for the heating of the gas while filling."},"dive_mode":{"type":"string","enum":["OC","CCR"],"default":"OC","description":"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`."},"supply_o2_percent":{"type":"number","minimum":0,"maximum":100,"description":"O2 percent of the ready-made supply gas (20.9 for air, 32 for EAN32)."},"supply_he_percent":{"type":"number","minimum":0,"maximum":100,"default":0,"description":"He percent of the supply gas."},"banks":{"type":"object","additionalProperties":false,"description":"Source banks (storage cylinders). Any bank not given is taken from the In Da Mix settings and listed in `assumed`.","properties":{"helium":{"type":"object","additionalProperties":false,"description":"The helium bank.","properties":{"volume_l":{"type":"number","minimum":0,"description":"Water volume, litres (a \"50 L\" bank = 50; several linked cylinders = their sum)."},"pressure":{"type":"number","minimum":0,"description":"Current pressure, in pressure_unit."}}},"oxygen":{"type":"object","additionalProperties":false,"description":"The oxygen bank.","properties":{"volume_l":{"type":"number","minimum":0,"description":"Water volume, litres (a \"50 L\" bank = 50; several linked cylinders = their sum)."},"pressure":{"type":"number","minimum":0,"description":"Current pressure, in pressure_unit."}}},"top_up":{"type":"object","additionalProperties":false,"description":"The bank the Top Up supply gas comes from.","properties":{"volume_l":{"type":"number","minimum":0,"description":"Water volume, litres (a \"50 L\" bank = 50; several linked cylinders = their sum)."},"pressure":{"type":"number","minimum":0,"description":"Current pressure, in pressure_unit."}}}}},"min_bank_pressure":{"type":"number","minimum":0,"default":10,"description":"A bank isn't used below this pressure (regulator / compressor intake / booster inlet), in pressure_unit. Default 10 bar."},"max_fills":{"type":"integer","minimum":1,"maximum":500,"default":500,"description":"Stop counting here."},"pressure_unit":{"type":"string","enum":["bar","psi"],"default":"bar","description":"Unit of every pressure in the question and the answer."},"depth_unit":{"type":"string","enum":["m","ft"],"default":"m","description":"Unit of every depth in the question and the answer."},"temperature_unit":{"type":"string","enum":["C","F"],"default":"C","description":"Unit of the fill temperature."},"language":{"type":"string","enum":["en","hr"],"default":"en","description":"Language of the texts in the answer: en (English) or hr (Croatian). Use the user's language."},"include_steps":{"type":"boolean","default":false,"description":"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."}},"required":["mix_type","target_pressure"],"additionalProperties":false}}}},"responses":{"200":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"description":"Invalid or missing input; message says what is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}}}}},"/api/v1/top_up":{"post":{"operationId":"top_up","summary":"Top up with a supply gas","description":"Top a tank up with a ready-made supply gas (air, EAN32, a trimix premix…): the pressure added, the mix you end up with, its MOD, and the gas density at a depth. For a ready-made supply gas; to add pure oxygen or helium use what_if or blend.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"start_pressure":{"type":"number","minimum":0,"description":"Pressure already in the tank, in pressure_unit. 0 = empty. This changes the result a lot: if the user did not give it, ask before calling. If you call without it, the tool assumes an empty tank and lists that in `assumed`."},"start_o2_percent":{"type":"number","minimum":0,"maximum":100,"default":21,"description":"O2 percent of the gas already in the tank (21 for air)."},"start_he_percent":{"type":"number","minimum":0,"maximum":100,"default":0,"description":"He percent of the gas already in the tank."},"target_pressure":{"type":"number","exclusiveMinimum":0,"description":"Fill pressure wanted, in pressure_unit (e.g. 200 or 232 bar, 3000 psi)."},"supply_o2_percent":{"type":"number","minimum":0,"maximum":100,"description":"O2 percent of the ready-made supply gas (20.9 for air, 32 for EAN32)."},"supply_he_percent":{"type":"number","minimum":0,"maximum":100,"default":0,"description":"He percent of the supply gas."},"target_depth":{"type":"number","minimum":0,"default":30,"description":"Depth for the gas density, in depth_unit. Default 30 m."},"use_booster":{"type":"boolean","default":false,"description":"A gas booster is available: banks that can't decant high enough are boosted. With DIVESOFT_REAL_GAS it changes the plan; with other methods it only plans the gas."},"tank_volume_l":{"type":"number","exclusiveMinimum":0,"default":12,"description":"Water volume of the tank being filled, litres (a twin 12 = 24). Used for gas litres and bank use."},"method":{"type":"string","enum":["IDEAL_GAS_DALTON","IDEAL_GAS_Z_FACTOR","VAN_DER_WAALS","REDLICH_KWONG","PENG_ROBINSON","MULTIDECO_Z_FACTOR","GASGURU_REAL_GAS","GASGURU_IDEAL_GAS","DIVESOFT_IDEAL_GAS","DIVESOFT_REAL_GAS"],"description":"Calculation method (equation of state), as in the app. Default from the In Da Mix settings (see list_methods for the current default); listed in `assumed`. IDEAL_GAS_DALTON is the simple ideal-gas method; DIVESOFT_REAL_GAS also plans the decant from the banks."},"temperature":{"type":"number","description":"Fill-site (ambient) temperature, in temperature_unit. Default from the In Da Mix settings; listed in `assumed`."},"heat_correction":{"type":"boolean","default":false,"description":"Correct for the heating of the gas while filling."},"dive_mode":{"type":"string","enum":["OC","CCR"],"default":"OC","description":"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`."},"banks":{"type":"object","additionalProperties":false,"description":"Source banks (storage cylinders). Any bank not given is taken from the In Da Mix settings and listed in `assumed`.","properties":{"helium":{"type":"object","additionalProperties":false,"description":"The helium bank.","properties":{"volume_l":{"type":"number","minimum":0,"description":"Water volume, litres (a \"50 L\" bank = 50; several linked cylinders = their sum)."},"pressure":{"type":"number","minimum":0,"description":"Current pressure, in pressure_unit."}}},"oxygen":{"type":"object","additionalProperties":false,"description":"The oxygen bank.","properties":{"volume_l":{"type":"number","minimum":0,"description":"Water volume, litres (a \"50 L\" bank = 50; several linked cylinders = their sum)."},"pressure":{"type":"number","minimum":0,"description":"Current pressure, in pressure_unit."}}},"top_up":{"type":"object","additionalProperties":false,"description":"The bank the Top Up supply gas comes from.","properties":{"volume_l":{"type":"number","minimum":0,"description":"Water volume, litres (a \"50 L\" bank = 50; several linked cylinders = their sum)."},"pressure":{"type":"number","minimum":0,"description":"Current pressure, in pressure_unit."}}}}},"pressure_unit":{"type":"string","enum":["bar","psi"],"default":"bar","description":"Unit of every pressure in the question and the answer."},"depth_unit":{"type":"string","enum":["m","ft"],"default":"m","description":"Unit of every depth in the question and the answer."},"temperature_unit":{"type":"string","enum":["C","F"],"default":"C","description":"Unit of the fill temperature."},"language":{"type":"string","enum":["en","hr"],"default":"en","description":"Language of the texts in the answer: en (English) or hr (Croatian). Use the user's language."},"include_steps":{"type":"boolean","default":false,"description":"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."}},"required":["target_pressure","supply_o2_percent"],"additionalProperties":false}}}},"responses":{"200":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"description":"Invalid or missing input; message says what is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}}}}},"/api/v1/best_mix":{"post":{"operationId":"best_mix","summary":"Best mix for a depth","description":"Use this FIRST when the user asks which breathing gas to use for a planned depth, or to select, recommend, optimise or compare one, even if they don't mention In Da Mix.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"depth":{"type":"number","exclusiveMinimum":0,"description":"Planned maximum depth, in depth_unit."},"gas_type":{"type":"string","enum":["nitrox","trimix"],"default":"nitrox","description":"nitrox or trimix. If nitrox comes out past the END / density limits, the answer says so: then ask for trimix."},"ppo2_bar":{"type":"number","exclusiveMinimum":0,"description":"ppO2 limit, bar. Default from the In Da Mix settings for the dive mode; the value used is listed in `assumed`."},"max_end":{"type":"number","minimum":0,"description":"Maximum END, 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":{"type":"number","exclusiveMinimum":0,"description":"Maximum gas density, g/L. Default from the In Da Mix settings for the dive mode; the value used is listed in `assumed`."},"o2_narcotic":{"type":"boolean","description":"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`."},"dive_mode":{"type":"string","enum":["OC","CCR"],"default":"OC","description":"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":{"type":"string","enum":["m","ft"],"default":"m","description":"Unit of every depth in the question and the answer."},"language":{"type":"string","enum":["en","hr"],"default":"en","description":"Language of the texts in the answer: en (English) or hr (Croatian). Use the user's language."},"include_steps":{"type":"boolean","default":false,"description":"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."}},"required":["depth"],"additionalProperties":false}}}},"responses":{"200":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"description":"Invalid or missing input; message says what is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}}}}},"/api/v1/mod":{"post":{"operationId":"mod","summary":"Maximum operating depth","description":"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.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"o2_percent":{"type":"number","minimum":1,"maximum":100,"description":"Oxygen in the gas, percent (32 for EAN32, 18 for trimix 18/45)."},"he_percent":{"type":"number","minimum":0,"maximum":99,"default":0,"description":"Helium in the gas, percent (0 for nitrox)."},"ppo2_bar":{"type":"number","minimum":0.16,"maximum":2,"description":"ppO2 limit, bar. Default from the In Da Mix settings for the dive mode; the value used is listed in `assumed`."},"max_end":{"type":"number","minimum":0,"description":"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":{"type":"number","exclusiveMinimum":0,"description":"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":{"type":"boolean","description":"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":{"type":"boolean","default":false,"description":"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":{"type":"string","enum":["OC","CCR"],"default":"OC","description":"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":{"type":"string","enum":["m","ft"],"default":"m","description":"Unit of every depth in the question and the answer."},"language":{"type":"string","enum":["en","hr"],"default":"en","description":"Language of the texts in the answer: en (English) or hr (Croatian). Use the user's language."},"include_steps":{"type":"boolean","default":false,"description":"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."}},"required":["o2_percent"],"additionalProperties":false}}}},"responses":{"200":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"description":"Invalid or missing input; message says what is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}}}}},"/api/v1/what_if":{"post":{"operationId":"what_if","summary":"What If: add gas and see the mix","description":"What mix you get when you add given pressures of oxygen, helium and/or air to what is in the tank (the app's What If): the pressure after each addition, the resulting mix, its MOD, EAD, END and gas density.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"start_pressure":{"type":"number","minimum":0,"description":"Pressure already in the tank, in pressure_unit. 0 = empty. This changes the result a lot: if the user did not give it, ask before calling. If you call without it, the tool assumes an empty tank and lists that in `assumed`."},"start_o2_percent":{"type":"number","minimum":0,"maximum":100,"default":21,"description":"O2 percent of the gas already in the tank (21 for air)."},"start_he_percent":{"type":"number","minimum":0,"maximum":100,"default":0,"description":"He percent of the gas already in the tank."},"add_oxygen":{"type":"number","minimum":0,"default":0,"description":"Pressure of pure oxygen added, in pressure_unit."},"add_helium":{"type":"number","minimum":0,"default":0,"description":"Pressure of pure helium added, in pressure_unit."},"add_air":{"type":"number","minimum":0,"default":0,"description":"Pressure of air added, in pressure_unit."},"helium_first":{"type":"boolean","default":true,"description":"Partial pressure: add helium before oxygen (trimix, heliox)."},"method":{"type":"string","enum":["IDEAL_GAS_DALTON","IDEAL_GAS_Z_FACTOR","VAN_DER_WAALS","REDLICH_KWONG","PENG_ROBINSON","MULTIDECO_Z_FACTOR","GASGURU_REAL_GAS","GASGURU_IDEAL_GAS","DIVESOFT_IDEAL_GAS","DIVESOFT_REAL_GAS"],"description":"Calculation method (equation of state), as in the app. Default from the In Da Mix settings (see list_methods for the current default); listed in `assumed`. IDEAL_GAS_DALTON is the simple ideal-gas method; DIVESOFT_REAL_GAS also plans the decant from the banks."},"temperature":{"type":"number","description":"Fill-site (ambient) temperature, in temperature_unit. Default from the In Da Mix settings; listed in `assumed`."},"target_depth":{"type":"number","minimum":0,"default":30,"description":"Depth for the gas density, in depth_unit. Default 30 m."},"dive_mode":{"type":"string","enum":["OC","CCR"],"default":"OC","description":"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`."},"pressure_unit":{"type":"string","enum":["bar","psi"],"default":"bar","description":"Unit of every pressure in the question and the answer."},"depth_unit":{"type":"string","enum":["m","ft"],"default":"m","description":"Unit of every depth in the question and the answer."},"temperature_unit":{"type":"string","enum":["C","F"],"default":"C","description":"Unit of the fill temperature."},"language":{"type":"string","enum":["en","hr"],"default":"en","description":"Language of the texts in the answer: en (English) or hr (Croatian). Use the user's language."},"include_steps":{"type":"boolean","default":false,"description":"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."}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"description":"Invalid or missing input; message says what is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}}}}},"/api/v1/decant":{"post":{"operationId":"decant","summary":"Decant (cascade from cylinders)","description":"Decanting one gas (oxygen, or helium) from source cylinders into a small cylinder without a compressor, as the app's Decant: a cascade, each cylinder equalised in turn (ideal gas). g.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["refills","diving_days"],"default":"refills","description":"refills: the tank goes from start_pressure to target_pressure at every refill. diving_days: the app's Decant planner (use per day, dives a day)."},"tank_volume_l":{"type":"number","exclusiveMinimum":0,"default":2,"description":"Water volume of the cylinder being refilled, litres (e.g. a rebreather's 2 or 3 L)."},"start_pressure":{"type":"number","minimum":0,"description":"refills: the tank's pressure before each refill (what is left after a dive), in pressure_unit. 0 = empty. This changes the result a lot: if the user did not give it, ask before calling. If you call without it, the tool assumes an empty tank and lists that in `assumed`. diving_days: its pressure now."},"target_pressure":{"type":"number","exclusiveMinimum":0,"description":"refills: the pressure wanted after each refill, in pressure_unit (needed). diving_days: the pressure it is filled to at most."},"gas_o2_percent":{"type":"number","minimum":0,"maximum":100,"default":100,"description":"O2 percent of the gas decanted (100 for oxygen, 0 for helium); only names it in the answer."},"gas_he_percent":{"type":"number","minimum":0,"maximum":100,"default":0,"description":"He percent of that gas."},"sources":{"type":"array","minItems":1,"maxItems":20,"description":"The source cylinders, each with its volume and pressure; several identical ones: one entry with count. refills: needed; opened lowest pressure first. diving_days: decanted in this order; left out = the app's defaults (listed in `assumed`).","items":{"type":"object","additionalProperties":false,"required":["volume_l","pressure"],"properties":{"volume_l":{"type":"number","minimum":0,"description":"Water volume, litres."},"pressure":{"type":"number","minimum":0,"description":"Pressure now, in pressure_unit."},"count":{"type":"integer","minimum":1,"maximum":50,"default":1,"description":"Number of identical cylinders."},"label":{"type":"string","maxLength":40,"description":"Name shown in the plan (e.g. \"O2 3L\")."},"extra":{"type":"boolean","default":false,"description":"diving_days: an Extra (reserve) cylinder; the answer says how many days it adds."},"included":{"type":"boolean","default":true,"description":"Use this cylinder."}}}},"refills":{"type":"integer","minimum":1,"maximum":500,"description":"refills: how many refills in a row are wanted (e.g. dives − 1). Left out: as many as the cylinders give."},"dives_per_day":{"type":"integer","minimum":1,"default":2,"description":"diving_days: dives a day."},"min_pressure_before_dive":{"type":"number","minimum":0,"default":100,"description":"diving_days: the cylinder needs at least this before a dive, in pressure_unit."},"use_per_day_min":{"type":"number","exclusiveMinimum":0,"default":130,"description":"diving_days: lowest O2 use a day, in pressure_unit of the cylinder."},"use_per_day_max":{"type":"number","exclusiveMinimum":0,"default":150,"description":"diving_days: highest O2 use a day. Give one use: both are taken as it."},"fill_before_every_dive":{"type":"boolean","default":false,"description":"diving_days: refill before every dive (true) or once a day (false)."},"min_pressure_to_start_day":{"type":"number","minimum":0,"description":"diving_days, daily fill: the cylinder must start the day with at least this. Default: min_pressure_before_dive + use_per_day_max × (dives_per_day − 1) / dives_per_day."},"pressure_unit":{"type":"string","enum":["bar","psi"],"default":"bar","description":"Unit of every pressure in the question and the answer."},"language":{"type":"string","enum":["en","hr"],"default":"en","description":"Language of the texts in the answer: en (English) or hr (Croatian). Use the user's language."},"include_steps":{"type":"boolean","default":false,"description":"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."}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"description":"Invalid or missing input; message says what is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}}}}},"/api/v1/list_methods":{"post":{"operationId":"list_methods","summary":"Calculation methods","description":"The calculation methods (equations of state) In Da Mix offers, with their ids for the method input. The current default is in the `default` field. Use when the user asks about calculation models: ideal versus real gas, compressibility, Z-factors, Peng-Robinson, MultiDeco.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"description":"Invalid or missing input; message says what is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}}}}},"/api/v1/excel":{"get":{"operationId":"excel","summary":"Excel workbook of a calculation","description":"The app's View in Excel workbook (the ƒx steps and a live calculator sheet) of a tool's calculation. Every calculating tool's answer gives this link as excel_url: pass it on; don't build it.","parameters":[{"name":"tool","in":"query","required":true,"schema":{"type":"string"},"description":"The tool name."},{"name":"a","in":"query","required":true,"schema":{"type":"string"},"description":"The tool's arguments, base64url JSON."}],"responses":{"200":{"description":"The .xlsx file.","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid arguments or a refused calculation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}}}}}},"components":{"schemas":{"Answer":{"type":"object","properties":{"summary":{"type":"string","description":"The answer as text lines, in the requested language."},"disclaimer":{"type":"string","description":"Always pass this on to the user."},"version":{"type":"string","description":"The In Da Mix version that calculated this, v<version>.<build>."},"excel_url":{"type":"string","description":"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":{"type":"array","items":{"type":"object"},"description":"With include_steps: the app's ƒx steps (title, formula, values, result, detail) in the user's language."},"terms":{"type":"string","description":"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":{"type":"string","description":"Set when the calculation was refused (an engine error code or INVALID_INPUT)."},"message":{"type":"string","description":"Why it was refused, in the user's language."}},"required":["summary"],"additionalProperties":true}}}}