The metabolic processes that consumes energy and involve the synthesis of larger, complex molecules from simpler ones.