By default the babl API is assuming data to be (unbounded) sRGB data, data being sRGB defines the conversion to and from gray-scale as well as the gamma - or Transfer Response Curve, TRC, used for converting between linear and non-linear variants of the data.
babl has API for creating a format for a specific space: babl_format_with_space("R'G'B' u16", babl_space ("Rec2020")) creates a 16 bit integer format for the Rec2020 color space. Babl knows internally about "sRGB", "Rec2020", "Adobe", "Apple" and "ProPhoto" spaces, as they are defined with constants on their wikipedia pages.
Additional spaces can be loaded from monitor-class matrix+TRC ICC v2 and v4 profiles. Using babl_icc_make_space (see babl.h for details). The space of a babl format can also be queried with babl_format_get_space.
The conversions babl does with ICC profiles are according to what is known as the relative-colorimetric intent, monitor profiles containing both the matrices used by babl and 3d CLUTs (color look up tables) sometimes also do relative-colorimetric transfer for the "perceptual" intent CLUTs, but with a more flexible and possibly higher accuracy conversions.
Handling of CMYK is in a separate document.