50 Shades of Grey, which started out as Twilight-inspired fan fiction, raised a few copyright questions that didn’t stop it from selling millions and millions of copies. But when a work is more directly based on another author’s creation — using the same characters and setting, for instance — the legal hurdles can be greater.

That doesn’t stop readers from writing their own spinoffs anyway: The largest fan fiction site, FanFiction.net, hosts millions of free stories. And in works like these — and the passionate readers who create them — Amazon sees the potential for profit.

On Wednesday, Amazon Publishing announced Kindle Worlds, “the first commercial publishing platform that will enable any writer to create fan fiction based on a range of original stories and characters and earn royalties for doing so.” The company is making this work by securing licenses from existing entertainment properties and by paying royalties to both the original author and the fan fiction author.

So far, Kindle Worlds has licenses for three Alloy Entertainment properties: Gossip Girl, Pretty Little Liars and Vampire Diaries. Writers can publish “authorized stories” inspired by these properties and sell them in the Kindle Store; Amazon says it will add more licenses soon, in areas like “books, games, TV, movies and music.”

The fan fiction authors get a royalty of 35 percent for works of at least 10,000 words, and a royalty of 20 percent on works between 5,000 and 10,000 words. Amazon is also paying royalties to the original authors of the properties, but would not disclose that royalty rate.

Kindle Worlds is not a self-publishing platform like KDP. First of all, any works published through Kindle Worlds are published by Amazon Publishing — they’re not self-published, so the author doesn’t retain print or digital rights and doesn’t set the work’s price. The website notes that “Amazon Publishing will acquire all rights to your new stories, including global publication rights, for the term of copyright.” Second, Kindle Worlds won’t publish all of the works submitted to it; it will only accept some (though the company says it aims to accept as many as possible, as long as they adhere to content guidelines). Finally, “Amazon Publishing will set the price for Kindle Worlds stories. Most will be priced from $0.99 through $3.99.”

Kindle Worlds will officially launch in June with “over 50 commissioned works” from authors like Barbara Freethy, John Everson and Colleen Thompson. At that time, readers can also start submitting works to Kindle Worlds.