> ## 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.

# Create Video from Product

> Create a video from product information with customizable visual style, avatar, voice, and script.
This is the final step after creating a product to generate the actual video.


Generate a product marketing video from product information. This endpoint creates videos with AI-generated scripts based on your product details.

## Example Usage

```bash theme={null}
curl -X POST 'https://api.jogg.ai/v2/create_video_from_product' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "product_id": "prod_abc123",
    "avatar_id": 127,
    "voice_id": "en-US-ChristopherNeural",
    "aspect_ratio": 1
  }'
```

## Related Guides

<CardGroup cols={2}>
  <Card title="URL to Video Guide" href="/api-reference/v2/API Documentation/URLtoVideo">
    Learn the complete product video workflow
  </Card>

  <Card title="Create Product" href="/api-reference/v2/Product/CreateProduct">
    First create a product from URL
  </Card>
</CardGroup>


## OpenAPI

````yaml POST /v2/create_video_from_product
openapi: 3.0.1
info:
  title: JoggAI OpenAPI v2
  description: >
    JoggAI OpenAPI v2 provides a comprehensive suite of endpoints for creating
    and managing AI-powered video content.


    ## Authentication

    All API requests require authentication using an API key provided in the
    `x-api-key` header.


    ## Base URL

    Production: https://api.jogg.ai/v2


    ## Rate Limiting

    API calls are subject to rate limiting based on your subscription plan.


    ## Error Handling

    All endpoints return standard HTTP status codes along with detailed error
    messages in the response body.
  version: 2.0.0
  license:
    name: MIT
servers:
  - url: https://api.jogg.ai
    description: Production server
security:
  - apiKeyAuth: []
tags:
  - name: Video
    description: Video creation and management operations
  - name: Avatar
    description: Avatar management and creation operations
  - name: Voice
    description: Voice and timbre management operations
  - name: Asset
    description: Asset management including music, scripts, and uploads
  - name: Template
    description: Template management operations
  - name: Product
    description: Product management operations
  - name: User
    description: User account operations
  - name: Webhook
    description: Webhook endpoint management for event notifications
paths:
  /v2/create_video_from_product:
    post:
      tags:
        - Video
      summary: Generate Video from Product
      description: >
        Create a video from product information with customizable visual style,
        avatar, voice, and script.

        This is the final step after creating a product to generate the actual
        video.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - product_id
                - video_spec
                - avatar
                - voice
                - audio
                - script
              properties:
                product_id:
                  type: string
                  description: Product ID from product creation
                  example: NTIzMzc0NjI5
                visual_style:
                  type: string
                  description: Visual style name from visual list
                  example: Simple Product Switch
                video_spec:
                  type: object
                  description: Video specification settings
                  required:
                    - length
                  properties:
                    aspect_ratio:
                      type: string
                      description: Video aspect ratio
                      enum:
                        - portrait
                        - landscape
                        - square
                      default: landscape
                      example: landscape
                    length:
                      type: string
                      description: Video length in seconds
                      enum:
                        - '15'
                        - '30'
                        - '60'
                      example: '30'
                    caption:
                      type: boolean
                      description: Enable or disable subtitles
                      example: true
                    name:
                      type: string
                      description: Video name
                      example: My Product Video
                avatar:
                  type: object
                  description: Avatar configuration
                  required:
                    - id
                  properties:
                    id:
                      type: integer
                      description: Avatar ID
                      example: 1
                    type:
                      type: integer
                      description: |
                        Source type of the avatar:
                        * 0 - Public avatar
                        * 1 - Custom avatar
                      enum:
                        - 0
                        - 1
                      example: 0
                voice:
                  type: object
                  description: Voice configuration
                  properties:
                    id:
                      type: string
                      description: Voice ID for text-to-speech
                      example: en-US-ChristopherNeural
                audio:
                  type: object
                  description: Audio configuration
                  properties:
                    music_id:
                      type: integer
                      description: Background music ID
                      minimum: 0
                      example: 13
                script:
                  type: object
                  description: Script configuration
                  required:
                    - style
                    - language
                  properties:
                    style:
                      type: string
                      description: Script writing style
                      enum:
                        - Don't Worry
                        - Storytime
                        - Discovery
                        - Data
                        - Top 3 reasons
                        - Light marketing
                      example: Storytime
                    language:
                      type: string
                      description: Script generation language
                      example: english
                override_script:
                  type: string
                  description: Override the auto-generated script
                webhook_url:
                  type: string
                  description: Webhook URL for status notifications
                  format: uri
                  example: https://example.com/webhook
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BaseResponse'
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          video_id:
                            type: string
                            description: Created product video ID
                            example: video_789
                          status:
                            type: string
                            description: Video generation status
                            enum:
                              - processing
                              - completed
                              - failed
                            example: processing
components:
  schemas:
    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
          example: 0
        msg:
          type: string
          description: Response message
          example: Success
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication. Obtain your key from the JoggAI dashboard.

````