In situ mass spectral measurements of gas composition at the substrate surface were made during filament‐assisted diamond growth. The input gases were various mixtures of CH4, O2, and H2 chosen in order to discern the effects of oxygen addition on diamond formation and growth. The gas phase chemistry was modeled as a one‐dimensional flow reactor, and the measured and calculated species mole fractions were in good agreement. The model was then used to estimate mole fractions of several atomic and radical species which could not be measured. We find that addition of O2 has only a small effect on the radical mole fractions. However, O2 can reduce the effective initial hydrocarbon mole fraction, which is important because higher quality diamond is grown at a lower initial hydrocarbon mole fraction. Most important, perhaps is that O2 addition leads to the formation of sufficient gas phase OH to remove nondiamond (pyrolytic) carbon from the film. Thus, O2 addition allows diamond films to be grown under composition and temperature conditions which otherwise would produce largely nondiamond carbon.