<aside> 🔥 The Movio API gives you abilities to create, automate video by submitting json. You can access video editing abilities of movio.la by Movio API..
</aside>
The Movio API gives you abilities to create, automate video with AI driven avatar by submiting json. You can access multi video editing abilities of movio.la by Movio API.
This documentation describes all of the available API calls and properties of the returned objects. If you have any questions, please reach out to [email protected].
<aside> 📢 At this time the movio API is unstable. This means that the way it works and the data it returns may change at any time. Breaking changes are rare, but do happen. Proper versioning will be introduced in a future release.
</aside>
Before getting started, a movio account is needed. If you don’t have one, create a movio account and get start!
The Movio API uses X-Api-Key tokens to authorize requests. As an developer, you'll need to register a movio account at fisrt. Log into movio.la after registeration, click the Account button in the left bottom, the API token shows there.
<aside> ‼️ Keep the API token secret and safe. Anyone with this API Key can use the movio API as you. If it is compromised, please send an email to [email protected] and it can be deactivated or reseted.
</aside>
Movio API is authenticated with a token sent with each request. The header X-Api-Key must be include in every API call.
Request /api/v1/token.check to validate you X-Api-Key.
Here is the HTTP request
GET /api/v1/token.check HTTP/1.1
x-api-token: {MY_API_TOKEN}
You can use tools like curl to send the request:
curl --X POST "<https://craft-api.surreal-ai.com/pacific/api/token.check>" --header 'X-Api-Key: {api-token-here}'
The following reponse will be returned if the token is valid:
{
"code": 100,
"message": "Success"
}
It’s pretty simple to get your first video by Movio API. the reqeust is
POST /api/v1/video.generate HTTP/1.1
X-Api-Key: {MY_API_TOKEN}
Post this json to https://craft-api.surreal-ai.com/pacific/api/v1/video.generate with your API token in HTTP X-Api-Key header.
{
"background": "off_white",
"clips": [
{
"avatar_name": "Mark-blueshirtfullbody-20220601",
"avatar_style": "normal",
"caption": true,
"input_text": "Welcolme to movio API",
"offset": {
"x": 0,
"y": 0
},
"scale": 1,
"voice_name": "en-US-GuyNeural"
},
{
"avatar_name": "Mark-blueshirtfullbody-20220601",
"avatar_style": "normal",
"caption": true,
"input_text": "Use json to generate you own AI video now!",
"offset": {
"x": 0.2,
"y": 0
},
"scale": 1,
"voice_name": "en-US-GuyNeural"
}
],
"ratio": "16:9",
"test": true,
"version": "v1alpha"
}
You can also use curl comand to generate this video, replace {api-token-here} with your API token.
curl --location --request POST --X POST '<https://craft-api.surreal-ai.com/pacific/api/v1/video.generate>' \\
--header 'x-api-key: {Your API Token}' \\
--header 'Content-Type: application/json' \\
--data '{
"background": "off_white",
"clips": [
{
"avatar_name": "Mark-blueshirtfullbody-20220601",
"avatar_style": "normal",
"caption": true,
"input_text": "Welcolme to movio API",
"offset": {
"x": 0,
"y": 0
},
"scale": 1,
"voice_name": "en-US-GuyNeural"
},
{
"avatar_name": "Mark-blueshirtfullbody-20220601",
"avatar_style": "normal",
"caption": true,
"input_text": "Use json to generate you own AI video now!",
"offset": {
"x": 0.2,
"y": 0
},
"scale": 1,
"voice_name": "en-US-GuyNeural"
}
],
"ratio": "16:9",
"test": true,
"version": "v1alpha"
}
'
The response will look like this :
{
"code": 100,
"data": {
"video_id": "bbb89ede495247bea9389ecc42e9baeb"
},
"message": "Success"
}
In the example above, we posted a new video generation job. Let's walk through the request json:
version is used to select the version of our API, now the version is v1alpha.ratio specific the aspect ratio of the video is 16:9, in the format of {width}:{height}.en-US-AriaNeural.test field specific that the video is generate with wartermark on test envrionment.The response json is quite simple:
code: 100 means video generate request is success.data.video_id is the unique identifier of the video, we’ll use the video id to poll the the rendering status of the video.bbb89ede495247bea9389ecc42e9baeb.mp4
curl --X GET '<https://craft-api.surreal-ai.com/pacific/api/v1/video.status?video_id=bbb89ede495247bea9389ecc42e9baeb>' \\
--header 'X-Api-Key: {api-token-here}'
The server will response this if the video is still rendering:
{
"code": 100,
"data": {
"id": "bbb89ede495247bea9389ecc42e9baeb",
"status": "processing"
},
"message": "Success"
}
After the rendering finished, you’ll got a response like:
{
"code": 100,
"data":
{
"id": "bbb89ede495247bea9389ecc42e9baeb",
"status": "completed"
"video_url": "<https://s3.amazonaws.com/www.talkieselfie.xyz/aws_pacific/avatar_tmp/641b659486e24a41854810ef090c3abc/a577ca83-15a3-4869-a2ce-290d8bfbdad6.mp4?response-content-disposition=attachment%3B%20filename%3Dbbb89ede495247bea9389ecc42e9baeb.mp4&AWSAccessKeyId=AKIAR2ESI7XGYQEXSYU2&Signature=HqevbYluZqMP6PKpIdxMUde1FkI%3D&Expires=1657217774>"
},
"message": "Success"
}
The video_url is a public url of the generated video, download the video or save to your own storage.
<aside> 🗒️ Note: The video url will be expired in seven days, please make sure you’ve download the video or save it to somewhere safe.
</aside>
You arrange and configure an JSON and POST it to the API which will render your media and provide a file location when complete.
The Serve API base URL is: https://craft-api.surreal-ai.com/pacific/api/v1/.
Set the X**-Api-Key** header with your Movio API key, include the header in all calls to the API that are secured with a key. The key could found on Account page in movio.la.
<aside> ❓ Don’t have an Movio account? Sign up for free now!
</aside>
| Header | REQUIRED | DESCRIPTION |
|---|---|---|
| X-Api-Key | true | Set the X**-Api-Key** header with your Movio API key, include the header in all calls to the API that are secured with a key. |
<aside> 💡 Movio API only avaliable for paying customers , please subscribe a plan to use movio API.
</aside>
Render the contents of an Edit as a video, image or audio file.
Base URL: https://craft-api.surreal-ai.com/pacific/api/v1/
API Path: video.create
Request Method: POST
| NAME | IN | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|---|
| Body | body | Edit | true | The JSON represent the whole video. |
Get the rendering status, temporary video url and details of a render by id.
Base URL: https://craft-api.surreal-ai.com/pacific/api/v1/
API Path: video.status
Request Method: GET
| NAME | IN | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|---|
| id | URL parmeters | string | true | The video id in the response data of Create Video API. |
| --- | --- | --- | --- | --- |
The title is the voice name of a voice.
https://surreal-public.oss-cn-beijing.aliyuncs.com/voice_preview/dubbing/azure/ar-SA-ZariyahNeural.mp3
https://surreal-public.oss-cn-beijing.aliyuncs.com/voice_preview/dubbing/azure/ar-EG-SalmaNeural.mp3
https://surreal-public.oss-cn-beijing.aliyuncs.com/voice_preview/dubbing/azure/en-AU-HayleyRUS.mp3
https://surreal-public.oss-cn-beijing.aliyuncs.com/voice_preview/dubbing/azure/en-AU-NatashaNeural.mp3
https://surreal-public.oss-cn-beijing.aliyuncs.com/voice_preview/dubbing/azure/en-GB-LibbyNeural.mp3
https://surreal-public.oss-cn-beijing.aliyuncs.com/voice_preview/dubbing/azure/en-GB-RyanNeural.mp3