---
title: "New Endpoint"
method: POST
path: "/v1/video_avatar/task/submit"
---

# New Endpoint

`POST /v1/video_avatar/task/submit`

This is your first endpoint! Edit this page to start documenting your API.

## Headers

- `Topview-Uid` string, required
- `Authorization` string, required

## Request body

- object
  - `avatarSourceFrom` '0' | '1' | '2' | '3', required — The sources of avatars: Allowed values: 0 1 2 3. 0-user local video; 1-When `isCustom` is null or false of the API [AiAvatar List](https://docs.topview.ai/reference/aiavatar-query#/); 2- When `isCustom` is true of the API [AiAvatar List](https://docs.topview.ai/reference/aiavatar-query#/); 3-user local photo.
  - `videoFileId` string — File id you uploaded video via the upload api. When avatarSourceFrom equals 0, this field must be provided.
  - `aiAvatarId` string, required — Voice over id. When audioSourceFrom equals 1 and avatarSourceFrom equals 0 or 2, this field must be provided. When audioSourceFrom equals 1 and avatarSourceFrom equals 1, voiceoverId is null means use the default voiceover id of the avatar.
  - `isSave2CustomAiAvatar` boolean — Whether create avatar from current video
  - `captionId` string — Only support avatarSourceFrom equals 1, caption_id from interface. Caption List
  - `noticeUrl` string — Please refer to the API documentation for details NoticeUrl
  - `imageFileId` string — File id via the upload api. When audioSourceFrom equals 3, this field must be provided.
  - `modeType` string — Mode type. 0-avatar1, 1-avatar2 Allowed values: 0 1. Defaults to 0
  - `audioSourceFrom` string, required — enum<integer> required The sources of audio: 0-user uploaded audio file; 1- text to speech. Allowed values: 0 1
  - `audioFileId` string — File id via the upload api. When audioSourceFrom equals 0, this field must be provided.
  - `ttsText` string, required — User input content. When audioSourceFrom equals 1, this field must be provided.
  - `voiceoverId` string — Voice over id. When audioSourceFrom equals 1 and avatarSourceFrom equals 0 or 2 or 3, this field must be provided. When audioSourceFrom equals 1 and avatarSourceFrom equals 1, voiceoverId is null means use the default voiceover id of the avatar.
  - `voiceSpeed` number — Sound speed, range [0.8 ~ 1.2], default is 1. It only takes effect when audioSourceFrom=1.

## Response `200`

Successful response

---

[API](https://skmtc.net/topview/apis/image-character-swap-apis-editable-in-readme.md) · [All operations](https://skmtc.net/topview/apis/image-character-swap-apis-editable-in-readme/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/topview/image-character-swap-apis-editable-in-readme/revisions/83cd46ca7859/schema)
