In World War I, the Central Powers were doomed when the United States entered the war, bringing limitless funds and soldiers to the Allied Powers. Austria and Germany, racked inside with civilian unrest, could not hope to defeat America as well.
The British blockade of the Central Powers had caused severe internal damage, starving them of supplies and food. The American military put enormous pressure on the southern front that led to the surrender of Bulgaria. With tens of thousands of new soldiers and their equipment being shipped in to relieve and reinforce the weakened Allied troops, the Central Powers had no option left but surrender.
In addition, Woodrow Wilson's "Fourteen Points of Light" speech convinced the Central Powers that America would help forge peace, not surrender. Unfortunately, during the Paris Conference the original Allied Powers made it clear their aim was to punish Germany, not befriend it.