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

# Upload Avatar Media

> Start studio avatar training from an uploaded self-video.

Returns the avatar group ID and consent URL. Training is asynchronous; poll
``/avatar/status`` for completion. Only avatar-video teams can use this
endpoint, and studio training must be enabled for the account.



## OpenAPI

````yaml /openapi.json post /api/v1/teams/{team_id}/avatar/upload
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/teams/{team_id}/avatar/upload:
    post:
      tags:
        - Teams
      summary: Upload Avatar Media
      description: >-
        Start studio avatar training from an uploaded self-video.


        Returns the avatar group ID and consent URL. Training is asynchronous;
        poll

        ``/avatar/status`` for completion. Only avatar-video teams can use this

        endpoint, and studio training must be enabled for the account.
      operationId: upload_avatar_media_api_v1_teams__team_id__avatar_upload_post
      parameters:
        - name: team_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Team Id
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_upload_avatar_media_api_v1_teams__team_id__avatar_upload_post
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AvatarStudioTrainingResponse'
        '400':
          description: Invalid team, consent, or video upload
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '501':
          description: Studio avatar training is unavailable
      security:
        - HTTPBearer: []
components:
  schemas:
    Body_upload_avatar_media_api_v1_teams__team_id__avatar_upload_post:
      properties:
        video:
          type: string
          contentMediaType: application/octet-stream
          title: Video
        consent_attestation:
          type: boolean
          title: Consent Attestation
        subject_is_minor:
          type: boolean
          title: Subject Is Minor
      type: object
      required:
        - video
        - consent_attestation
        - subject_is_minor
      title: Body_upload_avatar_media_api_v1_teams__team_id__avatar_upload_post
    AvatarStudioTrainingResponse:
      properties:
        avatar_id:
          type: string
          title: Avatar Id
        status:
          type: string
          const: training
          title: Status
        type:
          type: string
          const: studio
          title: Type
        consent_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Consent Url
      type: object
      required:
        - avatar_id
        - status
        - type
      title: AvatarStudioTrainingResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````