> For the complete documentation index, see [llms.txt](https://docs.autocontentapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.autocontentapi.com/quick-start/podcasts/create-feed-podcast.md).

# Create a Podcast from X Feed

Learn how to create a feed from an X (Twitter) account and use it to generate AI-powered podcast content from the latest posts.

> Building feeds through the dashboard first? Follow [Create a Feed](/quick-start/podcasts/create-feed.md) for the in-app workflow and then return here for the raw API calls.

## Step 1: Create an X Feed

First, create a feed from an X account by sending a POST request to `/feeds`:

```bash
curl -X POST "https://api.autocontentapi.com/feeds" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Tech News from Elon Musk",
    "feedTypeId": 1,
    "internalId": "elonmusk"
  }'
```

### Request Parameters

| Parameter    | Description                | Example                      |
| ------------ | -------------------------- | ---------------------------- |
| `name`       | Display name for your feed | `"Tech News from Elon Musk"` |
| `feedTypeId` | Feed type (1 = X/Twitter)  | `1`                          |
| `internalId` | X username (without @)     | `"elonmusk"`                 |

### Example Response

```json
{
  "success": true,
  "feedId": 42,
  "message": "Feed created successfully"
}
```

**Important:** Save the `feedId` - you'll use it to generate podcasts from this feed!

## Step 2: List Recent Feed Items

Fetch cached items for the feed:

```bash
curl -X GET "https://api.autocontentapi.com/feeds/42/items" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

Example response:

```json
{
  "feed": {
    "id": 42,
    "name": "Tech News from Elon Musk",
    "feedTypeId": 1
  },
  "items": [
    {
      "identifier": "1876982459012345678",
      "content": "Mars launch update...",
      "resourceType": "text",
      "resourceValue": "Mars launch update..."
    },
    {
      "identifier": "1876982459012345679",
      "content": "New AI product announcement...",
      "resourceType": "text",
      "resourceValue": "New AI product announcement..."
    }
  ]
}
```

Save the item `identifier` values you want to include.

## Step 3: Create Podcast from Selected Feed Items

Use `feedSelections` to generate a podcast from specific cached posts:

```bash
curl -X POST "https://api.autocontentapi.com/content/Create" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "outputType": "audio",
    "feedSelections": [
      {
        "feedId": 42,
        "feedItemIds": ["1876982459012345678", "1876982459012345679"]
      }
    ],
    "text": "Create an engaging podcast discussing the latest tweets and their implications",
    "duration": "default"
  }'
```

### Example Response

```json
{
  "request_id": "feed-550e8400-e29b-41d4-a716-446655440001",
  "status": 0
}
```

## Step 4: Poll for Status

Use the `request_id` to check processing status:

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

### While Processing

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

## Step 5: Get Your Feed-Based Podcast

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

```json
{
  "id": "feed-550e8400-e29b-41d4-a716-446655440001",
  "audio_title": "Latest Updates from Tech Leaders",
  "status": 100,
  "audio_url": "https://storage.autocontentapi.com/audio/feed-550e8400-e29b-41d4-a716-446655440001.mp3",
  "response_text": "Full transcript discussing the latest posts from the feed...",
  "requested_on": "2024-01-15T10:30:00Z",
  "updated_on": "2024-01-15T10:35:00Z",
  "request_type_id": 1,
  "error_code": 0,
  "file_size": 18734521,
  "audio_duration": 567.89,
  "share_url": "https://autocontentapi.com/share/feed-550e8400-e29b-41d4-a716-446655440001"
}
```

## Managing Your Feeds

### List All Your Feeds

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

### Get Specific Feed Details

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

### Delete a Feed

```bash
curl -X POST "https://api.autocontentapi.com/feeds/delete" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": 42
  }'
```

## Advanced: Multiple Feed Selections

You can combine selected items from multiple feeds in a single podcast request:

```bash
curl -X POST "https://api.autocontentapi.com/content/Create" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "outputType": "audio",
    "feedSelections": [
      {
        "feedId": 42,
        "feedItemIds": ["1876982459012345678"]
      },
      {
        "feedId": 43,
        "feedItemIds": ["post_abc123", "post_def456"]
      }
    ],
    "text": "Create a podcast discussing the latest posts from these tech leaders",
    "duration": "long"
  }'
```

**Note:** Maximum of 10 feed groups per request and 50 item IDs per feed group.

## Feed Limitations

* **Feed Limit:** Your plan controls how many feeds/channels you can create
* **Rate Limiting:** Wait 3 seconds between feed creation requests
* **Feed Types:** `1` = X/Twitter, `2` = Reddit, `3` = YouTube channel, `4` = RSS, `5` = X News topic
* **Username Format:** For X feeds, use the username without the @ symbol

## Popular X Accounts for Tech Feeds

Here are some popular tech accounts you might want to create feeds from:

| Username       | Description                 |
| -------------- | --------------------------- |
| `elonmusk`     | Tesla/SpaceX CEO insights   |
| `sundarpichai` | Google CEO updates          |
| `satyanadella` | Microsoft CEO thoughts      |
| `tim_cook`     | Apple CEO announcements     |
| `jeffbezos`    | Amazon founder perspectives |
| `naval`        | Startup and tech philosophy |
| `balajis`      | Crypto and tech trends      |

## Error Handling

### Feed Creation Errors

```json
{
  "success": false,
  "error": "Feed limit reached. You can create up to 4 feeds. You currently have 4 feeds."
}
```

### Rate Limit Error

```json
{
  "success": false,
  "error": "Rate limit exceeded. Please wait 3 seconds before creating another feed."
}
```

## Use Cases

**Daily Tech Briefings:** Create feeds from multiple tech leaders and generate daily summary podcasts

**Industry Analysis:** Follow specific industry accounts and create weekly analysis podcasts

**Event Coverage:** Create temporary feeds during conferences or product launches

**Competitor Monitoring:** Track competitor announcements and create regular update podcasts

## What's Next?

* 🎧 Learn about [Creating Basic Podcasts](/quick-start/podcasts/create-podcast-episode.md) from web resources
* 📖 Explore more [Code Samples](/code-samples.md) in different languages
* 🗣️ Discover [Custom Voices](/voices.md) for personalized feed podcasts
* ❓ Have questions? Visit our [FAQ](/faq.md)
