Aims. Observations of the Sun with the Atacama Large Millimeter Array have now started, and the thermal infrared will regularly be accessible from the NSF's Daniel K. Inouye Solar Telescope. Motivated by the prospect of these new data, and by recent flare observations in the mid infrared, we set out here to model and understand the source of the infrared continuum in flares, and to explore its diagnostic capability for the physical conditions in the flare atmosphere. Methods. We use the one-dimensional (1D) radiation hydrodynamics code RADYN to calculate mid-infrared continuum emission from model atmospheres undergoing sudden deposition of energy by non-thermal electrons. Results. We identify and characterise the main continuum thermal emission processes relevant to flare intensity enhancement in the mid-to far-infrared (2-200 µm) spectral range as free-free emission on neutrals and ions. We find that the infrared intensity evolution tracks the energy input to within a second, albeit with a lingering intensity enhancement, and provides a very direct indication of the evolution of the atmospheric ionisation. The prediction of highly impulsive emission means that, on these timescales, the atmospheric hydrodynamics need not be considered in analysing the mid-IR signatures.