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

# Create Slideshow Post

> Create and schedule a slideshow post to one or more accounts

## Request Body

<ParamField body="accountIds" type="array" required>
  Array of account IDs to post to (e.g., `["acc_123", "acc_456"]`).
</ParamField>

<ParamField body="contentUrls" type="array" required>
  Array of image URLs for the slideshow (e.g., `["https://example.com/slide1.jpg", "https://example.com/slide2.jpg"]`).
</ParamField>

<ParamField body="caption" type="string">
  Post caption/description.
</ParamField>

<ParamField body="soundId" type="string">
  ID of a TikTok sound to attach to the post.

  **Platform Support:**

  * TikTok: Supported
  * Instagram: Not supported

  See [Upload Sound](/api-reference/media/upload-sound) for how to import sounds from TikTok.
</ParamField>

<ParamField body="markAI" type="boolean" default="false">
  When `true`, adds an AI-generated content label to the post.
</ParamField>

<ParamField body="scheduledTime" type="string">
  Local time to post, in `YYYY-MM-DDTHH:MM` format (e.g. `"2024-04-22T14:00"`). If not provided, posts immediately.

  Interpreted in the timezone specified by the `timezone` parameter.
</ParamField>

<ParamField body="timezone" type="string" default="America/New_York">
  IANA timezone for interpreting `scheduledTime`. Supported values:

  | Value                 | Label           |
  | --------------------- | --------------- |
  | `America/New_York`    | Eastern (ET)    |
  | `America/Chicago`     | Central (CT)    |
  | `America/Denver`      | Mountain (MT)   |
  | `America/Los_Angeles` | Pacific (PT)    |
  | `America/Anchorage`   | Alaska (AKT)    |
  | `Pacific/Honolulu`    | Hawaii (HST)    |
  | `Europe/London`       | London (GMT)    |
  | `Europe/Paris`        | Paris (CET)     |
  | `Asia/Tokyo`          | Tokyo (JST)     |
  | `Asia/Singapore`      | Singapore (SGT) |
  | `Australia/Sydney`    | Sydney (AEDT)   |
</ParamField>

<ParamField body="slideDuration" type="number" default="4">
  Duration per slide in seconds. Options: `4`, `6`, or `8`. Only applies when `renderAsVideo` is `true`.
</ParamField>

<ParamField body="renderAsVideo" type="boolean" default="false">
  When `true`, the slideshow images are rendered into a single video file (at the specified `slideDuration` per slide) before posting. When `false` (default), images are posted as a native slideshow directly on each platform.

  **Platform behavior:**

  * **TikTok:** Native slideshow posts as an image carousel. Set `renderAsVideo: true` to post as a video instead.
  * **Instagram:** Native slideshow posts as a Reels carousel. Set `renderAsVideo: true` to post as a Reel video instead.

  **When to use `renderAsVideo: true`:**

  * You want to attach a `soundId` to an Instagram post (native slideshows don't support sound on Instagram)
  * You need guaranteed video format for downstream analytics or repurposing

  <Note>
    When `renderAsVideo` is `true`, posts will show a `pending_render` status while the video is being rendered in the background. Once rendering is complete the status moves to `scheduled`, at which point the post will go live at the specified `scheduledTime`.
  </Note>
</ParamField>

## Response

<ResponseField name="posts" type="array">
  Array of created post objects (one per account).

  <Expandable title="properties">
    <ResponseField name="postId" type="string">
      Unique identifier for the post.
    </ResponseField>

    <ResponseField name="accountId" type="string">
      Account ID this post belongs to.
    </ResponseField>

    <ResponseField name="platform" type="string">
      Platform: `tiktok` or `instagram`.
    </ResponseField>

    <ResponseField name="status" type="string">
      Post status: `scheduled`, `processing`, `posted`, or `failed`.
    </ResponseField>

    <ResponseField name="scheduledTime" type="string">
      When the post is scheduled to go live.
    </ResponseField>

    <ResponseField name="renderAsVideo" type="boolean">
      Whether the slideshow will be rendered to video before posting.
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ISO 8601 timestamp of when the post was created.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.infinipost.co/v1/posts/slideshow \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "accountIds": ["acc_123", "acc_456"],
      "contentUrls": [
        "https://example.com/slide1.jpg",
        "https://example.com/slide2.jpg",
        "https://example.com/slide3.jpg"
      ],
      "caption": "Swipe for more! 👉",
      "soundId": "sound_abc123",
      "markAI": false,
      "slideDuration": 6,
      "renderAsVideo": false,
      "scheduledTime": "2024-04-22T14:00",
      "timezone": "America/New_York"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.infinipost.co/v1/posts/slideshow', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      accountIds: ['acc_123', 'acc_456'],
      contentUrls: [
        'https://example.com/slide1.jpg',
        'https://example.com/slide2.jpg',
        'https://example.com/slide3.jpg'
      ],
      caption: 'Swipe for more! 👉',
      soundId: 'sound_abc123',
      markAI: false,
      slideDuration: 6,
      renderAsVideo: false,
      scheduledTime: '2024-04-22T14:00',
      timezone: 'America/New_York'
    })
  });

  const data = await response.json();
  ```

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

  response = requests.post(
      'https://api.infinipost.co/v1/posts/slideshow',
      headers={
          'Authorization': 'Bearer YOUR_API_KEY',
          'Content-Type': 'application/json'
      },
      json={
          'accountIds': ['acc_123', 'acc_456'],
          'contentUrls': [
              'https://example.com/slide1.jpg',
              'https://example.com/slide2.jpg',
              'https://example.com/slide3.jpg'
          ],
          'caption': 'Swipe for more! 👉',
          'soundId': 'sound_abc123',
          'markAI': False,
          'slideDuration': 6,
          'renderAsVideo': False,
          'scheduledTime': '2024-04-22T14:00',
          'timezone': 'America/New_York'
      }
  )

  print(response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "posts": [
      {
        "postId": "post_abc123",
        "accountId": "acc_123",
        "platform": "tiktok",
        "status": "scheduled",
        "scheduledTime": "2024-04-22T14:00",
      "timezone": "America/New_York",
        "renderAsVideo": false,
        "createdAt": "2024-04-21T20:15:00Z"
      },
      {
        "postId": "post_def456",
        "accountId": "acc_456",
        "platform": "instagram",
        "status": "scheduled",
        "scheduledTime": "2024-04-22T14:00",
      "timezone": "America/New_York",
        "renderAsVideo": false,
        "createdAt": "2024-04-21T20:15:00Z"
      }
    ]
  }
  ```
</ResponseExample>

<Info>
  **Slideshow Processing**

  By default, slideshows are posted as native image carousels on both TikTok and Instagram. Set `renderAsVideo: true` to render them into a video first — useful when you want to attach a sound to an Instagram post or ensure video format. Video rendering happens in the background; posts will show a `pending_render` status until rendering is complete, then move to `scheduled`.
</Info>

## Error Responses

```json Unauthorized theme={null}
{
  "error": {
    "code": "unauthenticated",
    "message": "Invalid or missing API key"
  }
}
```

```json Missing Required Fields theme={null}
{
  "error": {
    "code": "missing_required_fields",
    "message": "contentUrls array is required and cannot be empty"
  }
}
```

```json Invalid Slide Duration theme={null}
{
  "error": {
    "code": "invalid_parameter",
    "message": "slideDuration must be 4, 6, or 8 seconds"
  }
}
```

```json Account Not Found theme={null}
{
  "error": {
    "code": "not_found",
    "message": "Account(s) not found: acc_1a2b3c4d5e"
  }
}
```

```json Invalid Scheduled Time theme={null}
{
  "error": {
    "code": "invalid_parameter",
    "message": "scheduledTime must be a valid ISO 8601 timestamp"
  }
}
```

```json Server Error theme={null}
{
  "error": {
    "code": "internal",
    "message": "An unexpected error occurred"
  }
}
```
