How can I add support for Apple Music lyrics sharing in my app?

I noticed that Instagram and iMessage support receiving shared lyrics from Apple Music. Specifically, when users long-press lyrics, a sheet pops up showing iMessage and Instagram. Clicking on either app generates a beautifully formatted lyrics image.

I've looked through MusicKit documentation but couldn't find any related APIs. How can I implement this functionality in my app?

Not only can you access the lyrics, but you can also retrieve the song information.

How can I add support for Apple Music lyrics sharing in my app?
 
 
Q