The ketogenic diet is an effective treatment for drug-resistant epilepsy, but the therapeutic mechanisms are poorly understood. Although ketones are able to fuel the brain, it is not known whether ketones are directly metabolized by neurons on a time scale sufficiently rapid to fuel the bioenergetic demands of sustained synaptic transmission. Here, we show that nerve terminals can use the ketone β-hydroxybutyrate in a cell- autonomous fashion to support neurotransmission in both excitatory and inhibitory nerve terminals and that this flexibility relies on Ca2+ dependent upregulation of mitochondrial metabolism. Using a genetically encoded ATP sensor, we show that inhibitory axons fueled by ketones sustain much higher ATP levels under steady state conditions than excitatory axons, but that the kinetics of ATP production following activity are slower when using ketones as fuel compared to lactate/pyruvate for both excitatory and inhibitory neurons.