> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slidevid.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Videos vs Templates

> Understand the difference between creating videos from scratch and using templates

## Overview

SlideVid offers two distinct ways to create AI videos, each designed for different use cases:

<CardGroup cols={2}>
  <Card title="Videos" icon="video">
    Create unique, one-off videos with custom scripts
  </Card>

  <Card title="Templates" icon="clone">
    Create reusable video structures for personalization at scale
  </Card>
</CardGroup>

## Videos (Create from Scratch)

Videos are created from scratch with all parameters specified for a single, unique piece of content.

### When to Use Videos

<AccordionGroup>
  <Accordion title="Unique Content" icon="sparkles">
    Each video needs a completely different script, avatar, or style

    **Example**: Creating distinct tutorial videos for different products
  </Accordion>

  <Accordion title="One-Time Use" icon="circle-1">
    You need a single video without plans to replicate the structure

    **Example**: A company announcement or product launch video
  </Accordion>

  <Accordion title="Full Control" icon="sliders">
    You want complete control over every aspect of the video

    **Example**: High-value marketing content with specific requirements
  </Accordion>
</AccordionGroup>

### How Videos Work

```javascript theme={null}
// Create a single video from scratch
const response = await fetch('/api/v1/project/create', {
  method: 'POST',
  headers: {
    'x-api-key': API_KEY,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    type: 'class',
    script: 'Welcome to our product tour...',
    avatarId: 'avatar_sarah_01',
    voiceId: 'voice_123',
    aspectRatio: 'ratio_9_16',
    webhook: 'https://yoursite.com/webhook'
  })
});
```

## Templates (Reusable Structures)

Templates are pre-configured video structures with `{{variables}}` that can be replaced to create personalized versions at scale.

### When to Use Templates

<AccordionGroup>
  <Accordion title="Personalization at Scale" icon="users">
    Create thousands of personalized videos for different customers

    **Example**: Welcome videos with each customer's name and subscription details
  </Accordion>

  <Accordion title="Consistent Branding" icon="palette">
    Maintain consistent style while customizing content

    **Example**: Real estate videos with different property details but same structure
  </Accordion>

  <Accordion title="Bulk Generation" icon="layer-group">
    Generate multiple videos efficiently without recreating everything

    **Example**: Course videos with different lesson numbers and topics
  </Accordion>

  <Accordion title="Dynamic Content" icon="rotate">
    Content changes frequently but structure remains the same

    **Example**: Daily market updates with changing data but same format
  </Accordion>
</AccordionGroup>

### How Templates Work

**Step 1: Create Template** (in Dashboard)

```
Scene 1: "Hello {{name}}! Welcome to {{company}}."
Scene 2: "Your {{plan}} subscription includes {{features}}."
```

**Step 2: Generate Videos** (via API)

```javascript theme={null}
// Generate personalized videos for each customer
for (const customer of customers) {
  await fetch('/api/v1/project/create', {
    method: 'POST',
    headers: {
      'x-api-key': API_KEY,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      type: 'class',
      templateId: 'template_123',
      scenes: [
        {
          script: `Hello {{name}}! Welcome to {{company}}.`,
          variables: [
            { key: 'name', value: customer.name },
            { key: 'company', value: customer.company }
          ]
        },
        {
          script: `Your {{plan}} subscription includes {{features}}.`,
          variables: [
            { key: 'plan', value: customer.plan },
            { key: 'features', value: customer.features }
          ]
        }
      ]
    })
  });
}
```

## Comparison Table

| Feature             | Videos (From Scratch)                                                                | Templates                                                                           |
| ------------------- | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------- |
| **Use Case**        | Unique, one-off content                                                              | Personalized, scalable content                                                      |
| **Setup Time**      | Quick for single videos                                                              | Requires initial template setup                                                     |
| **Bulk Generation** | ❌ Manual for each video                                                              | ✅ Automated with variable replacement                                               |
| **Consistency**     | Varies per video                                                                     | Consistent structure                                                                |
| **Personalization** | Full custom content                                                                  | Variable-based customization                                                        |
| **API Complexity**  | Simple                                                                               | Moderate (scenes + variables)                                                       |
| **Best For**        | <ul><li>Product launches</li><li>Unique campaigns</li><li>One-time content</li></ul> | <ul><li>Customer onboarding</li><li>Sales outreach</li><li>Course content</li></ul> |

## Real-World Examples

### Example 1: Videos (From Scratch)

**Scenario**: Creating a product launch video

```javascript theme={null}
// Single, unique video for product launch
await createVideo({
  type: 'class',
  script: `
    Introducing our revolutionary new AI platform! 
    After 2 years of development, we're excited to share 
    how it will transform your workflow...
  `,
  avatarId: 'ceo_avatar',
  voiceId: 'professional_voice',
  aspectRatio: 'ratio_16_9'
});
```

### Example 2: Templates

**Scenario**: Welcome videos for 10,000 new customers

```javascript theme={null}
// Get template
const template = await getTemplate('welcome_template');

// Generate for all customers
const customers = await getNewCustomers(); // 10,000 customers

for (const customer of customers) {
  await generateFromTemplate(template.id, {
    name: customer.name,
    email: customer.email,
    plan: customer.subscriptionPlan,
    trial_days: customer.trialDays
  });
}
```

## Migration Path

<Steps>
  <Step title="Start with Videos">
    Create your first videos from scratch to understand the API
  </Step>

  <Step title="Identify Patterns">
    Notice when you're creating similar videos repeatedly
  </Step>

  <Step title="Convert to Template">
    Create a template in the dashboard with variables for repeated elements
  </Step>

  <Step title="Scale with Templates">
    Use the template API to generate personalized versions at scale
  </Step>
</Steps>

## Cost Considerations

<Info>
  Both videos and templates consume the same credits per generation. Templates are more cost-effective when creating many similar videos because they reduce development time, not video generation costs.
</Info>

## Next Steps

<CardGroup cols={2}>
  <Card title="Create Your First Video" icon="play" href="/api-reference/video/create">
    Start with a simple video from scratch
  </Card>

  <Card title="Use Templates" icon="clone" href="/guides/scenes-and-variables">
    Learn about scenes and variables for templates
  </Card>
</CardGroup>
