Skip to content

Character To Video

POST https://api.newportai.com/api/async/character2video

Characters_to_video feature automatically generates four seconds dynamic videos featuring characters based on images or designs provided by the user. By uploading a character image, the API transforms it into an animated video with movement and expressions, while allowing for personalized scenes and stories.

Request Headers

  • Content-TypestringRequired
    Enum
    application/json
  • AuthorizationstringRequired
    Bearer authentication format, for example: Bearer

Request Body

  • promptstringRequired
    Positive prompt text, less than 1,500 characters long.
  • imgUrlstringRequired
    The image format only supports JPG and PNG.

Response

  • codeinteger
    0 success, or error code.
  • messagestring
    "success", or error msg.
  • dataobject
    taskIdstring
    Use the taskId to request the Polling API to retrieve the generated outputs.

Example

Drive character to videos.

Request:

zsh
curl -X POST 'https://api.newportai.com/api/async/character2video' \
-H "Authorization: Bearer {{key}}" \
-H 'Content-Type: application/json' \
-d '{
  "prompt": "play with a boy",
  "imgUrl": "https://dreamface-resource-new.s3.amazonaws.com/server/aigc/main/de0b348b9a264b629585a39e98d6b40f.jpg"
}'

Response:

json
{
  "code": 0,
  "message": "success", 
  "data": {
    "taskId": "d1ff79a198d5426080d2b1e838eac8e5"
  }
}

Next Step:

Use Polling API to get the result.

Demo
before