The production of pi+, pi-, K+, K-, p, and pbar at mid-rapidity has been measured in proton-proton collisions at sqrt(s) = 900 GeV with the ALICE detector. Particle identification is performed using the specific energy loss in the inner tracking silicon detector and the time projection chamber. In addition, time-of-flight information is used to identify hadrons at higher momenta. Finally, the distinctive kink topology of the weak decay of charged kaons is used for an alternative measurement of the kaon transverse momentum (pt) spectra. Since these various particle identification tools give the best separation capabilities over different momentum ranges, the results are combined to extract spectra from pt = 100 MeV/c to 2.5 GeV/c. The measured spectra are further compared with QCD-inspired models which yield a poor description. The total yields and the mean pt are compared with previous measurements, and the trends as a function of collision energy are discussed.