> ## Documentation Index
> Fetch the complete documentation index at: https://docs.akool.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload Streaming Avatar

> Create a new streaming avatar from a video URL

<Warning>
  The resources (image, video, voice) generated by our API are valid for 7 days.
  Please save the relevant resources as soon as possible to prevent expiration.
</Warning>


## OpenAPI

````yaml POST /api/open/v3/avatar/create
openapi: 3.0.3
info:
  title: Live Avatar API
  description: API for managing streaming avatars and sessions
  version: 1.0.0
servers:
  - url: https://openapi.akool.com
    description: Production server
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /api/open/v3/avatar/create:
    post:
      tags:
        - Avatar Management
      summary: Upload Streaming Avatar
      description: Create a new streaming avatar from a video URL
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAvatarRequest'
            example:
              url: https://drz0f01yeq1cx.cloudfront.net/1721197444322-leijun000.mp4
              avatar_id: HHdEKhn7k7vVBlR5FSi0e
              name: My Streaming Avatar
              type: 2
              url_from: 1
      responses:
        '200':
          description: Avatar created successfully
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/AvatarDetail'
              example:
                code: 1000
                msg: ok
                data:
                  _id: 655ffeada6976ea317087193
                  disabled: false
                  uid: 1
                  type: 2
                  from: 2
                  status: 1
                  sort: 12
                  create_time: 1700788730000
                  name: Yasmin in White shirt
                  avatar_id: Yasmin_in_White_shirt_20231121
                  url: >-
                    https://drz0f01yeq1cx.cloudfront.net/1700786304161-b574407f-f926-4b3e-bba7-dc77d1742e60-8169.png
                  modify_url: >-
                    https://drz0f01yeq1cx.cloudfront.net/1700786304161-b574407f-f926-4b3e-bba7-dc77d1742e60-8169.png
                  gender: female
                  thumbnailUrl: >-
                    https://drz0f01yeq1cx.cloudfront.net/avatar/thumbnail/1700786304161-b574407f-f926-4b3e-bba7-dc77d1742e60-8169.png
                  crop_arr: []
components:
  schemas:
    CreateAvatarRequest:
      type: object
      required:
        - url
        - avatar_id
        - name
        - type
        - url_from
      properties:
        url:
          type: string
          description: >-
            Avatar resource link. It is recommended that the video be about one
            minute long, and the avatar in the video content should rotate at a
            small angle and be clear.
        avatar_id:
          type: string
          pattern: ^[a-zA-Z0-9]+$
          description: Avatar unique ID, can only contain alphanumeric characters
        name:
          type: string
          description: Avatar display name for easier identification and management
        type:
          type: integer
          enum:
            - 2
          description: >-
            Avatar type 2 represents stream avatar. When type is 2, you need to
            wait until status is 3 before you can use it. You can get the
            current status in real time through the Get Avatar Detail API.
        url_from:
          type: integer
          enum:
            - 1
            - 2
          description: >-
            URL source, 1 means akool and other links, 2 means other third-party
            links (currently only supports YouTube / TikTok / X / Google Drive)
    ApiResponse:
      type: object
      required:
        - code
        - msg
      properties:
        code:
          type: integer
          description: 'Interface returns business status code (1000: success)'
          example: 1000
        msg:
          type: string
          description: Interface returns status information
          example: OK
    AvatarDetail:
      type: object
      properties:
        _id:
          type: string
          description: Internal ID
        uid:
          type: integer
          description: User ID
        type:
          type: integer
          description: Avatar type identifier (2 for streaming avatars)
        from:
          type: integer
          description: >-
            Source identifier for the avatar, 2 for official and 3 for user
            created
        avatar_id:
          type: string
          description: Unique identifier for the streaming avatar
        voice_id:
          type: string
          description: Associated voice model identifier
        name:
          type: string
          description: Display name of the avatar
        url:
          type: string
          description: URL to access the streaming avatar
        thumbnailUrl:
          type: string
          description: URL for the avatar's preview thumbnail
        gender:
          type: string
          description: Avatar's gender designation
        available:
          type: boolean
          description: Indicates if the avatar is currently available for use
        platform:
          type: string
          description: Platform identifier
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your API Key used for request authorization. If both Authorization and
        x-api-key have values, Authorization will be used first and x-api-key
        will be discarded.
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your API Key used for request authorization. Get Token from
        authentication/usage#get-the-token

````