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

# Introduction

> Get started with the Pictory API to create videos programmatically

Welcome to the Pictory API. This guide will help you get started with automated video creation. Whether you are building an application, automating your content workflow, or integrating video capabilities into your platform, the Pictory API makes it straightforward.

> [!NOTE]
>
> **Creating videos through an AI assistant?** The [Pictory MCP connector](https://docs.pictory.ai/claude-mcp/overview.md)
> uses your Pictory sign-in. You do not need an API key or an API subscription.
>
> * Pictory 2 users can create **only Standard Pictory videos** through MCP.
> * Pictory 3 users get **Pictory 3 videos by default** and can create **only Pictory 3 videos** through MCP.
> * To move from Pictory 2, contact Pictory support to enable Pictory 3 for your account.
>   **After the move, you cannot switch back to Pictory 2.**
> * Pictory 3 rendering costs **200 AI Credits per video minute** on plans that charge
>   render credits. See [credits and rendering](https://docs.pictory.ai/claude-mcp/motion-graphics.md#credits-and-rendering)
>   for repeat renders and plan exemptions.
>
> The API subscription and API key steps below are for direct API use, not the MCP connector.

## What You Can Do

> [card] Text to Video
>
> Turn written content into engaging videos with visuals

> [card] AI Storyboard
>
> Let AI design every scene with layouts, on-screen text, and color palettes

> [card] Blog to Video
>
> Transform blog articles into video content automatically

> [card] PowerPoint to Video
>
> Convert presentations into shareable videos

> [card] Video Highlights
>
> Extract short clips from long videos

> [card] AI Voice-Overs
>
> Add natural-sounding narration to your videos

> [card] Subtitles & Captions
>
> Generate and customize subtitles in multiple languages

> [card] Branding
>
> Maintain consistent brand styling across all your videos

> [card] Integrations
>
> Auto-upload to AWS S3, Vimeo, and more

## What You Need

**1. A Pictory Account**

Sign up for free at [app.pictory.ai](https://app.pictory.ai) if you do not have one

**2. An API Subscription**

Choose a plan that fits your usage from the [API Subscription](https://app.pictory.ai/api-access) page

**3. Your API Key**

Your unique authentication credential for API access. Details below

## Step 1: Create Your Account & Subscribe

Follow these steps to set up your account:

1. Get started by creating a free account at [Pictory](https://app.pictory.ai)
2. Click on your profile picture in the top-right corner
3. Select [API Subscription](https://app.pictory.ai/api-access) from the menu
4. Choose a plan based on how many videos you plan to create per month
5. Complete the purchase to activate your API access

![How to buy API subscription](https://mintcdn.com/pictory/Ke4wsQHfnOm3AR96/images/how_to_buy_api_subscription.png?fit=max\&auto=format\&n=Ke4wsQHfnOm3AR96\&q=85\&s=8b439cd048ac976f5b894d8f667921dc)

## Step 2: Get Your API Key

Once you have an active subscription, you can find your API Key:

1. Go to the [API Subscription](https://app.pictory.ai/api-access) page in your Pictory account
2. Your API Key will be displayed on this page
3. Click the **Copy** button to copy it to your clipboard
4. Save it securely; you need it for every API request

![API Subscription Page showing API Key](https://mintcdn.com/pictory/Ke4wsQHfnOm3AR96/images/api-key-access.png?fit=max\&auto=format\&n=Ke4wsQHfnOm3AR96\&q=85\&s=ec9a79062f764c98edb0c4250b6d2fc2)

> [!WARNING]
>
> **Keep your API Key secure!**
>
> Treat it like a password. Never share it publicly or include it in client-side code that users can see. Anyone with your API Key can create videos using your account.

## Step 3: Make Your First API Call

The following example demonstrates creating a video from text content:

1. **Include your API Key** in the `Authorization` request header for authentication
2. **Specify a video name** and provide the text content
3. **Receive a job ID**: the API returns this immediately for tracking the asynchronous rendering process

Video rendering is asynchronous. The API returns a job ID that you can use to poll for completion status.

```javascript Node.js theme={null}
import axios from "axios";

const API_BASE_URL = "https://api.pictory.ai/pictoryapis";
const API_KEY = "YOUR_API_KEY"; // Replace with your actual API Key

async function createVideo() {
  try {
    const response = await axios.post(
      `${API_BASE_URL}/v2/video/storyboard/render`,
      {
        videoName: "my_first_video",
        scenes: [
          {
            story: "Welcome to Pictory! This is my first video created with the API.",
            createSceneOnNewLine: true,
            createSceneOnEndOfSentence: true,
          },
        ],
      },
      {
        headers: {
          "Content-Type": "application/json",
          Authorization: API_KEY, // Use API Key directly
        },
      }
    );

    console.log("Job created:", response.data.data.jobId);
    return response.data;
  } catch (error) {
    console.error("Error:", error.response?.data || error.message);
    throw error;
  }
}

createVideo();
```

```python Python theme={null}
import requests

API_BASE_URL = 'https://api.pictory.ai/pictoryapis'
API_KEY = 'YOUR_API_KEY'  # Replace with your actual API Key

def create_video():
    response = requests.post(
        f'{API_BASE_URL}/v2/video/storyboard/render',
        json={
            'videoName': 'my_first_video',
            'scenes': [
                {
                    'story': 'Welcome to Pictory! This is my first video created with the API.',
                    'createSceneOnNewLine': True,
                    'createSceneOnEndOfSentence': True
                }
            ]
        },
        headers={
            'Content-Type': 'application/json',
            'Authorization': API_KEY  # Use API Key directly
        }
    )
    response.raise_for_status()

    print(f"Job created: {response.json()['data']['jobId']}")
    return response.json()

if __name__ == '__main__':
    create_video()
```

## Let AI Design the Video (AI Storyboard)

The example above creates a standard video: a full-screen visual per scene with subtitles. Add `aiStoryboard: { "enabled": true }` to the same request and the AI designs every scene instead, choosing a layout, on-screen text elements, and a color palette. Everything else in the request, such as voice-over, branding, and background settings, still applies.

### From Your Own Script

```javascript Node.js theme={null}
const response = await axios.post(
  `${API_BASE_URL}/v2/video/storyboard/render`,
  {
    videoName: "my_first_ai_storyboard",
    aiStoryboard: { enabled: true },
    aspectRatio: "16:9",
    voiceOver: {
      enabled: true,
      aiVoices: [{ speaker: "Brian" }],
    },
    scenes: [
      {
        story:
          "Creating videos used to take hours. " +
          "Pictory turns a script into a finished video in minutes. " +
          "Paste your text, pick a voice, and let the AI handle the visuals.",
      },
    ],
  },
  {
    headers: {
      "Content-Type": "application/json",
      Authorization: API_KEY,
    },
  }
);

console.log("Job created:", response.data.data.jobId);
```

```python Python theme={null}
response = requests.post(
    f'{API_BASE_URL}/v2/video/storyboard/render',
    json={
        'videoName': 'my_first_ai_storyboard',
        'aiStoryboard': {'enabled': True},
        'aspectRatio': '16:9',
        'voiceOver': {
            'enabled': True,
            'aiVoices': [{'speaker': 'Brian'}]
        },
        'scenes': [
            {
                'story': (
                    'Creating videos used to take hours. '
                    'Pictory turns a script into a finished video in minutes. '
                    'Paste your text, pick a voice, and let the AI handle the visuals.'
                )
            }
        ]
    },
    headers={
        'Content-Type': 'application/json',
        'Authorization': API_KEY
    }
)
response.raise_for_status()

print(f"Job created: {response.json()['data']['jobId']}")
```

Each sentence becomes a designed scene. Your text is used word for word as the narration.

### From a Single Idea

Do not have a script? Describe the video in a `brief` and the AI writes the narration and designs the storyboard in one pass:

```javascript Node.js theme={null}
const response = await axios.post(
  `${API_BASE_URL}/v2/video/storyboard/render`,
  {
    aiStoryboard: { enabled: true },
    aspectRatio: "16:9",
    voiceOver: {
      enabled: true,
      aiVoices: [{ speaker: "Brian" }],
    },
    scenes: [
      {
        brief: {
          prompt: "Create a 1 minute explainer video that simplifies video creation for beginners.",
          videoGoal: "Explainer",
          tone: "friendly",
          duration: 60,
        },
      },
    ],
  },
  {
    headers: {
      "Content-Type": "application/json",
      Authorization: API_KEY,
    },
  }
);

console.log("Job created:", response.data.data.jobId);
```

```python Python theme={null}
response = requests.post(
    f'{API_BASE_URL}/v2/video/storyboard/render',
    json={
        'aiStoryboard': {'enabled': True},
        'aspectRatio': '16:9',
        'voiceOver': {
            'enabled': True,
            'aiVoices': [{'speaker': 'Brian'}]
        },
        'scenes': [
            {
                'brief': {
                    'prompt': 'Create a 1 minute explainer video that simplifies video creation for beginners.',
                    'videoGoal': 'Explainer',
                    'tone': 'friendly',
                    'duration': 60
                }
            }
        ]
    },
    headers={
        'Content-Type': 'application/json',
        'Authorization': API_KEY
    }
)
response.raise_for_status()

print(f"Job created: {response.json()['data']['jobId']}")
```

> [!TIP]
>
> The [AI Storyboard guide](https://docs.pictory.ai/guides/text-to-video/ai-storyboard.md) walks through the full workflow, the `brief` fields, and how visuals, branding, and avatars apply to designed scenes.

## Step 4: Check When Your Video is Ready

Since video rendering is asynchronous, poll the job status endpoint to determine when your video is ready:

1. **Use the job ID from Step 3** to query the current status
2. **Poll the status endpoint every 10–30 seconds** until rendering completes
3. **When status is `completed`**: the response will include your video download URL

```javascript Node.js theme={null}
async function checkJobStatus(jobId) {
  const response = await axios.get(
    `${API_BASE_URL}/v1/jobs/${jobId}`,
    {
      headers: {
        Authorization: API_KEY,
      },
    }
  );

  const status = response.data.data.status;
  console.log("Status:", status);

  if (status === "completed") {
    console.log("Video URL:", response.data.data.videoURL);
  }

  return response.data;
}
```

```python Python theme={null}
def check_job_status(job_id):
    response = requests.get(
        f'{API_BASE_URL}/v1/jobs/{job_id}',
        headers={
            'Authorization': API_KEY
        }
    )
    response.raise_for_status()

    status = response.json()['data']['status']
    print(f'Status: {status}')

    if status == 'completed':
        print(f"Video URL: {response.json()['data']['videoURL']}")

    return response.json()
```

**Understanding Status Values:**

| Status | What It Means | What To Do |
| - | - | - |
| `in-progress` | Video is still being rendered | Continue polling every 10–30 seconds |
| `completed` | Video is ready for download | Retrieve the video using the URL in the response |
| `failed` | Rendering encountered an error | Review the error message and retry |

> [!NOTE]
>
> **Tip:** Poll the status endpoint every 10–30 seconds. Polling too frequently may trigger rate limiting.

## Best Practices

Follow these recommendations to use the API securely and efficiently:

### Keep Your API Key Safe

* **Use environment variables**: Never hardcode your key directly in source code
* **Never commit to Git**: Add your key file to `.gitignore`
* **Use server-side code only**: Never expose your key in client-side applications
* **Regenerate if compromised**: Generate a new key immediately if you suspect unauthorized access

### Handle Errors Gracefully

* **Use try-catch blocks**: Wrap API calls to handle failures without crashing your application
* **Implement exponential backoff**: On failure, retry with increasing delays (2s, 4s, 8s)
* **Persist job IDs**: Store job IDs for status tracking and debugging
* **Validate inputs**: Ensure all required fields are populated before making API calls

### Optimize Performance

* **Poll at appropriate intervals**: Check job status every 10–30 seconds to avoid rate limiting
* **Cache responses**: Store frequently accessed data locally to reduce redundant API calls
* **Batch operations**: When creating multiple videos, process them concurrently rather than sequentially

## Troubleshooting Common Issues

Below are common issues and their solutions:

> [accordion] 401 Unauthorized - 'Invalid API Key'
>
> **Cause:** The API key is invalid, missing, or expired.
>
> **Resolution:**
>
> 1. Verify that your API key starts with `pictai_`
> 2. Confirm it is included in the `Authorization` header
> 3. Check that your subscription is active at the [API Access page](https://app.pictory.ai/api-access)
> 4. If the issue persists, generate a new API key from the [API Access page](https://app.pictory.ai/api-access)

> [accordion] 400 Bad Request - 'Invalid voice'
>
> **Cause:** The specified voice name does not exist or is incorrectly formatted.
>
> **Resolution:**
>
> 1. Voice names are case-sensitive: `"Brian"` is valid, `"brian"` is not
> 2. Refer to the [complete list of available voices](https://docs.pictory.ai/api-reference/voiceovers/get-voiceover-tracks.md)
> 3. Ensure the voice name matches exactly as documented

> [accordion] 400 Bad Request - 'Missing or invalid parameter'
>
> **Cause:** A required field is missing or a parameter has an incorrect data type.
>
> **Resolution:**
>
> 1. Review the [API documentation](https://docs.pictory.ai/api-reference/video-storyboard/update-storyboard-elements.md) for required fields
> 2. Ensure correct data types: strings in quotes, numbers without, booleans as `true`/`false`
> 3. Verify field name casing, e.g., `videoName` not `VideoName`

> [accordion] 429 Too Many Requests - 'Rate limit exceeded'
>
> **Cause:** API call frequency has exceeded the allowed rate.
>
> **Resolution:**
>
> 1. Increase the interval between status checks to 10–30 seconds
> 2. Implement exponential backoff: wait 2s, then 4s, then 8s between retries
> 3. Review your [subscription limits](https://app.pictory.ai/api-access) and upgrade if necessary

> [accordion] Video stuck at 'in-progress' status
>
> **Cause:** The video is still rendering, or the job may have stalled.
>
> **Resolution:**
>
> 1. Allow sufficient time: videos typically take 5–15 minutes depending on length
> 2. Continue polling every 10–30 seconds
> 3. If the status has not changed after 30 minutes, [contact support](https://pictory.ai/contact) with your job ID

## Build Faster with an LLM

> [card] [Pictory for Claude: no code required](https://docs.pictory.ai/claude/overview.md)
>
> Sign in with your Pictory account. No API key or API subscription needed. Pictory 3 users create only Pictory 3 videos through MCP and can open the saved projects in Pictory 3.

> [card] [Pictory for ChatGPT: no code required](https://docs.pictory.ai/chatgpt/overview.md)
>
> Add the Pictory MCP server to ChatGPT as a plugin and sign in with your Pictory account. No API key or API subscription needed.

> [card] [Pictory for Muse: no code required](https://docs.pictory.ai/muse/overview.md)
>
> Ask Muse to add the Pictory MCP server as a custom connector and sign in with your Pictory account. No API key or API subscription needed.

> [card] [Use Pictory with an LLM](https://docs.pictory.ai/guides/llm-integration/use-pictory-with-llm.md)
>
> Connect Claude, Claude Code, ChatGPT, Muse, Cursor, or Windsurf. Pictory 2 users can create only Standard videos through MCP. Pictory 3 users can create only Pictory 3 videos.

**Quick access:**

* **MCP server for agents:** [https://mcp.pictory.ai/mcp](https://docs.pictory.ai/claude-mcp/overview.md)
* **OpenAPI spec:** [https://docs.pictory.ai/openapi.json](https://docs.pictory.ai/openapi.json)
* **End-to-end recipes:** [Common use cases with ready-to-run payloads](https://docs.pictory.ai/guides/recipes/end-to-end-recipes.md)

## Next Steps

Now that you are familiar with the fundamentals, explore these resources to build more advanced integrations:

### Popular Guides

> [card] [AI Storyboard](https://docs.pictory.ai/guides/text-to-video/ai-storyboard.md)
>
> Let AI design every scene from a script or a single idea

> [card] [Text to Video](https://docs.pictory.ai/guides/text-to-video/text-to-video-basic.md)
>
> Learn how to turn any text into an engaging video

> [card] [Add AI Voice-Over](https://docs.pictory.ai/guides/text-to-video/ai-voiceover.md)
>
> Add natural-sounding AI narration to your videos

> [card] [Blog to Video](https://docs.pictory.ai/guides/article-to-video/blog-to-video.md)
>
> Transform your blog posts into shareable videos

> [card] [Add Your Branding](https://docs.pictory.ai/guides/branding-customization/brand-settings.md)
>
> Apply your logo, colors, and fonts automatically

### API Reference

For complete technical details, refer to the API documentation:

> [card] [Video Creation](https://docs.pictory.ai/api-reference/video-storyboard/update-storyboard-elements.md)
>
> Complete reference for creating videos

> [card] [Track Your Jobs](https://docs.pictory.ai/api-reference/jobs/get-jobs.md)
>
> Monitor all your video creation jobs

> [card] [Styles & Branding](https://docs.pictory.ai/api-reference/branding/get-text-styles.md)
>
> Manage subtitle styles and brand presets

> [card] [Integrations](https://docs.pictory.ai/api-reference/vimeo-integration/create-vimeo-connection.md)
>
> Auto-upload to AWS S3 and Vimeo

***

## Need Help?

> [card] [Community Forum](https://community.pictory.ai)
>
> Ask questions and connect with other developers

> [card] [Contact Support](https://pictory.ai/contact)
>
> Get direct help from our support team

## Stay Connected

Join our community and stay updated with the latest features, tips, and announcements:

> [card] [X (Twitter)](https://x.com/pictoryai)
>
> Get real-time updates, tips, and product announcements

> [card] [LinkedIn](https://www.linkedin.com/company/pictory)
>
> Professional insights, company news, and industry trends

> [card] [Instagram](https://www.instagram.com/pictoryai/)
>
> Visual inspiration, video tips, and creative content

> [card] [YouTube](https://www.youtube.com/@Pictory)
>
> Video tutorials, feature demos, and how-to guides

> [card] [Facebook](https://www.facebook.com/groups/863439644603943/?sorting_setting=CHRONOLOGICAL)
>
> Join 20,000+ creators sharing tips and success stories

> [card] [Reddit](https://www.reddit.com/r/Pictory_Community/)
>
> Join our Reddit community for discussions and updates

> [card] [Discord](https://discord.gg/ugdAVjht)
>
> Chat with developers, get quick help, and share feedback


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.