Back to top

RemasterMedia

RemasterMedia is a sound mastering service. It takes media files (audio/video) on the input, remasters their audio stream using pre-defined mastering profiles to create media file with remastered sound at the output.

Authentication and Authorization

All API requests except the authentication must be authorized, so authentication must be performed first. Successfull authentication will produce JSON web token (JWT) that must be used to authorize all subsequent requests.

Authentication

Performs authentication using provided credentials.

Authenticate
POST/auth

Example URI

POST https://api.remastermedia.com/v1/auth
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "client_id": "34198c6e05300a7f8b7a",
  "client_key": "629+fmypnpAM0GV52z+7EG25d+rUpQ3lYADf5lAM"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "client_id": {
      "type": "string",
      "description": "Client ID in form of hash."
    },
    "client_key": {
      "type": "string",
      "description": "Client key in form of hash."
    }
  },
  "required": [
    "client_id",
    "client_key"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "auth": {
    "token": "eyJhbGciOiJIUzI1NiJ9.eyJjbGllbnRfaWQiOiJxd2UiLCJleHBpcmF0aW9uIjoiMjAyMC0wMi0yNVQxNToxMjozNloifQ.M6EIX7FYOH9Ibtof6yVzS5uTopzeL6IARxqok4z4qZ5",
    "expires_at": "2020-02-08T02:16:22Z"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "auth": {
      "type": "object",
      "properties": {
        "token": {
          "type": "string"
        },
        "expires_at": {
          "type": "string"
        }
      }
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "invalid_credentials",
    "message": "Invalid credentials"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      }
    }
  }
}

Mastering Profiles

RemasterMedia contains set of pre-defined mastering profiles that describe how to manipulate audio stream when remastering. These profiles are split into categories. You must use one (or more) profile(s) with each media file you would like to remaster.

Profiles Collection

Collection of all available mastering profiles organized in categories.

List all master profiles
GET/profiles

Example URI

GET https://api.remastermedia.com/v1/profiles
Request
HideShow
Headers
Authorization: <Auth Token>
Response  200
HideShow

The profiles are organized categories (such as Web/Mobile or Broadcast).

Headers
Content-Type: application/json
Body
{
  "profiles": [
    {
      "title": "Web/Mobile",
      "master_profiles": [
        {
          "title": "Max Presence",
          "name": "maxpresence",
          "description": "Superior EQ enhancement for music",
          "definition_file": "https://s3_bucket.s3-accelerate.amazonaws.com/presets/maxpresence.bgvx",
          "updated_at": "2019-12-05T10:11:08.094Z"
        },
        {
          "title": "Balanced Clarity",
          "name": "balancedclarity",
          "description": "Balanced EQ level enhancement for music and voice over",
          "definition_file": "https://s3_bucket.s3-accelerate.amazonaws.com/presets/balancedclarity.bgvx",
          "updated_at": "2019-12-05T10:11:08.094Z"
        }
      ]
    },
    {
      "title": "Special Applications",
      "master_profiles": [
        {
          "title": "Voice Focus",
          "name": "voicefocus",
          "description": "Use for heavy background noise where recorded voice needs to be enhanced",
          "definition_file": "https://s3_bucket.s3-accelerate.amazonaws.com/presets/voicefocus.bgvx",
          "updated_at": "2019-12-05T10:11:10.321Z"
        }
      ]
    }
  ]
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "invalid_authorization_token",
    "message": "Invalid authorization token"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      }
    }
  }
}

Remasters

Remasters are central entities in RemasterMedia API. They represent jobs to remaster a media file using specific mastering profile.

Remaster

A single Remaster object.

Submit Remaster to pe performed
POST/remasters

Example URI

POST https://api.remastermedia.com/v1/remasters
Request
HideShow
Headers
Content-Type: application/json
Authorization: <Auth Token>
Body
{
  "source_file": "https://name.domain.com/path/filename",
  "profiles": [
    "maxpresence"
  ],
  "duration": 30,
  "webhook": "https://name.domain.com/hook"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "source_file": {
      "type": "string",
      "description": "Location of media file in form of URL."
    },
    "profiles": {
      "type": "array",
      "description": "Names of profiles to remaster file with."
    },
    "duration": {
      "type": "number",
      "description": "The duration in seconds from the start to be remastered. If not present full length will be remastered."
    },
    "webhook": {
      "type": "string",
      "description": "Address where the webhook will be sent when each profile remastering is finished and output file is ready to be downloaded."
    },
    "user_data": {
      "type": "object",
      "properties": {},
      "description": "Custom user data that will be stored along with the remaster and returned when reading the remaster. An option to add some context."
    }
  },
  "required": [
    "source_file",
    "profiles"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "remaster": {
    "id": "42974",
    "created_at": "2020-01-08T02:15:15Z",
    "updated_at": "2020-01-08T02:15:15Z",
    "expires_at": null,
    "source_file": {
      "location": "https://name.domain.com/path/filename",
      "metadata": null
    },
    "status": {
      "pending": [
        {
          "profile": "maxpresence"
        },
        {
          "profile": "voicefocus"
        }
      ],
      "success": [],
      "failed": []
    },
    "webhook": {
      "location": "https://domain.com/hook"
    },
    "user_data": {
      "order_id": "2d654d14"
    }
  }
}
Response  400
HideShow

Request body is malformed.

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "bad_request",
    "message": "param is missing or the value is empty: source_file"
  }
}
Response  422
HideShow

In case of request can not be fullfilled in situations such as when master profile name provided does not exist or media file URL is not accessible.

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "invalid_parameters",
    "message": "Profile maxpresencetypo not found."
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "invalid_authorization_token",
    "message": "Invalid authorization token"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      }
    }
  }
}

Retrieve Remaster details
GET/remasters/

Example URI

GET https://api.remastermedia.com/v1/remasters/
Request
HideShow
Headers
Authorization: <Auth Token>
Response  200
HideShow

The response will contain an array of Remasters

Headers
Content-Type: application/json
Body
{
    "remaster": {
        "id": 42974,
        "created_at": "2020-01-08T02:15:15Z",
        "updated_at": "2020-01-08T02:16:22Z",
        "expires_at": "2020-02-08T02:16:22Z"
        "source_file": {
            "location": "https://s3_bucket.s3-accelerate.amazonaws.com/filename",
            "metadata": {
                "size": 3876112,
                "duration": 228,
                "type": "audio"
            }
        },
        "status": {
            "pending": []
            "success": [
                {
                    "profile": "maxpresence",
                    "output_file": {
                        "location": "https://remastermedia-data.s3-accelerate.amazonaws.com/filename-maxpresence?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIX54PW5OH2ZXKJAA%2F20191212%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20191212T174426Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=838e0f8f85f98251b0d0d1b812e8e69d5e57342f7c00d803fa7652fcb5836b7f",
                        "expires_at": "2020-02-08T02:16:22Z"
                    }
                },
                {
                    "profile": "voicefocus",
                    "output_file": {
                        "location": "https://remastermedia-data.s3-accelerate.amazonaws.com/filename-voicefocus?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIX54PW5OH2ZXKJAA%2F20191212%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20191212T174426Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=838e0f8f85f98251b0d0d1b812e8e69d5e57342f7c00d803fa7652fcb5836b7f",
                        "expires_at": "2020-02-08T02:16:22Z"
                    }
                }
            ],
            "failed": [],
        },
        "webhook": {
            "location": "https://domain.com/hook"
        }
    }
}
Response  404
HideShow

In case of such remaster does not exist

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "record_not_found",
    "message": "Remaster not found"
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "invalid_authorization_token",
    "message": "Invalid authorization token"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      }
    }
  }
}

Remaster Collection

Collection of Remaster objects. Retrieves Remasters that were created between from and to time. Lists 100 results per response. Use page parameter to iterate over all results.

List Remasters
GET/remasters?from={from}&to={to}&page={page}

Example URI

GET https://api.remastermedia.com/v1/remasters?from=from&to=to&page=page
URI Parameters
HideShow
from
string (required) 

Beginning of time range in some of ISO8601 formats

to
string (required) 

End of time range in in some of ISO8601 formats

page
number (optional) 

default 1

Request
HideShow
Headers
Authorization: <Auth Token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "remasters": [
        {
            "id": "42974",
            "created_at": "2020-01-08T02:15:15Z",
            "updated_at": "2020-01-08T02:16:22Z",
            "source_file": {
                "location": "https://s3_bucket.s3-accelerate.amazonaws.com/filename",
                "metadata": {
                    "size": 3876112,
                    "duration": 228,
                    "type": "audio"
                }
            },
            "status": {
                "pending": []
                "success": [
                    {
                        "profile": "maxpresence",
                        "location": "https://remastermedia-data.s3-accelerate.amazonaws.com/filename-maxpresence?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIX54PW5OH2ZXKJAA%2F20191212%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20191212T174426Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=838e0f8f85f98251b0d0d1b812e8e69d5e57342f7c00d803fa7652fcb5836b7f",
                    },
                    {
                        "profile": "voicefocus"
                        "location": "https://remastermedia-data.s3-accelerate.amazonaws.com/filename-voicefocus?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIX54PW5OH2ZXKJAA%2F20191212%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20191212T174426Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=838e0f8f85f98251b0d0d1b812e8e69d5e57342f7c00d803fa7652fcb5836b7f",
                    }
                ],
                "failed": [],
            },
            "webhook": {
                "location": "https://domain.com/hook"
            }
        },
        {
            "id": "44028",
            "created_at": "2020-01-12T22:39:51Z",
            "updated_at": "2020-01-12T22:44:07Z",
            "source_file": {
                "location": "https://s3_bucket.s3-accelerate.amazonaws.com/another_filename",
                "metadata": {
                    "size": 3876112,
                    "duration": 228,
                    "type": "video"
                }
            },
            "status": {
                "pending": [],
                "success": [],
                "failed": [
                    {
                        "profile": "maxpresence",
                        "error": {
                            "message": "Broken source file"
                        }
                    },
                    {
                        "profile": "voicefocus"
                        "error": {
                            "message": "Broken source file"
                        }
                    }
                ],
            },
            "webhook": {
                "location": "https://domain.com/hook"
            }
        }
    ]
}
Response  400
HideShow

When query parameters are invalid.

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "invalid_parameters",
    "message": "Invalid parameters"
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "invalid_authorization_token",
    "message": "Invalid authorization token"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      }
    }
  }
}

Generated by aglio on 11 Aug 2020