Discussions

Ask a Question
Back to All

How to create a video out of the generated image using API calls

Hello,

I am using Flutter and want to use HeyGen API.

I have 2 questions.

Question1)

I generated some images from 'https://api.heygen.com/v2/photo_avatar/photo/generate' and 'https://api.heygen.com/v2/photo_avatar/generation/$generation_id' API.

I got the.
{"error": null, "data": {"id": "a8e2d35c2be844a694f04ec9868b06c7", "status": "success", "msg": null, "image_url_list": ["https://resource2.heygen.ai/image/3e22ed406844414f9b7e03137341102f/original", "https://resource2.heygen.ai/image/a6928e6e98b34677824bd1f62cb356ad/original", "https://resource2.heygen.ai/image/c7f64488632b4c94bbeceb6b1a01bdcc/original", "https://resource2.heygen.ai/image/57c2822a94f74df3bf63e09a296e90e1/original"], "image_key_list": ["image/3e22ed406844414f9b7e03137341102f/original", "image/a6928e6e98b34677824bd1f62cb356ad/original", "image/c7f64488632b4c94bbeceb6b1a01bdcc/original", "image/57c2822a94f74df3bf63e09a296e90e1/original"]}}

and then I called 'https://api.heygen.com/v2/video/generate' with the below parameters

"character": {
"type": "photo_avatar",
"photo_avatar_id": "3e22ed406844414f9b7e03137341102f", // one of image key
"avatar_style": "normal",
}

But I got the error {"data":null,"error":{"code":"photar_not_found","message":"Talking photo image/6969fb406cd14c8ebcc0df556689c242/original not found"}}

Could you hemp me to create the avatar video from the generated image?

Question2)

In an Android or iPhone app created with Flutter, is it possible for users to upload a locally available image and then create an avatar video based on the uploaded image?