Create a video with your own photo

Preset avatars may not suitable if you need to use your own portrait, or when you need more customized portraits.

The greatest thing is, you can make your own avatar with only one photo. We call that a "Talking Photo".

Next, we'll show you how to create a talking photo with your own photo.

Prepare a photo

There are some restricts on the photo you provided:

  • The face is intact and clearly visible.
  • Recommend using real human faces.
  • Only one face shows in the photo.
  • The resolution of the face area is larger than 200x200 pixels.

Upload the image.

Get an upload URL from Get upload URL API.

curl --location --request GET 'https://api.movio.la/v1/upload_url.get' \
--header 'x-api-key: <your-api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "content_type": "image/jpeg"
}'

The only argument you need to pass is the content type of the image. We listed the mapping of the file type and the content type.

File typeContent type
JPGimage/jpg
JPEGimage/jpeg
PNGimage/png

The API will respond to you with two things: storage_key and upload_url.

{
    "code": 100,
    "data": {
        "storage_key": "storage/key/to/your/photo.jpeg",
        "upload_url": "....."
    },
    "message": "Success"
}

Use the PUT method to upload file binary to the upload_url. You'll get a 200 HTTP status code if the uploading is successful.

Create your talking photo

Create a talking photo by Create a photar API. Just pass the storage_key in the previous step.

curl --location --request GET 'https://api.movio.la/v1/photar.create' \
--header 'x-api-key: <your-api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "storage_key": "/storage/path/to/your/image.jpeg"
}'

If the request is successful, you'll get a response like this:

{
    "code": 100,
    "data": {
        "cropped_height": 552,
        "cropped_url": "https://your/photar/image/facearea/url.jpeg",
        "cropped_width": 552,
        "enhanced_cropped_url": "https://your/photar/image/enhanced/facearea/url.jpeg",
        "enhanced_image_url": "https://your/photar/enhanced/image/url.jpeg",
        "id": "98ff12cf861c4e63b8beb5de23b7ebad",
        "image_height": 552,
        "image_url": "https://your/photar/image/url.jpeg",
        "image_width": 552
    },
    "message": "Success"
}

Find your photar

You can find your photar in My Avatar tab on Movio. Or use the List avatars API to list all your photos.