The object of study was pasta obtained as a result of 3D printing. This research was aimed to the application of the drying process as a tool to improve pasta 3D printing quality. The purpose of this study was to assess the influence of the drying process operating parameters and to find their optimal values to ensure the quality of pasta obtained by 3D printing. Hot air and infrared drying was used to heat the extruded product locally. The response surface methodology was applied for the drying process optimization. Heating power, processing time and distance from the heating source were chosen as the main variables influencing the drying process. The maximum product weight loss combined with the maximum temperature below 100 °C during the entire processing time constituted an optimization challenge. The use of infrared drying was advantageous when processing a layer of pasta dough several millimeters thick and resulted in a drier and harder surface. With a processing time of 1.5 min, the heating power was 2 units, and the distance from the support to the heating source was 1.77 cm. The noted values of the independent variables for the response function can be considered optimal.