A respiratory apparatus that provides a nasal high flow of gases to a patient via a non-sealed nasal cannula, the respiratory apparatus comprising: a flow generator configured to mix oxygen and ambient air to generate a gases flow to be delivered to the patient, comprising a mixture of the oxygen and the ambient air with an oxygen content (FdO2); a supplementary gas inlet valve configured to control a flow of oxygen to be supplied to the flow generator to control the oxygen content (FdO2) of the gases flow; and a controller configured to control at least the supplementary gas inlet valve and the flow generator to control delivery of gases to the patient using closed loop control, wherein the controller is configured to: receive patient parameter data indicative of oxygen saturation (SpO2) of the patient from at least one sensor ; wherein the at least one sensor is a pulse oximeter; execute a control phase, wherein operation of the respiratory apparatus during a therapy session is based at least in part on the patient parameter data; and a gases composition sensor configured to determine at least oxygen content (FdO2) of gases flow during operation of the respiratory apparatus ; characterised in that the closed loop control includes a first control loop configured to determine a target fraction of delivered oxygen (FdO2) based at least in part on a target SpO2 and measured SpO2, wherein the target FdO2 is determined further based at least in part on a measured FdO2 and/or wherein the target FdO2 is determined further based at least in part on a previous target FdO2; and in that the gases composition sensor is an ultrasonic sensor system. a flow generator configured to mix oxygen and ambient air to generate a gases flow to be delivered to the patient, comprising a mixture of the oxygen and the ambient air with an oxygen content (FdO2); a supplementary gas inlet valve configured to control a flow of oxygen to be supplied to the flow generator to control the oxygen content (FdO2) of the gases flow; and a controller configured to control at least the supplementary gas inlet valve and the flow generator to control delivery of gases to the patient using closed loop control, wherein the controller is configured to: receive patient parameter data indicative of oxygen saturation (SpO2) of the patient from at least one sensor ; wherein the at least one sensor is a pulse oximeter; execute a control phase, wherein operation of the respiratory apparatus during a therapy session is based at least in part on the patient parameter data; and receive patient parameter data indicative of oxygen saturation (SpO2) of the patient from at least one sensor ; wherein the at least one sensor is a pulse oximeter; execute a control phase, wherein operation of the respiratory apparatus during a therapy session is based at least in part on the patient parameter data; and a gases composition sensor configured to determine at least oxygen content (FdO2) of gases flow during operation of the respiratory apparatus ; characterised in that the closed loop control includes a first control loop configured to determine a target fraction of delivered oxygen (FdO2) based at least in part on a target SpO2 and measured SpO2, wherein the target FdO2 is determined further based at least in part on a measured FdO2 and/or wherein the target FdO2 is determined further based at least in part on a previous target FdO2; and in that the gases composition sensor is an ultrasonic sensor system. <EOS>