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

# Add Motion

> Adds an motion for the specified Photo Avatar



## OpenAPI

````yaml POST /photo_avatar/add_motion
openapi: 3.0.1
info:
  title: OpenAPI Render API
  description: A sample API that demonstrates features in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.jogg.ai/v1
security:
  - apiKeyAuth: []
tags:
  - name: Create Video from URL
    description: |-



      Product video generation workflow:



        1. First call POST /product to crawl product information



        2. Optionally call PUT /product to modify product details using the product_id from step 1



        3. Finally call POST /create_video_from_url to generate video using the product_id from step 1
  - name: Webhook
    description: Webhook configuration and management
paths:
  /photo_avatar/add_motion:
    post:
      tags:
        - Create photo avatar
      summary: Add motion
      description: Adds an motion for the specified Photo Avatar
      requestBody:
        description: Request parameter
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddMotionReq'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BaseResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/AddMotionResp'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse'
components:
  schemas:
    AddMotionReq:
      required:
        - image_url
        - model
        - name
        - voice_id
      type: object
      properties:
        description:
          type: string
          description: >-
            For Model 1.0, descriptions must be under 300 bytes, and for other
            models, they must not exceed 1500 bytes.
        image_url:
          type: string
        model:
          type: string
          enum:
            - '1.0'
            - '2.0'
            - 2.0-Pro
            - '3.0'
        name:
          type: string
        photo_id:
          type: string
        welcome_msg:
          type: string
          description: >-
            If you want to change the default greeting message of the avatar,
            you can use this parameter to replace it.
        voice_id:
          type: string
    BaseResponse:
      type: object
      required:
        - code
        - msg
      properties:
        code:
          type: integer
          description: |



            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:
          type: string
          description: Response message
    AddMotionResp:
      type: object
      properties:
        avatar_id:
          type: integer
        motion_id:
          type: string
        name:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````