Methanation of both CO and CO2 with electrolysis-sourced hydrogen is a key step in power-to-gas technologies with nickel as the most prominent catalyst. Here, a detailed, thermodynamically consistent reaction mechanism for the methanation reactions of CO and CO2 over Ni-based catalysts is presented. This microkinetic model is based on the mean-field approximation and comprises 42 reactions among 19 species. The model was developed based on experiments from a number of studies in powder and monolith catalysts. These are numerically reproduced by flow field simulations coupled with the kinetic scheme. The reaction mechanism features multiple paths for the conversion of CO and CO2 into CH4, including a carbide pathway and direct hydrogenation of CO2 on the surface. The model developed describes the methanation process adequately over a wide range of temperatures, catalyst loadings, support materials, and reactant ratios. Hence, it can serve as a microkinetic basis for reaction engineering and up-scaling purposes