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

# AI Scripts

> Simply provide the product information or the product_id generated in the Upload URL to create product, and you can create several different styles of product introduction scripts.If you do not provide the product_id, then the product's name and description are required.



## OpenAPI

````yaml POST /ai_scripts
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:
  /ai_scripts:
    post:
      tags:
        - AI Scripts
      summary: Generate Scripts from product.
      description: >-
        Simply provide the product information or the product_id generated in
        the Upload URL to create product, and you can create several different
        styles of product introduction scripts.If you do not provide the
        product_id, then the product's name and description are required.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                product_id:
                  type: string
                  description: >-
                    Simply provide the product information or the product_id
                    generated at the "Upload URL to Create Product" endpoint,
                    and you can create several different styles of product
                    introduction scripts.
                  example: NTQ0MTkzNjg
                name:
                  type: string
                  description: Product name
                  example: >-
                    Owala FreeSip Insulated Stainless Steel Water Bottle with
                    Straw for Sports.
                description:
                  type: string
                  description: Product introduction and selling points
                  example: >-
                    Brush on a radiant blushing glow: Ultra-soft and blendable
                    blushing powder features a fresh and vibrant mix of blushing
                    tones infused with a pop of color to create a healthy glow.
                    Multi-reflective pearls provide a soft iridescence to
                    highlight contour and add radiance to cheeks. Experience the
                    mood boosting effect: Infused with our Happy Boost Blend
                    featuring Happy Skin and Euphoryl, natural plant extracts
                    which have been shown to promote a feeling of happiness by
                    mimicking the effect of Endorphins and helping protect the
                    skin from environmental stress. 
                target_audience:
                  type: string
                  description: Target audience for the product
                  example: ''
                video_length:
                  type: string
                  description: Video Length.
                  example: '15'
                  enum:
                    - '15'
                    - '30'
                    - '60'
                language:
                  type: string
                  description: >



                    Script generation language (defaults to English if not
                    specified):




                    * english - English




                    * filipino - Filipino




                    * french - French




                    * german - German




                    * hindi - Hindi




                    * indonesian - Indonesian




                    * italian - Italian




                    * japanese - Japanese




                    * korean - Korean




                    * malay - Malay




                    * portuguese - Portuguese




                    * russian - Russian




                    * spanish - Spanish




                    * thai - Thai




                    * vietnamese - Vietnamese




                    * arabic - Arabic




                    * greek - Greek




                    * turkish - Turkish




                    * slovenian - Slovenian




                    * croatian - Croatian




                    * romanian - Romanian




                    * chinese - Simplified Chinese




                    * bengali - Bengali




                    * urdu - Urdu




                    * hungarian - Hungarian




                    * traditional-chinese - Traditional Chinese




                    * polish - Polish




                    * cantonese - Cantonese




                    * danish - Danish




                    * malayalam - Malayalam




                    * tamil - Tamil




                    * telugu - Telugu




                    * czech - Czech




                    * hebrew - Hebrew




                    * zulu - Zulu




                    * swedish - Swedish




                    * lithuanian - Lithuanian




                    * dutch - Dutch




                    * flemish - Flemish




                    * norwegian - Norwegian




                    * finnish - Finnish




                    * bulgarian - Bulgarian




                    * latvian - Latvian




                    * ukrainian - Ukrainian




                    * mongolian - Mongolian




                    * persian - Persian




                    * odia - Odia




                    * assamese - Assamese




                    * kannada - Kannada




                    * tagalog - Tagalog




                    * amharic - Amharic




                    * serbian - Serbian




                    * slovak - Slovak




                    * swahili - Swahili
                  enum:
                    - english
                    - filipino
                    - french
                    - german
                    - hindi
                    - indonesian
                    - italian
                    - japanese
                    - korean
                    - malay
                    - portuguese
                    - russian
                    - spanish
                    - thai
                    - vietnamese
                    - arabic
                    - greek
                    - turkish
                    - slovenian
                    - croatian
                    - romanian
                    - chinese
                    - bengali
                    - urdu
                    - hungarian
                    - traditional-chinese
                    - polish
                    - cantonese
                    - danish
                    - malayalam
                    - tamil
                    - telugu
                    - czech
                    - hebrew
                    - zulu
                    - swedish
                    - lithuanian
                    - dutch
                    - flemish
                    - norwegian
                    - finnish
                    - bulgarian
                    - latvian
                    - ukrainian
                    - mongolian
                    - persian
                    - odia
                    - assamese
                    - kannada
                    - tagalog
                    - amharic
                    - serbian
                    - slovak
                    - swahili
                  default: english
                  example: english
              required:
                - language
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BaseResponse'
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          generated_scripts:
                            type: array
                            items:
                              type: object
                              properties:
                                script_paragraphs:
                                  type: string
                                  description: Script Paragraphs.
                                  default: >-
                                    Ever tried drinking water while running?
                                    It's like a comedy show!You either spill it
                                    all over or look like a fish out of
                                    water.Then I found the Owala FreeSip
                                    bottle—game changer.
                                  example: >-
                                    Ever tried drinking water while running?
                                    It's like a comedy show!You either spill it
                                    all over or look like a fish out of
                                    water.Then I found the Owala FreeSip
                                    bottle—game changer.
                                script_style:
                                  type: string
                                  description: Script Style.
                                  default: Storytime.
                                  example: Storytime.
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
        msg:
          type: string
          description: Response message
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.