Afamelanotide is the only drug in this family approved as a medicine. It was developed from the research compound once called melanotan I, but it is a very different thing from the "melanotan" sold online.
On October 8, 2019, the US FDA approved Scenesse (afamelanotide) implant to increase pain-free light exposure in adults with a history of phototoxic reactions from erythropoietic protoporphyria (EPP), a rare genetic disorder that makes light exposure extremely painful (FDA approval package, NDA 210797). It had been approved in Europe in December 2014 (Clinuvel announcement).
Approval was based on randomized, double-blind, placebo-controlled trials. In the New England Journal of Medicine, researchers reported two multicenter trials with 74 patients in the EU and 94 in the US, comparing afamelanotide implants with placebo implants and tracking sun exposure, painful reactions and adverse events (Langendonk et al., 2015 (PubMed 26132941)). A later review summarizes its role in preventing phototoxicity in EPP (2021 review in Expert Review of Clinical Pharmacology (PubMed 33507118)).
Related: What is melanotan?