Skip to main content

AI Script Writer

Generate scripts in multiple formats: YouTube long-form, YouTube Shorts, X threads, LinkedIn posts, and image captions.

CLI Quickstart

praisonai recipe run ai-script-writer \
  --input '{"topic": "AI agents", "format": "youtube_long", "target_length": 300}' \
  --json

Use in Your App (SDK)

import sys
sys.path.insert(0, 'agent_recipes/templates/ai-script-writer')
from tools import write_youtube_script, write_short_script, write_thread

# YouTube long-form script
script = write_youtube_script(
    topic="AI agents are changing software development",
    target_length=300,
    key_points=["automation", "productivity", "future"]
)

# YouTube Short script
short = write_short_script("AI agents", duration=30)

# X thread
thread = write_thread("AI agents", num_tweets=5)

Input Schema

{
  "type": "object",
  "properties": {
    "topic": {"type": "string"},
    "format": {
      "type": "string",
      "enum": ["youtube_long", "youtube_short", "thread", "linkedin", "caption"]
    },
    "target_length": {"type": "integer"},
    "key_points": {"type": "array"}
  }
}

Output Schema

{
  "script": "[HOOK - 0:00]\nDid you know...",
  "format": "youtube_long",
  "estimated_duration": 300,
  "sections": ["hook", "intro", "main", "cta"]
}

Supported Formats

FormatDescriptionTypical Length
youtube_longFull YouTube video5-15 minutes
youtube_shortYouTube Shorts30-60 seconds
threadX/Twitter thread5-10 tweets
linkedinLinkedIn post1000-2000 chars
captionImage caption100-300 chars

Environment Variables

VariableRequiredDescription
OPENAI_API_KEYYesFor script generation