Libraries & Assets
Manage your libraries and assets
Intro
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.
1. Authentication
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>'
2. Libraries
Libraries overview
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
.
Get libraries
getGet users libraries
https://api.moovly.com/api2/v1/users/me/libraries
Response 200 (successful operation)
Show response schemaType: Array
group_name
string
Name of the libraries group
Type: Array
type
string
Type of the library group
Type: Array
libraries
array
Libraries in this group
Detail of a Library
id
string
name
string
searchable
boolean
external
boolean
has_categories
boolean
base_url
string
locked
boolean
editable
boolean
thumbnail
string
supported_object_types
array
default_type
string
predefined_searches"
array
sort_order
integer
premium
boolean
scope
string
type
string
shares
array
Example Response
[
{
"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": []
}
]
}
]
Library creation
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.
Create a library
postCreate a new library
https://api.moovly.com/api2/v1/users/me/libraries
Request body (application/x-www-form-urlencoded)
name
string
The name of the library
Response 200 (successful operation)
Show response schemaid
string
Id of the library
name
string
Name of the library
searchable
boolean
external
boolean
has_categories
boolean
base_url
string
locked
boolean
editable
boolean
thumbnail
string
supported_object_types
array
default_type
string
predefined_searches"
array
label
string
query
array
default_type
string
children
array
order
integer
has_business_label
boolean
sort_order
integer
premium
boolean
scope
string
type
string
shares
array
id
string
type
string
guid
string
3. Assets
Assets overview
To get a list of all assets in a specific library, you need to have the id of your library.
Get your assets from your library
getGet your assets from your library
https://api.moovly.com/api2/v1/libraries/{id}/assets
Input parameters
id
Id of the library
limit
Amount of assets to be returned
page
Page number of the assets; starts counting at 1
Response 200 (successful operation)
Show response schemaassets
Example response
{
"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.
Asset management
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.
Add an object
postAdd an object
https://api.moovly.com/api2/v1/objects
Request body (application/x-www-form-urlencoded)
filename
string
Name of the file
library_id
string
Id of the library
Response 200 (successful operation)
Show response schemaurl
string
Url on s3 where you need to upload the file to
data
object
Asset of a library
upload_id
string
created_at
string
library_object_id
string
status
string
type
string
assets
array
metadata
object
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'
4. Text to speech (tts)
Explanation about text to speech
voices
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
An example to use the tts voice in the quick edit
{
"type": "tts",
"value": "The text that needs to be spoken",
"identifier": "{identifier copied from table}"
}