Power-to-gas technology has been proposed as one component for future energy systems facing decarbonization targets. This paper presents a power-to-gas focused open optimization model for studying cost efficient design and operation of future urban energy system. The model is able to distinguish the benefits of different configurations of power-to-gas by modelling several energy vectors, including electricity, heating, and cooling alongside with different plant components.The usefulness of the built multi-vector model is illustrated by a case study where the benefits of power-to-gas are studied in the context of a medium-sized Nordic city. The results show that the city is able to reach carbon neutrality with the help of power-to-gas. Power-to-gas provides cost savings by reducing the need of heat storages and transmission capacity. The savings are greatest when the emission reduction goal is high and transmission capacity expansion is expensive. Direct air capture appears as the superior carbon dioxide source when compared to post combustion capture from flue gases due to costs and annual availability. The case study shows no economic benefit for distributed power-to-gas.