### Sora API Quick Start Guide Source: https://github.com/cporter202/automate-for-growth/blob/main/resources/README.md A guide to get started with the Sora API, covering account setup, authentication, and basic video generation. ```APIDOC ## Sora API Quick Start Guide ### Description This guide provides the essential steps to begin using the Sora API, including obtaining credentials and making your first API call. ### Getting Started 1. Sign up for API access 2. Get your API credentials 3. Review documentation 4. Make your first API call 5. Build your integration ### Authentication API requests must be authenticated using an API key provided upon signup. The key should be included in the `Authorization` header as a Bearer token. ### Basic Video Generation This section demonstrates how to generate a basic video using the Sora API. #### Method POST #### Endpoint `/v1/video/generate` #### Request Body - **prompt** (string) - Required - A description of the video content. - **duration** (integer) - Optional - The desired duration of the video in seconds. Defaults to 10. - **style** (string) - Optional - The visual style of the video. Defaults to 'professional'. ### Request Example ```json { "prompt": "A futuristic cityscape at sunset", "duration": 15, "style": "cinematic" } ``` ### Response #### Success Response (200) - **video_url** (string) - The URL of the generated video. - **status** (string) - The status of the video generation process. #### Response Example ```json { "video_url": "https://cdn.viralwavestudio.com/videos/example.mp4", "status": "processing" } ``` ``` -------------------------------- ### Example Tips Post Using Template Source: https://github.com/cporter202/automate-for-growth/blob/main/02-content-automation-fundamentals/README.md This is a concrete example of a 'Tips Post' filled out using the provided template structure. It demonstrates how to populate each section with specific content for productivity tips. ```text Hook: "Struggling to stay productive? These 3 simple changes transformed my entire workday..." Introduction: "I used to work 12-hour days and feel like I accomplished nothing. Then I discovered these three productivity hacks that changed everything..." Tip 1: "Time-block your calendar" - "Instead of a to-do list, schedule specific times for each task. Your brain knows exactly what to focus on." Tip 2: "Take strategic breaks" - "Work for 50 minutes, break for 10. Your brain needs rest to maintain focus." Tip 3: "Eliminate distractions" - "Put your phone in another room. Close unnecessary tabs. One focus = better results." Summary: "Try these three tips this week and watch your productivity soar!" Engagement Question: "Which tip are you going to try first? Let me know in the comments!" ``` -------------------------------- ### Example Usage of Content Pillar Strategy Source: https://context7.com/cporter202/automate-for-growth/llms.txt This example demonstrates how to initialize the ContentPillarStrategy class with a list of pillars and then generate a monthly content plan. The output is printed to the console. ```python # Example: Fitness Coach Content Pillars pillars = ContentPillarStrategy([ "home workouts", "nutrition for busy people", "motivation and mindset", "injury prevention", "success stories" ]) # Generate monthly content plan monthly_plan = pillars.generate_monthly_topics(posts_per_pillar=6) print("Monthly Content Plan:") print("=" * 50) for pillar, topics in monthly_plan.items(): print(f"\nšŸ“Œ {pillar.upper()}") for i, topic in enumerate(topics, 1): print(f" {i}. {topic}") ``` -------------------------------- ### Example Video Prompt Source: https://github.com/cporter202/automate-for-growth/blob/main/03-video-content-automation/README.md This is a concrete example of a well-structured prompt following the formula. It specifies location, action, style, and duration for a productivity-themed video. ```text A professional, modern office setting. A person working at a laptop with productivity tips visible on the screen. Clean, bright lighting. Smooth, slow camera movement. Professional and inspiring tone. 15 seconds. ``` -------------------------------- ### Python Example Usage of BulkContentGenerator Source: https://context7.com/cporter202/automate-for-growth/llms.txt Demonstrates how to instantiate the BulkContentGenerator, define topics, generate a specified number of posts, and print a preview of the first few generated posts. This example shows a practical application of the class. ```python # Example usage generator = BulkContentGenerator(brand_voice="friendly and motivational") topics = [ "time management", "productivity hacks", "morning routine", "goal setting", "work-life balance", "focus techniques", "energy management", "stress reduction", "habit building", "mindset shifts", "success strategies", "personal growth" ] posts = generator.generate_bulk_posts(topics, total_posts=12) print(f"Generated {len(posts)} posts for the month:") print("-" * 40) for post in posts[:3]: # Show first 3 print(f"\nPost #{post['id']} ({post['type'].upper()})") print(f"Topic: {post['topic']}") print(f"Content Preview: {post['content'][:100]}...") ``` -------------------------------- ### Example Usage of create_video_prompt Source: https://context7.com/cporter202/automate-for-growth/llms.txt Demonstrates creating multiple video prompts for different content types using the create_video_prompt function and printing them. ```python # Example usage prompts = [ create_video_prompt("educational", topic="time management", duration=15), create_video_prompt("product_showcase", product_name="wireless headphones", duration=10), create_video_prompt("motivational", duration=15), create_video_prompt("tips_tutorial", topic="productivity", duration=10) ] for i, prompt in enumerate(prompts, 1): print(f"Prompt {i}:\n{prompt}\n") ``` -------------------------------- ### Sora API Authentication Setup Source: https://github.com/cporter202/automate-for-growth/blob/main/resources/README.md Set up authentication headers for Sora API requests. Ensure your API key is kept secure. ```python import requests api_key = "your_api_key_here" headers = { "Authorization": f"Bearer {api_key}", "Content-Type": "application/json" } ``` -------------------------------- ### Python Example - Bulk Video Generation Source: https://github.com/cporter202/automate-for-growth/blob/main/resources/README.md This Python script demonstrates how to generate multiple videos in bulk using the Sora API, including error handling and rate limiting. ```APIDOC ## Bulk Video Generation with Python ### Description This script automates the process of generating multiple videos by iterating through a list of prompts. It includes basic error handling and a delay between requests to manage API rate limits. ### Method POST ### Endpoint `/v1/video/generate` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body (for each prompt) - **prompt** (string) - Required - A description of the video content. - **duration** (integer) - Optional - The desired duration of the video in seconds. Defaults to 10. - **style** (string) - Optional - The visual style of the video. Defaults to 'professional'. ### Request Example (within the loop) ```json { "prompt": "A serene forest landscape", "duration": 10, "style": "professional" } ``` ### Code Example ```python import requests import time def generate_videos(prompts, api_key): url = "https://api.viralwavestudio.com/v1/video/generate" headers = { "Authorization": f"Bearer {api_key}", "Content-Type": "application/json" } videos = [] for prompt in prompts: data = { "prompt": prompt, "duration": 10, "style": "professional" } response = requests.post(url, headers=headers, json=data) if response.status_code == 200: videos.append(response.json()) else: print(f"Error generating video: {response.text}") time.sleep(1) # Rate limiting return videos # Example Usage: # api_key = "your_api_key_here" # video_prompts = [ # "A cat playing with a ball of yarn", # "A drone shot of mountains", # "Abstract colorful patterns" # ] # generated_videos = generate_videos(video_prompts, api_key) # print(generated_videos) ``` ### Response #### Success Response (200) (for each video) - **video_url** (string) - The URL of the generated video. - **status** (string) - The status of the video generation process. #### Response Example (for each video) ```json { "video_url": "https://cdn.viralwavestudio.com/videos/generated_video_1.mp4", "status": "completed" } ``` ``` -------------------------------- ### How-To Guide Blog Post Outline Source: https://github.com/cporter202/automate-for-growth/blob/main/resources/README.md This outline provides a structure for creating 'how-to' blog posts. It includes sections for introduction, step-by-step instructions, common mistakes, and conclusion. ```text Title: How to [Achieve Goal] in [Timeframe] Introduction - Hook and relevance - What readers will learn - Why it matters Step 1: [First Step] - Explanation - Example - Tips Step 2: [Second Step] - Explanation - Example - Tips Step 3: [Third Step] - Explanation - Example - Tips Common Mistakes to Avoid - Mistake 1 - Mistake 2 - Mistake 3 Conclusion - Summary - Next steps - Call-to-action ``` -------------------------------- ### Video Scripting Templates Source: https://github.com/cporter202/automate-for-growth/blob/main/03-video-content-automation/README.md Use these templates as a starting point for structuring different types of video content. Adapt them to fit your specific goals and audience. ```text [Attention-grabbing opening] [Problem or question] [Promise of value] ``` ```text [Introduction and hook] [Main concept explanation] [Key points (3-5)] [Examples or demonstrations] [Summary and call-to-action] ``` ```text [Set the scene] [Introduce the challenge] [Show the journey] [Reveal the outcome] [Lesson or takeaway] ``` ```text [Introduce the topic] [Tip 1 with explanation] [Tip 2 with explanation] [Tip 3 with explanation] [Summary and engagement prompt] ``` -------------------------------- ### List Post Blog Outline Source: https://github.com/cporter202/automate-for-growth/blob/main/resources/README.md Use this outline for creating list-style blog posts. It includes a title format, introduction, detailed tips with explanations and examples, and a concluding summary. ```text Title: [Number] [Topic] Tips for [Audience] Introduction - Hook - Why this matters - What to expect Tip 1: [First Tip] - Explanation - Example - Actionable advice Tip 2: [Second Tip] - Explanation - Example - Actionable advice [Continue for all tips] Conclusion - Summary - Key takeaway - Call-to-action ``` -------------------------------- ### Generate Product Video using API Source: https://github.com/cporter202/automate-for-growth/blob/main/09-advanced-automation-api/README.md Use this Python function to generate a product showcase video. It takes product details and constructs a prompt for the video generation API. ```python def generate_product_video(product): prompt = f"Professional product showcase of {product.name}, {product.description}" video = api.generate_video( prompt=prompt, duration=10, style="ecommerce" ) return video ``` -------------------------------- ### GET /v1/video/status/{video_id} Source: https://context7.com/cporter202/automate-for-growth/llms.txt Check the processing status of a generated video and retrieve its URL if completed. ```APIDOC ## GET /v1/video/status/{video_id} ### Description Monitor the processing status of generated videos and retrieve completed video URLs. ### Method GET ### Endpoint https://api.viralwavestudio.com/v1/video/status/{video_id} ### Parameters #### Path Parameters - **video_id** (string) - Required - The unique identifier of the video to check. ### Response #### Success Response (200) - **status** (string) - The current processing status of the video (e.g., "processing", "completed", "failed"). - **video_url** (string) - The URL of the generated video if the status is "completed". - **progress** (integer) - The percentage of completion for the video processing. - **error** (string) - Description of the error if the status is "failed". #### Response Example ```json { "status": "completed", "video_url": "https://...", "progress": 100 } ``` ``` -------------------------------- ### Bulk Content Generation Workflow Source: https://context7.com/cporter202/automate-for-growth/llms.txt This is a placeholder comment indicating the start of a workflow for bulk content generation. No specific code is provided in this section. ```python # Bulk Content Generation Workflow ``` -------------------------------- ### Create Video Prompt from Template Source: https://context7.com/cporter202/automate-for-growth/llms.txt Generates a video prompt string by formatting a template with provided keyword arguments. Defaults to 15 seconds if duration is not specified. Falls back to the 'educational' template if the specified type is not found. ```python def create_video_prompt(template_type, **kwargs): """Generate a video prompt from template with custom values.""" kwargs.setdefault('duration', 15) template = VIDEO_PROMPT_TEMPLATES.get(template_type, VIDEO_PROMPT_TEMPLATES['educational']) return template.format(**kwargs).strip() ``` -------------------------------- ### Generate E-commerce Product Videos Source: https://context7.com/cporter202/automate-for-growth/llms.txt Use this class to generate professional product showcase videos for multiple products. Requires an API key and product details including name and description. ```python import requests api_key = "your_api_key_here" class ProductVideoGenerator: def __init__(self, api_key): self.api_key = api_key self.base_url = "https://api.viralwavestudio.com/v1" def generate_product_video(self, product): """Generate a professional product showcase video.""" prompt = f""" Professional product showcase of {product['name']}. {product['description']}. Clean white background with soft shadows. Smooth 360-degree rotation showing all angles. Professional studio lighting with subtle highlights. Modern, minimalist e-commerce style. """ headers = { "Authorization": f"Bearer {self.api_key}", "Content-Type": "application/json" } response = requests.post( f"{self.base_url}/video/generate", headers=headers, json={"prompt": prompt.strip(), "duration": 10, "style": "ecommerce"} ) return response.json() def batch_generate_product_videos(self, products): """Generate videos for multiple products.""" results = [] for product in products: video = self.generate_product_video(product) results.append({ "product_id": product['id'], "product_name": product['name'], "video_id": video['video_id'], "video_url": video['video_url'], "cost": video['cost'] }) print(f"Generated video for: {product['name']}") return results # Example usage generator = ProductVideoGenerator(api_key) products = [ {"id": "SKU001", "name": "Wireless Earbuds", "description": "Premium Bluetooth earbuds with noise cancellation"}, {"id": "SKU002", "name": "Smart Watch", "description": "Fitness tracker with heart rate monitoring"}, {"id": "SKU003", "name": "Portable Charger", "description": "10000mAh power bank with fast charging"} ] videos = generator.batch_generate_product_videos(products) # Output: # Generated video for: Wireless Earbuds # Generated video for: Smart Watch # Generated video for: Portable Charger # Total cost: $1.02 for 3 product videos ``` -------------------------------- ### Educational Content Post Template Source: https://github.com/cporter202/automate-for-growth/blob/main/resources/README.md This template is for creating educational social media posts. It includes a hook, explanation, key points, examples, tips, and an engagement question. ```text [Question/Problem hook] [Brief explanation] [Key points (3-5)] [Example/case study] [Actionable tip] [Engagement question] ``` -------------------------------- ### Product Showcase Video Script Template Source: https://github.com/cporter202/automate-for-growth/blob/main/resources/README.md This template is for creating video scripts to showcase products. It includes timing for hook, features, benefits, and a call-to-action. ```text Hook (0-2 seconds): [Product reveal] Features (2-8 seconds): [Key features demonstration] Benefits (8-12 seconds): [Value proposition] CTA (12-15 seconds): [Clear call-to-action] ``` -------------------------------- ### Define Video Prompt Templates Source: https://context7.com/cporter202/automate-for-growth/llms.txt A dictionary of prompt templates for different video content types. Uses placeholders like {topic} and {duration} that can be customized. ```python # Video Prompt Templates for Different Content Types VIDEO_PROMPT_TEMPLATES = { "educational": """ A professional, modern office setting with a person working at a laptop. The screen shows {topic} content clearly visible. Clean, bright natural lighting. Smooth, slow camera movement from side to center. Professional and inspiring tone. {duration} seconds. """, "product_showcase": """ A {product_name} on a clean white background with soft shadows. Smooth 360-degree rotation showing all angles. Professional studio lighting with subtle highlights. Modern, minimalist style. {duration} seconds. """, "motivational": """ Sunrise over a modern city skyline with warm golden light. Time-lapse effect showing the sun rising. Smooth, slow camera pan from left to right. Inspiring and uplifting mood. {duration} seconds. """, "behind_the_scenes": """ A cozy home workspace with a laptop, notebook, and coffee cup. Natural morning light streaming through a window. Camera slowly zooms in on the workspace. Warm, inviting atmosphere. {duration} seconds. """, "tips_tutorial": """ A clean desk with a notebook open showing handwritten tips. Hands writing with a pen, {topic} tips visible. Bright, professional lighting. Smooth camera movement focusing on the writing. Educational and helpful tone. {duration} seconds. """, "transformation": """ A person walking through a modern office. Transition from chaotic workspace to organized, productive area. Natural lighting with warm tones. Smooth camera following the person. Transformation and growth theme. {duration} seconds. " } ``` -------------------------------- ### Storytelling Video Script Template Source: https://github.com/cporter202/automate-for-growth/blob/main/resources/README.md Use this template for crafting storytelling video scripts. It guides through setting up the scene, introducing a challenge, detailing the journey, and providing a resolution and lesson. ```text Setup (0-3 seconds): [Scene setting] Challenge (3-6 seconds): [Problem introduction] Journey (6-10 seconds): [Process/transformation] Resolution (10-13 seconds): [Outcome] Lesson (13-15 seconds): [Takeaway] ``` -------------------------------- ### POST /v1/video/generate Source: https://context7.com/cporter202/automate-for-growth/llms.txt Generates AI-powered videos from text prompts. Offers significant cost savings compared to standard OpenAI pricing. ```APIDOC ## POST /v1/video/generate ### Description Generate professional AI-powered videos from text descriptions. The API provides 70% cost savings compared to standard OpenAI pricing (~$0.34 per 10-second video vs. $1.00+). ### Method POST ### Endpoint https://api.viralwavestudio.com/v1/video/generate ### Parameters #### Request Body - **prompt** (string) - Required - The text description for the video content. - **duration** (integer) - Optional - The desired duration of the video in seconds. Options: 10 or 15 seconds. - **style** (string) - Optional - The visual style of the video. Example: "professional", "cinematic". ### Request Example ```json { "prompt": "A professional office setting with a person working at a laptop, modern and clean, bright lighting, smooth camera movement", "duration": 10, "style": "professional" } ``` ### Response #### Success Response (200) - **video_id** (string) - Unique identifier for the generated video. - **status** (string) - The current processing status of the video (e.g., "processing", "completed", "failed"). - **video_url** (string) - The URL of the generated video once processing is complete. - **estimated_completion** (string) - An estimated timestamp for when the video will be ready. - **cost** (float) - The cost of generating the video. #### Response Example ```json { "video_id": "vid_123456", "status": "processing", "video_url": "https://...", "estimated_completion": "2024-01-01T12:00:00Z", "cost": 0.34 } ``` ``` -------------------------------- ### API Response Format Example Source: https://github.com/cporter202/automate-for-growth/blob/main/09-advanced-automation-api/README.md This JSON structure represents a typical response from the video generation API, including video ID, status, URL, estimated completion time, and cost. ```json { "video_id": "vid_123456", "status": "processing", "video_url": "https://...", "estimated_completion": "2024-01-01T12:00:00Z", "cost": 0.34 } ```