Discussions

Ask a Question
Back to All

background removal using api call

I am using the api, and use one of your AI generated avatars. As you described in the manual, I added the background that I want to use to my assets using the api, I have the asset id, I send it in the api call, but it does not replace the avatar's green background with this picture.
This is the code:
payload = {
"video_inputs": [
{
"character": {
"type": "avatar",
"avatar_id": "8e7e988d3d58435dadd39c1e40db7c21", # Change avatar ID as needed
"avatar_style": "normal"
},
"voice": {
"type": "text",
"input_text": text,
"voice_id": "c2d282c83e73494aa0681f9bd6742615" # Change voice ID as needed
},
"background": {
"type": "image",
"image_asset_id": "a74585f98486419a9f3ddde6529d7c03"
}
}
],
}
and this is the video it generates:
video id = 123794d8399b4987b41487be5364206f