Skip to main content
POST
/
v2
/
ai_scripts
Submit AI script generation request
curl --request POST \
  --url https://api.jogg.ai/v2/ai_scripts \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "language": "english",
  "video_length_seconds": "30",
  "script_style": "Storytime",
  "product_info": {
    "source_type": "id",
    "data": {
      "id": "NTQ0MTkzNjg",
      "name": "Owala FreeSip Insulated Stainless Steel Water Bottle",
      "description": "The Owala FreeSip bottle is perfect for active lifestyles..."
    }
  },
  "target_audience": "Fitness enthusiasts and outdoor adventurers"
}
'
{
  "code": 0,
  "msg": "Success",
  "data": {
    "task_id": "task_123456789"
  }
}
Generate AI-powered video scripts based on product information. The AI will create multiple script variations optimized for your video duration.

Example Usage

Using Product ID

curl --request POST \
  --url 'https://api.jogg.ai/v2/ai_scripts' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "language": "english",
    "video_length_seconds": "30",
    "script_style": "Storytime",
    "product_info": {
      "source_type": "id",
      "data": {
        "id": "NTQ0MTkzNjg"
      }
    }
  }'

Using Product Details

curl --request POST \
  --url 'https://api.jogg.ai/v2/ai_scripts' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "language": "english",
    "video_length_seconds": "30",
    "script_style": "Discovery",
    "product_info": {
      "source_type": "details",
      "data": {
    "name": "Amazing Smart Watch",
        "description": "A smartwatch with health tracking, fitness monitoring, and smart notifications"
      }
    },
    "target_audience": "Fitness enthusiasts and tech-savvy consumers"
  }'

Authorizations

x-api-key
string
header
required

API key for authentication. Obtain your key from the JoggAI dashboard.

Body

application/json
language
enum<string>
required

Script generation language

Available options:
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
Example:

"english"

video_length_seconds
enum<string>
required

Desired video length in seconds

Available options:
15,
30,
60
Example:

"30"

script_style
enum<string>
required

Script writing style for video content:

  • Don't Worry - Casual and reassuring tone
  • Storytime - Narrative and engaging storytelling approach
  • Discovery - Exploratory and revealing style
  • Data - Fact-based and analytical presentation
  • Top 3 reasons - List-based persuasive format
  • Light marketing - Soft-sell marketing approach
Available options:
Don't Worry,
Storytime,
Discovery,
Data,
Top 3 reasons,
Light marketing
Example:

"Storytime"

product_info
object
required

Product information for script generation

target_audience
string

Target audience for the product (optional)

Example:

"Fitness enthusiasts and outdoor adventurers"

Response

200 - application/json

Success

code
integer
required

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
string
required

Response message

Example:

"Success"

data
object