Context. LB-1 (alias ALS 8775) has variously been proposed as either an X-ray dim B-type star plus black hole (B+BH) binary, or a Be star plus an inflated stripped star (Be+Bstr) binary. The latter hypothesis hinges on detection and characterization of the hidden broad-lined star in a composite optical spectrum. Aims. We aim at testing the published B+BH (single star) and Be+Bstr (binary star) models using a flux-calibrated UV-optical-IR spectrum. Methods. The Space Telescope Imaging Spectrograph (STIS) on board the Hubble Space Telescope (HST) is used to obtain a fluxcalibrated spectrum with an accuracy of ∼1%. These data are compared with non-LTE spectral energy distributions (SED) and line profiles for the proposed models. The Hubble data, together with the Gaia EDR3 parallax and well-determined extinction, are used to provide tight constraints on the properties and stellar luminosities of the LB-1 system. In the case of the Be+Bstr model we adopt the published flux ratio for the Be and Bstr stars, re-determine the T eff of the Bstr using the silicon ionization balance, and infer T eff for the Be star from the fit to the SED. Results. The UV data strongly constrain the microturbulence velocity to 2 km s −1 for the stellar components of both models. We also find stellar parameters consistent with previous results, but with greater precision enabled by the Hubble SED. For the B+BH single-star model we find parameters (T eff , log(L/L ), M spec /M ) of the B-type star to be (15 300±300 K, 3.23 +0.09 −0.10 , 5.2 +1.8 −1.4 ). For the Bstr star we obtain (12 500±100 K, 2.70 +0.09 −0.09 , 0.8 +0.5 −0.3 ), and for the Be star (18 900±200 K, 3.04 +0.09 −0.09 , 3.4 +3.5 −1.8 ). While the Be+Bstr model is a better fit to the He i lines and cores of the Balmer lines in the optical, the B+BH model provides a better fit to the Si iv resonance lines in the UV. The analysis also implies that the Bstr star has roughly twice solar silicon abundance, difficult to reconcile with a stripped star origin. The Be star on the other hand has a rather low luminosity, and a spectroscopic mass inconsistent with its possible dynamical mass. Conclusions. Tight constraints are provided for the stellar luminosities of the Be+Bstr and B+BH models. For the former, the Bstr star appears to be silicon rich, while the notional Be star appears to be sub-luminous for a classical Be star of its temperature, and the predicted UV spectrum is inconsistent with the data. This latter issue can be significantly improved by reducing the T eff and radius of the Be star, though at the expense of leading to a different mass ratio. In the B+BH model, the single B-type spectrum is a good match to the UV spectrum. Adopting a mass ratio of 5.1 ± 0.1 (Liu et al. 2020) implies a BH mass of ∼ 21 +9 −8 M .