Method for producing a gas sensor apparatus for detecting at least one gaseous analyte in a measurement medium, wherein the method comprises the following steps: processing a first semiconductor substrate and a second semiconductor substrate using at least one separating process and at least one coating process in order to produce cutout sections (231, 232, 233, 234, 235, 236, 237, 238, 239), solid-electrolyte layers (221A, 222A, 223A) and electrodes (221B, 221C, 222B, 222C, 223B, 223C) in the first semiconductor substrate and the second semiconductor substrate, wherein in the step of processing at the first semiconductor substrate and/or at the second semiconductor substrate there are produced a setting device having a first solid-electrolyte layer between a first electrode pair (221B, 221C) for setting a gas composition of the measurement medium with regard to an accompanying gas, a determining device having a second solid-electrolyte layer between a second electrode pair (222B, 222C) for determining a content of the accompanying gas in the measurement medium, and a detection device having a third solid-electrolyte layer between a third electrode pair (223B, 223C) for detecting the gaseous analyte, wherein the determining device, the setting device and the detection device are arranged in a manner electrically isolated from one another, such that in a joined-together state of the first semiconductor substrate and the second semiconductor substrate, the determining device and the setting device are shaped as wall sections of a setting chamber and the detection device is shaped as a wall section of a detection chamber; and joining together the first semiconductor substrate and the second semiconductor substrate in order to produce between the first semiconductor substrate and the second semiconductor substrate the setting chamber for setting a gas composition of the measurement medium, the detection chamber for detecting the gaseous analyte and a diffusion section for controlling a diffusion of the measurement medium between the setting chamber and the detection chamber. processing a first semiconductor substrate and a second semiconductor substrate using at least one separating process and at least one coating process in order to produce cutout sections (231, 232, 233, 234, 235, 236, 237, 238, 239), solid-electrolyte layers (221A, 222A, 223A) and electrodes (221B, 221C, 222B, 222C, 223B, 223C) in the first semiconductor substrate and the second semiconductor substrate, wherein in the step of processing at the first semiconductor substrate and/or at the second semiconductor substrate there are produced a setting device having a first solid-electrolyte layer between a first electrode pair (221B, 221C) for setting a gas composition of the measurement medium with regard to an accompanying gas, a determining device having a second solid-electrolyte layer between a second electrode pair (222B, 222C) for determining a content of the accompanying gas in the measurement medium, and a detection device having a third solid-electrolyte layer between a third electrode pair (223B, 223C) for detecting the gaseous analyte, wherein the determining device, the setting device and the detection device are arranged in a manner electrically isolated from one another, such that in a joined-together state of the first semiconductor substrate and the second semiconductor substrate, the determining device and the setting device are shaped as wall sections of a setting chamber and the detection device is shaped as a wall section of a detection chamber; and joining together the first semiconductor substrate and the second semiconductor substrate in order to produce between the first semiconductor substrate and the second semiconductor substrate the setting chamber for setting a gas composition of the measurement medium, the detection chamber for detecting the gaseous analyte and a diffusion section for controlling a diffusion of the measurement medium between the setting chamber and the detection chamber.