A popular hypothesis regarding legged locomotion is that humans and other large animals walk and run in a manner that minimizes the metabolic energy expenditure for locomotion. Here, using numerical optimization and supporting analytical arguments, I obtain the energy-minimizing gaits of many different simple biped models. I consider bipeds with point-mass bodies and massless legs, with or without a knee, with or without a springy tendon in series with the leg muscle and minimizing one of many different 'metabolic cost' models-correlated with muscle work, muscle force raised to some power, the Minetti-Alexander quasi-steady approximation to empirical muscle metabolic rate (from heat and ATPase activity), a new cost function called the 'generalized work cost' C(g) having some positivity and convexity properties (and includes the Minetti-Alexander cost and the work cost as special cases), and generalizations thereof. For many of these models, walking-like gaits are optimal at low speeds and running-like gaits at higher speeds, so a gait transition is optimal. Minimizing the generalized work cost C(g) appears mostly indistinguishable from minimizing muscle work for all the models. Inverted pendulum walking and impulsive running gaits minimize the work cost, generalized work costs C(g) and a few other costs for the springless bipeds; in particular, a knee-torque-squared cost, appropriate as a simplified model for electric motor power for a kneed robot biped. Many optimal gaits had symmetry properties; for instance, the left stance phase was identical to the right stance phases. Muscle force-velocity relations and legs with masses have predictable qualitative effects, if any, on the optima. For bipeds with compliant tendons, the muscle work-minimizing strategies have close to zero muscle work (isometric muscles), with the springs performing all the leg work. These zero work gaits also minimize the generalized work costs C(g) with substantial additive force or force rate costs, indicating that a running animal's metabolic cost could be dominated by the cost of producing isometric force, even though performing muscle work is usually expensive. I also catalogue the many differences between the optimal gaits of the various models. These differences contain information that might help us develop models that better predict locomotion data. In particular, for some biologically plausible cost functions, the presence or absence of springs in series with muscles has a large effect on both the coordination strategy and the absolute cost; the absence of springs results in more impulsive (collisional) optimal gaits and the presence of springs leads to more compliant optimal gaits. Most results are obtained for specific speed and stride length combinations close to preferred human behaviour, but limited numerical experiments show that some qualitative results extend to other speed-stride length combinations as well.