Photo Animer

Using artificial intelligence technology to make the input photos live according to the style, expression-driven static images may take a long time and require asynchronous methods to obtain the results, so we provide three interfaces to complete this process.

API documentation

Interface 1: Submit static image to generate moving video task

(1)Request parameters (Header)

ParameterParameter TypeDescription
APIKEYstringYour API Key

(2) Query String

ParameterParameter TypeDescription
imageUrlurlThe URL of the static image of the face
voiceUrlurlaudio file url.Template ID must be 0
outputFormatstringoutput format, avaiable values: gif. By default, a mp4 video is generated, if outputFormat is set to "gif", additional "gifUrl" field will be provided in response.
templateId0, 1, 2, 3, 4, 5 can be chosenExpression template index number, starting from 0, currently supports 0,1,2,3,4,5 six kinds of expressions

(3) Response data

  "code": 0, 
  "data": 123456, //Return the task ID after the task is submitted
  "msg": null, 
  "time": 1615368038661

Sample Code

  import requests
  response = requests.get(
  $client = new GuzzleHttp\Client();
  $res = $client->get('', [
    'headers' => [
  File file = new File("/Your/Image/File/Path");
  CloseableHttpClient client = HttpClients.createDefault();
  HttpGet httpGet = new HttpGet("");
  httpGet.setHeader("APIKEY", "INSERT_YOUR_API_KEY_HERE");

  try (CloseableHttpResponse response = client.execute(httpGet)){
    if (response.getStatusLine().getStatusCode() == HttpStatusCode.OK) {
        //todo your logic
  } catch (IOException e) {
  var request = require('request');
  var fs = require('fs');

    url: '',
    headers: {
    encoding: null
  }, function(error, response, body) {
    // console.log(response);

Interface 2: Asynchronous notification

  • You need to provide an api address for receiving asynchronous notifications. The notification will be posted to the specified address in json format, json example:
  "eventData": {
    "resultUrl": "http://xxxxxxxxxxx", //Video address after video processing is completed

Interface 3: Actively queried interface

(1) Request parameters (Header)

ParameterParameter TypeDescription
APIKEYstringYour API key

(2) Query String

ParameterParameter TypeDescription
taskIdtask IDtrue

(3) Response data

  "code": 0, 
  "data": {
    "taskId": 123456,
    "status": 1, //0: processing, 1: finished, 2: failed (it can be failed when there is no person detected)
    "resultUrl": "http://xxxxxxxxxxx.mp4", //Video address after video processing is completed
    "gifUrl": "http://xxxxxxxxxxx.gif" // If outputFormat is set to "gif", additional "gifUrl" field will be provided in response
  "msg": null, 
  "time": 1615368038661 


This interface call needs to consume video seconds. The video seconds corresponding to different templates are as follows:

Template idSeconds

Frequently asked questions

  • Q: What are the requirements for the input image format?
  • A: Support PNG, JPG, JPEG, BMP, WEBP
  • Q: Is there a limit to the supported image size?
  • A: The maximum resolution uploaded at present is 4096x4096 pixels, and the image file size is less than 15MB