Libraries & Assets

Manage your libraries and assets

Libraries, objects and assets are closely related entities in Moovly. When an asset is uploaded, we transform it into different resolutions so we can select the most appropriate asset depending on the situation. To keep track of these (transformed) assets, we create a parent Object for them. Those assets/objects are then grouped into libraries. Libraries can be personal to a specific user or group, but also public libraries and stock libraries are supported.

There are many objects in the Moovly platform and currently three of them are supported in the public API:

  • Audio
  • Images
  • Video

As a general rule, there are no hard file limits as of this moment. Most common file types are supported and an up to date list can be found here.

All API calls need to be authenticated with an access token. To generate an access token, head to our Developer Portal and use the token as a bearer token in the Authentication header of each API call.

curl --header 'Authorization: Bearer <your access token>'

When you want a list of which objects are in which library, you'll first need to know the id of your library. The following API call allows you to get an overview of each of you libraries, including their type and id.

[
    {
        "group_name": "Your Libraries",
        "type": "personal",
        "libraries": [
            {
                "id": "ORdmNrjK6zMkY9E0B4ZX23JV",
                "name": "Personal Library",
                "searchable": false,
                "external": false,
                "has_categories": false,
                "base_url": null,
                "locked": false,
                "editable": true,
                "thumbnail": "https://assets.moovly.com/defaults/thumb/default-thumb-personal_library.png",
                "supported_object_types": [
                    "sprite",
                    "image",
                    "sound",
                    "video",
                    "svg",
                    "lottie"
                ],
                "default_type": "video",
                "predefined_searches": [],
                "sort_order": 0,
                "premium": false,
                "scope": null,
                "type": "personal",
                "shares": []
            }
        ]
    }
]

Whenever a more organised structure for you assets is required, you can create new libraries to categorise them. This is done through a POST call to the library endpoint and supplying the name parameter as form data.

To get a list of all assets in a specific library, you need to have the id of your library.

{
    "assets": [
        {
            "upload_id": "24a62cce-bd12-33ea-876b-0695ba870950",
            "type": "sprite",
            "assets": [
                {
                    "path": "https://assets.moovly.com/converted/images/image-d1dfa3cf8c33e95b0e0c8ecfcca90a33.jpeg"
                }
            ],
            "metadata": {
                "id": "vkbx73lDR05jDmN09dOPWKXV",
                "thumb": "https://assets.moovly.com/converted/images/image-d1dfa3cf8c33e95b0e0c8ecfcca90a33.jpeg",
                "tags": [],
                "alpha": false,
                "properties": [],
                "duration": null,
                "label": "_speedy__the_sauropod_by_paleopastori-d3fyr5t.jpg",
                "description": "Created at 1503620582"
            },
            "status": "finished",
            "created_at": "2017-08-25T00:23:03+00:00",
            "library_object_id": "59eec657-c11f-11ea-876b-0695ba870950",
            "premium": false
        }
    ]
}

Note that the assets.metatdata.id is the id that is required in the automator when you want to use your assets for automated video creation.

To add an asset to one of your libraries, you need to know the library id and pick a file name for your asset. Those required properties library_id and filename are to be provided as form data.

As a response you'll receive a singed AWS S3 url to upload your asset to.

{
    "url": "https://s3.eu-west-1.amazonaws.com/assets.moovly.com/uploads/...",
    "data": {
        "id": "99aa8cdd-65ee-4210-9cca-1363ab0c7ad8",
        "upload_id": "8349a737-6f30-47aa-bc13-a71003219df6",
        "type": "sprite",
        "assets": [],
        "metadata": {
            "id": "XdpMBQD2EmdGed70ralzGwjy",
            "thumb": "https://assets.moovly.com/defaults/thumb/default-thumb-sprite.svg",
            "tags": [],
            "alpha": false,
            "properties": [],
            "duration": null,
            "label": "my asset",
            "description": "my asset.jpg"
        },
        "status": "created",
        "created_at": "2022-04-27T08:17:13+00:00",
        "library_object_id": "99aa8cdd-65ee-4210-9cca-1363ab0c7ad8"
    }
}

Add the file as binary data in the body of a PUT call to that S3 url. Upon receiving your asset we'll add it to the library specified in the previous call.

curl -L -X PUT 'https://s3.eu-west-1.amazonaws.com/assets.moovly.com/uploads/...' -H 'Content-Type: image/jpeg' --data-binary '@/usr/local/image.jpeg'

Explanation about text to speech

We support multiple providers with voices. You can find below all supported voices.
You can use these voices in by example the api call for creating video's from a template
The identifier you can copy from the template below

{
    "type": "tts",
    "value": "The text that needs to be spoken",
    "identifier": "{identifier copied from table}"
}