YouTube is launching a long-anticipated music subscription service next week. The service, called "YouTube Music Key," will cost $9.99 a month for ad-free music, plus music videos, and the ability to listen offline as well as online. It's starting as an invite-only beta service: People who are invited are offered 6 months free, followed by a promotional lifetime price of $7.99 per month.

YouTube Music Key subscribers will also get access to Google Play Music, which also costs $9.99 and has access to 30 million songs, so this is effectively an extra free service for those Google Play Music subscribers. Now subscribers will get access to many more music videos—a natural area of strength for YouTube. The company is also rolling out a recommendation service based on your habits listening across both Google Play and YouTube Music Key.

Read MoreSpotify to Swift: 'We work day and night for artists'

YouTube is jumping into a crowded space, going head-to-head with Apple's iTunes and Beats music, Spotify, Amazon's Prime Music service, among others. The company has the advantage of its massive built-in audience for music videos in particular: It's a go-to destination for people looking for a song. The challenge: People are used to YouTube being free—will they want to play?

Read MoreIn Europe, Spotify revenue beats iTunes

Correction: An earlier version of this story misstated the promotional lifetime price of $7.99 per month.