Create personalized karaoke track of your favorite songs

   contact@myra.io

HomeBlogSubscriptionMyra API Reference – Intro Plan Subscription

Myra API Reference – Intro Plan Subscription

Intro Plan Description

Intro Plan gives you an option to let your users generate karaoke tracks in real time. It unlocks “Vocal remover” feature for your users. Plus it also gives you early bird access to all the upcoming beta features of myra.io. You can let your users generate karaoke from YouTube video urls or letting your users upload a local audio file. In this guide we will provide instructions for both the scenarios.

To see the options in action you visit myra.io and use the UI as reference when creating your own UI. Our tech works best for newer songs. Generally speaking songs that are recorded after year 2015. Please make sure to let your users know about it on your platform.

Here are list of features that the Intro Plan unlocks.

  • Remove Vocals from YouTube video URLs
  • Remove Vocals by uploading a local audio file of the song

Step 1: Get your API Key

  1. Visit myra.io/choose-a-plan and choose a “Intro” plan.If you have come here after subscribing then go to Step 2.
  2. Once you complete the subscription process you will get an email with your API Key. Please note that we don’t store any of your payment information. We use stripe.com as our payment partner.

Step 2: Configure your website

This step is basically adding a “Button” or any UI element on your website or platform and making a HTTP POST request to our API when the button is pressed. You might configure your website differently depending upon your use case. In this example we will use a “Button” to make a POST request to Myra API end point.

The button on a website might look something like the image below.


Step 3: Making a Request to Myra

We will use Postman to show how to send a request to Myra API end point. 

MYRA API END POINT
HTTPS://MYRA.IO/KARAOKE

Header Params for all scenarios

Params:

Authkey: YOUR_AUTH_KEY (from the email you got upon subscription)

Remove Vocals from YouTube video URLs

Params for Body (POST request) – Sending youtube url to create karaoke

Sample Code

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://myra.io/karaoke",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "------WebKitFormBoundary5TRynDtg67\r\nContent-Disposition: form-data; name=\"url\"\r\n\r\nhttps://www.youtube.com/watch?v=ZmDBbnmKpqQ\r\n------WebKitFormBoundary5TRyNDtg670gw\r\nContent-Disposition: form-data; name=\"sending_file\"\r\n\r\nno\r\n------WebKitFormBoundary5TRyNDtg670gw\r\nContent-Disposition: form-data; name=\"sending_email\"\r\n\r\nyes\r\n------WebKitFormBoundary5TRyNDtg670gw\r\nContent-Disposition: form-data; name=\"email_id\"\r\n\r\njohndoe@example.com\r\n------WebKitFormBoundary5TRyNDtg670gw--",
  CURLOPT_HTTPHEADER => array(
    "authkey: YOUR AUTH KEY",
    "cache-control: no-cache",
    "content-type: multipart/form-data; boundary=----WebKitFormBoundary5TRynDtg670gW",
    "postman-token: some-post-man-token"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Sample Payload

{
	"url": "YOUTUBE URL", 
	"sending_file": "no", 
	"sending_email": "yes", 
	"email_id": "johndoe@example.com"
}

Remove Vocals by uploading a local audio file of the song

Body – Sending file to create karaoke

Sample Code

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://myra.io/karaoke",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "------WebKitFormBoundary8ASdA9uiSjD0gw\r\nContent-Disposition: form-data; name=\"file\"; filename=\"audio.wav\"\r\nContent-Type: audio/x-wav\r\n\r\n\r\n------WebKitFormBoundary8ASdA9uiSjD0gw\r\nContent-Disposition: form-data; name=\"sending_file\"\r\n\r\nno\r\n------WebKitFormBoundary8ASdA9uiSjD0gw\r\nContent-Disposition: form-data; name=\"sending_email\"\r\n\r\nyes\r\n------WebKitFormBoundary8ASdA9uiSjD0gw\r\nContent-Disposition: form-data; name=\"email_id\"\r\n\r\njohndoe@example.com\r\n------WebKitFormBoundary8ASdA9uiSjD0gw--",
  CURLOPT_HTTPHEADER => array(
    "authkey: zhSPjoheiNXkngZmKyfeTg",
    "cache-control: no-cache",
    "content-type: multipart/form-data; boundary=----WebKitFormBoundary8ASdA9uiSjD0gw",
    "postman-token: some-post-man-token-here"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Sample Payload

{
	"sending_file": "yes", 
	"sending_email": "yes", 
	"email_id": "johndoe@example.com"
}