The conversion of carbon dioxide into carbohydrates - the process of photosynthesis as carried out by plants - is an uphill thermodynamic process, with the energy provided by the sun. Reduction of CO2 is not necessarily uphill, however - it all depends on what the reducing agent is. The reduction of CO2 to methane by hydrogen gas (H2), for example, is a thermodynamically downhill process, because H2 is a such a powerful reducing agent.
CO2 + 4H2 → CH4 + 2H2O + energy
Many microbes use this fascinating redox process, called 'methanogenesis', to obtain energy in environments, such as in our large intestines or deep on the ocean floor, that are lacking in both oxygen and sunlight. When you see bubbles of 'swamp gas' (methane) rising from the mud of ponds and rivers, you are looking at the result of methanogenesis. Of course, methanogenesis, like the oxidation of glucose in animals, is not a simple, one-step reaction. It is accomplished by a series of many enzymatic steps, and involves the participation of several unique coenzymes (see FEMS Microbiol. Rev. 1999, 23, 13 for a detailed review of the enzymatic reactions of methanogenesis).