Gases such as biogas or synthesis gas are used as substrates to produce basic chemicals or biopolymers such as polyhydroxy fatty acids. In the utilization of biogas (mixture of methane and CO2) methanotrophic, i.e. aerobic microorganisms are used, in the utilization of synthesis gas (mixture of CO and H2) anaerobic bacteria are used.