# Create a Video Short

Learn how to generate AI-powered video shorts with talking avatars from text content, perfect for social media and educational content.

## Step 1: Get Available Avatars

First, see what avatars are available for your video by calling `/video/GetAvatars`:

```bash
curl -X GET "https://api.autocontentapi.com/video/GetAvatars" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

### Example Response

```json
[
  {
    "id": "1",
    "name": "Professional Woman",
    "gender": "F"
  },
  {
    "id": "2", 
    "name": "Business Man",
    "gender": "M"
  },
  {
    "id": "3",
    "name": "Casual Speaker",
    "gender": "F"
  }
]
```

**Important:** Choose avatar IDs for your video - you'll need at least one!

## Step 2: Create Video Short from Text

Use `/video/CreateShortsFromContent` to generate a video short from text content:

```bash
curl -X POST "https://api.autocontentapi.com/video/CreateShortsFromContent" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Welcome to our AI tutorial series! Today we will explore the fascinating world of machine learning and how it is transforming businesses across every industry. From predictive analytics to natural language processing, AI is creating unprecedented opportunities for innovation.",
    "avatar1": "1",
    "avatar2": "2", 
    "subtitles": true,
    "prompt": "Create an engaging educational video about AI and machine learning for business professionals"
  }'
```

### Request Parameters

| Parameter      | Description                     | Required | Options                            |
| -------------- | ------------------------------- | -------- | ---------------------------------- |
| `text`         | Content for the video           | Yes      | Any text content                   |
| `avatar1`      | Primary avatar ID               | Yes      | Avatar ID from `/video/GetAvatars` |
| `avatar2`      | Secondary avatar ID             | No       | Avatar ID for dialogue format      |
| `subtitles`    | Include subtitles               | No       | `true`/`false` (default: `true`)   |
| `prompt`       | Instructions for video creation | No       | Any guidance text                  |
| `callbackData` | Optional callback data          | No       | Any string                         |
| `scheduledOn`  | Schedule for later              | No       | ISO datetime                       |

Use [Track Requests & Status Codes](/quick-start/tools/track-requests.md) for the shared polling flow, request ID patterns, and `callbackData` guidance.

### Example Response

```json
{
  "requestId": "video-550e8400-e29b-41d4-a716-446655440000",
  "status": 0
}
```

## Step 3: Poll Video Status

Check the video generation progress using `/content/Status/{id}`:

```bash
curl -X GET "https://api.autocontentapi.com/content/Status/video-550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

### While Processing

```json
{
  "id": "video-550e8400-e29b-41d4-a716-446655440000",
  "status": 5,
  "updated_on": "2024-01-15T10:32:00Z",
  "error_code": 0,
  "requested_on": "2024-01-15T10:30:00Z"
}
```

**Status Codes:**

* `0` = Pending (queued for processing)
* `5` = Processing (video generation in progress)
* `100` = Completed (video ready!)

## Step 4: Get Your Video Short

When `status` reaches `100`, your video is ready:

```json
{
  "id": "video-550e8400-e29b-41d4-a716-446655440000",
  "audio_title": "AI Tutorial: Machine Learning for Business",
  "status": 100,
  "audio_url": "https://storage.autocontentapi.com/audio/video-550e8400-e29b-41d4-a716-446655440000.mp3",
  "video_url": "https://storage.autocontentapi.com/video/video-550e8400-e29b-41d4-a716-446655440000.mp4",
  "response_text": "Welcome to our AI tutorial series! Today we will explore...",
  "requested_on": "2024-01-15T10:30:00Z",
  "updated_on": "2024-01-15T10:35:00Z",
  "request_type_id": 4,
  "error_code": 0,
  "file_size": 45234567,
  "share_url": "https://autocontentapi.com/share/video-550e8400-e29b-41d4-a716-446655440000"
}
```

**🎉 Success!** Your video short is ready at the `video_url`!

## Alternative Methods

### Method 2: Create from Audio Content

If you already have audio content, use `/video/CreateShorts`:

```bash
curl -X POST "https://api.autocontentapi.com/video/CreateShorts" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "audioUrl": "https://storage.autocontentapi.com/audio/existing-podcast.mp3",
    "avatar1": "1",
    "avatar2": "2",
    "subtitles": true,
    "prompt": "Create a professional business presentation style video"
  }'
```

### Method 3: Create from Custom Script

For precise control, use `/video/CreateShortsFromScript` with dialogue format:

```bash
curl -X POST "https://api.autocontentapi.com/video/CreateShortsFromScript" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "script": [
      {
        "avatarId": 1,
        "text": "Hello everyone, welcome to our AI series!"
      },
      {
        "avatarId": 2, 
        "text": "Today we will explore machine learning fundamentals."
      },
      {
        "avatarId": 1,
        "text": "Let us start with the basics of neural networks."
      }
    ],
    "subtitles": true
  }'
```

### Method 4: Create from Deep Research

Convert research findings into video content using `/video/CreateShortsFromDeepResearch`:

```bash
curl -X POST "https://api.autocontentapi.com/video/CreateShortsFromDeepResearch" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "deepResearchId": "550e8400-e29b-41d4-a716-446655440000",
    "avatar1": "1",
    "avatar2": "2",
    "subtitles": true,
    "prompt": "Create an educational video explaining the research findings in simple terms"
  }'
```

## View Your Video Shorts

Get all your created video shorts:

```bash
curl -X GET "https://api.autocontentapi.com/video/GetShorts" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

### Response

```json
[
  {
    "id": "video-550e8400-e29b-41d4-a716-446655440000",
    "status": 100,
    "requestedOn": "2024-01-15T10:30:00Z",
    "processingOn": "2024-01-15T10:31:00Z", 
    "succeededOn": "2024-01-15T10:35:00Z",
    "requestTypeId": 4,
    "callbackData": "ai-tutorial-video",
    "audioUrl": "https://storage.autocontentapi.com/audio/video-550e8400-e29b-41d4-a716-446655440000.mp3",
    "audioTitle": "AI Tutorial: Machine Learning for Business",
    "responseText": "Welcome to our AI tutorial series..."
  }
]
```

## Avatar Selection Tips

### Single Avatar (Presentation Style)

* Use only `avatar1` for lecture/presentation format
* Great for educational content, tutorials, announcements
* More focused, single-speaker delivery

### Dual Avatar (Conversation Style)

* Use both `avatar1` and `avatar2` for dialogue format
* Perfect for interviews, debates, Q\&A sessions
* Creates more engaging, conversational content

### Gender Considerations

* Mix genders (`"M"` and `"F"`) for diverse representation
* Consider your target audience preferences
* Professional vs. casual avatar styles

## Content Types That Work Well

### Educational Content

```json
{
  "text": "In this video, we'll explain the key principles of blockchain technology and how it enables secure, decentralized transactions across networks.",
  "prompt": "Create an educational explainer video with clear, simple language"
}
```

### Product Announcements

```json
{
  "text": "We're excited to announce the launch of our new AI-powered customer service platform that reduces response times by 90%.",
  "prompt": "Create an enthusiastic product announcement video"
}
```

### Tutorial Content

```json
{
  "text": "Step 1: Open your dashboard. Step 2: Click on Analytics. Step 3: Select your date range. Step 4: Export your data.",
  "prompt": "Create a step-by-step tutorial video with clear instructions"
}
```

### Marketing Content

```json
{
  "text": "Transform your business with AI automation. Increase efficiency, reduce costs, and scale faster than ever before.",
  "prompt": "Create a compelling marketing video with energetic delivery"
}
```

## Best Practices

### Content Length

* **Optimal:** 30-90 seconds for social media
* **Maximum:** 3-5 minutes for detailed explanations
* **Minimum:** 15 seconds for quick announcements

### Text Guidelines

* **Clear Structure:** Use bullet points or numbered steps
* **Conversational Tone:** Write as you would speak
* **Call to Action:** End with clear next steps
* **Keyword Rich:** Include relevant terms for SEO

### Visual Considerations

* **Subtitles:** Always enable (default `true`) for accessibility
* **Avatar Choice:** Match avatar style to content tone
* **Prompt Instructions:** Guide the delivery style and energy

## Error Handling

### Invalid Avatar ID

```json
{
  "error": "Invalid avatar ID provided",
  "status": 400
}
```

### Text Too Long

```json
{
  "error": "Text content exceeds maximum length",
  "status": 400
}
```

### Processing Failed

```json
{
  "id": "video-550e8400-e29b-41d4-a716-446655440000",
  "status": 0,
  "error_code": 500,
  "error_message": "Video generation failed, please try again",
  "updated_on": "2024-01-15T10:35:00Z"
}
```

## Use Cases

**Social Media Marketing:** Create engaging shorts for Instagram, TikTok, YouTube Shorts

**Employee Training:** Generate training videos for onboarding and skill development

**Product Demos:** Show features and benefits with professional avatars

**Educational Content:** Create course materials and explainer videos

**Customer Support:** Build FAQ videos with common questions and answers

**Internal Communications:** Company updates and announcements

## What's Next?

* 🎧 Learn about [Creating Podcast Episodes](/quick-start/podcasts/create-podcast-episode.md) for audio content
* 🐦 Explore [Creating Content from X Feeds](/quick-start/podcasts/create-feed-podcast.md)
* 🔬 Try [Deep Research Podcasts](/quick-start/deep-researches/create-research-podcast.md) for comprehensive content
* 📖 Check out more [Code Samples](/code-samples.md) in different languages
* 🗣️ Discover [Custom Voices](/voices.md) for audio content
* ❓ Have questions? Visit our [FAQ](/faq.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.autocontentapi.com/quick-start/video-shorts/create-video-short.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
