---
title: "Create talking avatar video"
method: POST
path: "/v2/create_video_from_avatar"
tags: ["Video"]
---

# Create talking avatar video

`POST /v2/create_video_from_avatar`

Create a video with talking avatar using script or audio input.
Either provide a script for text-to-speech or upload an audio file.

## Request body

- object
  - `avatar` object, required — Avatar configuration
    - `avatar_type` 0 | 1, required — Source type of the avatar: * 0 - Public avatar * 1 - Custom avatar
    - `avatar_id` integer, required — ID of the avatar to use
  - `voice` object, required — Voice configuration including script or audio input
    - `type` 'script' | 'audio', required — Voice input type
    - `script` string — Text script for voice synthesis (required when type is "script")
    - `audio_url` string, uri — Audio file URL for voice input (required when type is "audio")
    - `voice_id` string, required — Voice ID for text-to-speech
  - `aspect_ratio` 'portrait' | 'landscape' | 'square', required — Aspect ratio of the output video
  - `screen_style` 1 | 2 | 3, required — Background style: * 1 - Full screen * 2 - Split screen * 3 - Picture in picture
  - `caption` boolean — Enable or disable subtitles
  - `webhook_url` string, uri — Webhook URL for status notifications
  - `video_name` string — Custom name for the video

## Response `200`

Success

- object
  - `code` integer, required — Business status code: * 0 - Success * 10104 - Record not found * 10105 - Invalid API key * 18020 - Insufficient credit * 18025 - No permission to call APIs * 40000 - Parameter error * 50000 - System error
  - `msg` string, required — Response message
  - `data` object
    - `video_id` string — Created video ID

---

[API](https://skmtc.net/jogg/apis/joggai-openapi-v2.md) · [All operations](https://skmtc.net/jogg/apis/joggai-openapi-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/jogg/joggai-openapi-v2/versions/ec8807ce9c12/schema)
