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

# Video Creation Workflow

> Complete guide to creating professional videos with Babou

## Overview

From idea to export in six steps. This guide covers the complete video creation process - plan, build, review, ship. Works the same whether you're using the REST API or MCP server.

## The Video Creation Process

<Steps>
  <Step title="Plan Your Video">
    Define the structure, duration, and content for your video
  </Step>

  <Step title="Create a Project">
    Set up a project container to organize your work
  </Step>

  <Step title="Add Chapters">
    Break your video into logical segments
  </Step>

  <Step title="Create Content">
    Submit prompts to create video content for each chapter
  </Step>

  <Step title="Review & Refine">
    Iterate on content until you're satisfied
  </Step>

  <Step title="Export">
    Render the final video for download
  </Step>
</Steps>

## Step 1: Plan Your Video

Before creating anything, plan your video structure:

### Define Your Goals

* **Purpose**: What is this video for? (marketing, tutorial, social media, etc.)
* **Audience**: Who will watch it?
* **Message**: What's the key takeaway?
* **Duration**: How long should it be?

### Create a Storyboard

Break your video into logical segments (chapters):

**Example: Pricing Page Refresh launch ad (30 seconds)**

1. **Hook** (5s) - Headline pulled from the latest release notes
2. **Tier Breakdown** (12s) - Walkthrough of the new pricing screenshot
3. **Why Now** (8s) - The reason this tier matters for product teams
4. **CTA** (5s) - Pricing page button, copy and color matched

### What you bring in

The inputs are real product surfaces, not stock imagery:

* The release note for the tier
* The new pricing page screenshot, or its URL
* Brand assets (logo, type, palette), already in your catalog if you've connected one
* Anything specific the chapter needs (a product screenshot, a Figma frame, a customer logo)

Upload custom assets using the [Assets API](/api-reference/assets/upload). If you've connected your catalog, brand colors and type resolve automatically. no upload needed.

## Step 2: Create a Project

Every video starts with a project:

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://api.babou.ai/api/v1/projects \
    -H "Authorization: Bearer $BABOU_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Pricing Page Refresh",
      "description": "30-second launch ad for the new Team tier"
    }'
  ```

  ```typescript TypeScript theme={null}
  const project = await fetch('https://api.babou.ai/api/v1/projects', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.BABOU_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      name: 'Pricing Page Refresh',
      description: '30-second launch ad for the new Team tier'
    })
  }).then(r => r.json());

  console.log('Project ID:', project.id);
  ```
</CodeGroup>

<Tip>
  Use descriptive names and detailed descriptions to keep projects organized, especially when managing multiple videos.
</Tip>

## Step 3: Add Chapters

Create chapters for each segment of your video:

<CodeGroup>
  ```typescript TypeScript theme={null}
  const chapters = [
    { name: 'Hook', duration: 5 },
    { name: 'Tier Breakdown', duration: 12 },
    { name: 'Why Now', duration: 8 },
    { name: 'CTA', duration: 5 }
  ];

  for (const chapter of chapters) {
    const result = await fetch(
      `https://api.babou.ai/api/v1/projects/${project.id}/chapters`,
      {
        method: 'POST',
        headers: {
          'Authorization': `Bearer ${process.env.BABOU_API_KEY}`,
          'Content-Type': 'application/json'
        },
        body: JSON.stringify(chapter)
      }
    ).then(r => r.json());

    console.log(`✓ Created: ${result.name} (${result.duration}s)`);
  }
  ```

  ```python Python theme={null}
  chapters = [
      {'name': 'Hook', 'duration': 5},
      {'name': 'Tier Breakdown', 'duration': 12},
      {'name': 'Why Now', 'duration': 8},
      {'name': 'CTA', 'duration': 5}
  ]

  for chapter in chapters:
      response = requests.post(
          f'https://api.babou.ai/api/v1/projects/{project["id"]}/chapters',
          headers={
              'Authorization': f'Bearer {os.environ["BABOU_API_KEY"]}',
              'Content-Type': 'application/json'
          },
          json=chapter
      )
      result = response.json()
      print(f'✓ Created: {result["name"]} ({result["duration"]}s)')
  ```
</CodeGroup>

## Step 4: Create Content

Submit prompts to create video content for each chapter:

### Writing Effective Prompts

<AccordionGroup>
  <Accordion title="Anchor on the product surface" icon="link">
    **Bad:**

    ```
    Create a hook for the launch
    ```

    **Good:**

    ```
    5-second hook for our pricing page launch:
    - Lead with the headline from release note v2.4
      ("Team plan: built for product teams that ship daily")
    - Background: subtle motion of the new pricing page
    - End on the Team tier card, ready to push into the next chapter
    ```
  </Accordion>

  <Accordion title="Include timing and pacing" icon="clock">
    ```
    12-second tier breakdown:
    - 0-3s: Pricing page hero shot, panning to the Team column
    - 3-7s: Three core inclusions appear one at a time
    - 7-10s: Price + billing toggle highlight
    - 10-12s: Transition to "Why Now"
    ```
  </Accordion>

  <Accordion title="Lean on the catalog for brand" icon="palette">
    ```
    Use the catalog defaults:
    - Brand color, type, and motion language already on file
    - Pull the accent color from the pricing CTA button so the
      ad matches the page it's promoting
    ```

    If you haven't connected a catalog yet, you can pass brand details inline. Once it's connected, this section is one line.
  </Accordion>

  <Accordion title="Reference uploaded assets" icon="image">
    ```
    Use the new pricing screenshot (uploaded as ast_pricingV2)
    and the headline from release note v2.4. Match the style from
    babou.ai/pricing.
    ```
  </Accordion>
</AccordionGroup>

### Submit Prompts

<CodeGroup>
  ```typescript TypeScript theme={null}
  const prompts = {
    'Hook': `
      5-second hook for the Team tier launch.
      - Lead with the headline from release note v2.4
      - Subtle motion of the new pricing page in the background
      - Resolve brand color and type from the catalog
      - End on the Team tier card, ready to push into the breakdown
    `,
    'Tier Breakdown': `
      12-second walkthrough of the new Team tier.
      - 0-3s: pan across the new pricing page, focus on the Team column
      - 3-7s: three core inclusions appear one at a time
      - 7-10s: price plus billing toggle highlight
      - 10-12s: transition into "Why Now"
    `,
    'Why Now': `
      8 seconds on why this matters for product teams.
      - One-line value prop, pulled from the launch summary
      - Light motion graphic from the catalog (Block: stat-callout)
      - Confident, on-brand pacing
    `
    // ...CTA chapter follows the same shape
  };

  // Get chapters
  const chaptersResponse = await fetch(
    `https://api.babou.ai/api/v1/projects/${project.id}/chapters`,
    {
      headers: { 'Authorization': `Bearer ${process.env.BABOU_API_KEY}` }
    }
  ).then(r => r.json());

  // Submit prompts
  for (const chapter of chaptersResponse.chapters) {
    if (prompts[chapter.name]) {
      await fetch(
        `https://api.babou.ai/api/v1/projects/${project.id}/chapters/${chapter.id}/prompt`,
        {
          method: 'POST',
          headers: {
            'Authorization': `Bearer ${process.env.BABOU_API_KEY}`,
            'Content-Type': 'application/json'
          },
          body: JSON.stringify({
            content: prompts[chapter.name]
          })
        }
      );
      console.log(`✓ Submitted prompt for: ${chapter.name}`);

      // Wait 60 seconds for processing
      await new Promise(r => setTimeout(r, 60000));
    }
  }
  ```
</CodeGroup>

## Step 5: Review & Refine

### Check Chapter Status

Monitor the processing status:

```typescript theme={null}
async function checkChapterStatus(projectId: string, chapterId: string) {
  const chapter = await fetch(
    `https://api.babou.ai/api/v1/projects/${projectId}/chapters/${chapterId}`,
    {
      headers: { 'Authorization': `Bearer ${process.env.BABOU_API_KEY}` }
    }
  ).then(r => r.json());

  const latestPrompt = chapter.prompts[chapter.prompts.length - 1];

  return {
    chapterName: chapter.name,
    status: latestPrompt?.status || 'no_content',
    promptContent: latestPrompt?.content
  };
}
```

### Iterate on Content

If you want to refine a chapter, submit a new prompt:

```typescript theme={null}
// Update a chapter with new prompt
await fetch(
  `https://api.babou.ai/api/v1/projects/${projectId}/chapters/${chapterId}/prompt`,
  {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.BABOU_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      content: 'Updated prompt with faster pacing and brighter colors',
      force: true  // Override previous prompt
    })
  }
);
```

## Step 6: Export

Once all chapters are complete, export the final video:

```typescript theme={null}
// Start export
await fetch(
  `https://api.babou.ai/api/v1/projects/${projectId}/export`,
  {
    method: 'POST',
    headers: { 'Authorization': `Bearer ${process.env.BABOU_API_KEY}` }
  }
);

// Poll for completion
async function waitForExport(projectId: string) {
  while (true) {
    const status = await fetch(
      `https://api.babou.ai/api/v1/projects/${projectId}/export`,
      {
        headers: { 'Authorization': `Bearer ${process.env.BABOU_API_KEY}` }
      }
    ).then(r => r.json());

    if (status.status === 'completed') {
      console.log('✓ Export complete!');
      console.log(`Download: ${status.download_url}`);
      return status;
    }

    if (status.status === 'failed') {
      throw new Error('Export failed');
    }

    console.log(`Status: ${status.status}...`);
    await new Promise(r => setTimeout(r, 10000)); // Wait 10s
  }
}

await waitForExport(projectId);
```

## Best Practices

### 1. Start Simple

Begin with a simple structure and iterate:

```
1. Create project
2. Add 1-2 chapters
3. Test with basic prompts
4. Refine and expand
```

### 2. Use Templates

Create reusable templates for common video types:

```typescript theme={null}
const templates = {
  launchAd: ['Hook', 'Tier Breakdown', 'Why Now', 'CTA'],
  featureDemo: ['Open', 'Walkthrough', 'Wins', 'CTA'],
  socialCut: ['Hook', 'Punchline', 'CTA']
};

function createFromTemplate(template: string[]) {
  // Create chapters from template
}
```

### 3. Batch Process

For multiple similar videos, batch process:

```python theme={null}
templates = [
    {'name': 'Social Post 1', 'topic': 'Feature A'},
    {'name': 'Social Post 2', 'topic': 'Feature B'},
    {'name': 'Social Post 3', 'topic': 'Feature C'}
]

for template in templates:
    # Create project
    # Add chapters
    # Submit prompts
    # Export
```

### 4. Version Control

Keep track of iterations:

```typescript theme={null}
const projectName = `Product Video v${version}`;
// or
const projectName = `Product Video - ${new Date().toISOString().split('T')[0]}`;
```

## Common Patterns

### Pattern 1: Rapid Prototyping

```typescript theme={null}
// Quick test of video concept
const project = await createProject('Quick Test v1');
const chapter = await addChapter(project.id, 'Test', 15);
await submitPrompt(project.id, chapter.id, 'Simple test content');
```

### Pattern 2: Progressive Enhancement

```typescript theme={null}
// Start basic, add detail
const project = await createProject('Product Video');

// V1: Basic structure
await addChapter(project.id, 'Intro', 10);
await submitPrompt(..., 'Simple intro');

// V2: Add more chapters
await addChapter(project.id, 'Features', 30);
await submitPrompt(..., 'Feature showcase');

// V3: Refine content
await submitPrompt(..., 'Enhanced intro with animations', { force: true });
```

### Pattern 3: Conditional Content

```typescript theme={null}
// Different content based on audience
const audience = 'technical'; // or 'general'

const prompt = audience === 'technical'
  ? 'Detailed technical architecture overview with code examples'
  : 'High-level benefits overview with simple visuals';

await submitPrompt(projectId, chapterId, prompt);
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Asset Management" icon="folder" href="/guides/asset-management">
    Learn how to upload and use custom assets
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation" href="/guides/error-handling">
    Handle errors gracefully in your workflows
  </Card>

  <Card title="API Reference" icon="book" href="/api-reference/overview">
    Complete API documentation
  </Card>

  <Card title="MCP Server" icon="plug" href="/mcp/overview">
    Use MCP for conversational workflows
  </Card>
</CardGroup>
