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

# AI Ads API for UGC-Style Video Generation

> Generate user-generated content style ads automatically using the Captions API. Create authentic marketing videos with AI avatars and scripts programmatically.

## How it Works

<Steps>
  <Step title="Create a script">
    * Write a script that is 800 characters or less (currently, videos must be 1 minute or less in length).

    * The script can be in any language and your language will be automatically detected.
  </Step>

  <Step title="Choose your creator">
    * Open the Captions iPhone app to browse available community creators (Android coming soon).

    * Use the `/list-creators` path to choose one of our creators.
  </Step>

  <Step title="Choose your media">
    Ensure that the media you want to include in the AI Ad are at publicly-hosted downloadable URLs. Supported formats are JPEG, PNG, MOV and MP4.
  </Step>

  <Step title="Generate your video">
    Use the `/submit` path to enter your API Key, Creator Name, and Script and links to any media you would like to be in the ad.
  </Step>

  <Step title="Download your video">
    * While you wait, you can use the `/poll` path to check the status.

    * Once complete, you'll be able to download the video.
  </Step>
</Steps>

## Usage, credits, and limitations

<Tip>
  The AI Ads API consumes 1 credit per second.
</Tip>

* For example, generating a 30-second video would consume 30 credits.

* You can view remaining credits and purchase additional credits on the [API Dashboard](https://desktop.captions.ai/api).

* The maximum length of a video you can generate is 1 minute (800 character script)

## Requirements to using the API

To use the Captions API, you must:

1. Accept the [Captions API Terms](https://www.captions.ai/terms/api)

2. Have enough credits to complete your request
