Create a Simple Render

POST /v1/simple_renders

Creates a simple render.

Request Parameters

Location Data Item Type Required/ Optional Description
body data object required
body data.type string required The type of data (simple_renders in this case)
body data.attributes object required
body data.attributes.timeline object required The timeline data. See Timelines for details
body data.attributes.make_timeline boolean optional If true, a copy of the input timeline (possibly amended and completed) is returned in future GET requests. If false, no timeline is returned. The value of make_timeline defaults to false when omitted.
body data.attributes.preset string enum required The file format preset. One of the following values:
MASTER_MP3
MASTER_WAV
STEMS_WAV
body data.attributes.attachment_filename string optional Used as the Content-Disposition filename of the output file. It is a hint to a web browser for naming download files

Example Request

POST /v1/simple_renders  HTTP/1.1
Host: api.ampermusic.com
Content-Type: application/vnd.api+json
Authorization: Basic abcxyz

Body

{
    "data": {
        "type": "simple_renders",
        "attributes": {
            "timeline": {
                <timeline data>
            },
            "make_timeline": true,
            "preset": "MASTER_MP3",
            "attachment_filename": "My Project 2018.mp3"
        }
    }
}

Response Data

Data Item Type Description
data object
data.type string The type of data (simple_renders in this case)
data.id string The alphanumeric ID of the simple render
data.attributes object
data.attributes.timeline object The timeline data. See Timelines for details
data.attributes.status string enum A coarse progress indicator. One of the following values:
WAITING_COMPOSE — The job is waiting to start the composition phase
RUNNING_COMPOSE — The job is actively being composed
WAITING_RENDER — The job’s composition is done; waiting to start the rendering phase
RUNNING_RENDER — The job is actively being rendered
CREATED — The job has finished and all files have been created
FAILED_CREATE — The job did not complete successfully and no further work will be performed
data.attributes.progress_percent number Indicates the current progress as percent complete (0% to 100%). If the render has not started, or it has finished, the value is null
data.attributes.files array The files associated with this render
data.attributes.date_create date The date and time the render was created
data.attributes.date_update date The date and time the render was last updated
data.links object
data.links.self string The URL of the render
links object
links.self string The URL of this render

Note: All dates are formatted as ISO-8601 date and time strings. For example, 2018-08-08T08:08:08+00:00.

Example Response

Header

HTTP/1.1 202 Accepted
Content-Type: application/vnd.api+json
Location: /simple_renders/abcd1234
ETag: W/"1bcca6e2159e0adc4c2559a66cff751d30b46c88"

Body

{
    "data": {
        "type": "simple_renders",
        "id": "abcd1234",
        "attributes": {
            "timeline": null,
            "status": "waiting_compose",
            "progress_percent": null,
            "files": [],
            "date_create": "2018-08-08T08:08:08+00:00",
            "date_update": "2018-08-08T08:08:08+00:00"
        },
        "links": {
            "self": "https://api.ampermusic.com/v1/simple_renders/abcd1234"
        }
    },
    "links": {
        "self": "https://api.ampermusic.com/v1/simple_renders/abcd1234"
    }
}