Skip to main content
POST
/
v1
/
posts
/
slideshow
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",
    "slideDuration": 6,
    "renderAsVideo": false,
    "scheduledTime": "2024-04-22T12:00:00Z"
  }'
{
  "posts": [
    {
      "postId": "post_abc123",
      "accountId": "acc_123",
      "platform": "tiktok",
      "status": "scheduled",
      "scheduledTime": "2024-04-22T12:00:00Z",
      "renderAsVideo": false,
      "createdAt": "2024-04-21T20:15:00Z"
    },
    {
      "postId": "post_def456",
      "accountId": "acc_456",
      "platform": "instagram",
      "status": "scheduled",
      "scheduledTime": "2024-04-22T12:00:00Z",
      "renderAsVideo": false,
      "createdAt": "2024-04-21T20:15:00Z"
    }
  ]
}

Request Body

accountIds
array
required
Array of account IDs to post to (e.g., ["acc_123", "acc_456"]).
contentUrls
array
required
Array of image URLs for the slideshow (e.g., ["https://example.com/slide1.jpg", "https://example.com/slide2.jpg"]).
caption
string
Post caption/description.
soundId
string
ID of a TikTok sound to attach to the post.Platform Support:
  • TikTok: Supported
  • Instagram: Not supported
See Upload Sound for how to import sounds from TikTok.
scheduledTime
string
ISO 8601 timestamp for when to post. If not provided, posts immediately.
slideDuration
number
default:"4"
Duration per slide in seconds. Options: 4, 6, or 8. Only applies when renderAsVideo is true.
renderAsVideo
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
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.

Response

posts
array
Array of created post objects (one per account).
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",
    "slideDuration": 6,
    "renderAsVideo": false,
    "scheduledTime": "2024-04-22T12:00:00Z"
  }'
{
  "posts": [
    {
      "postId": "post_abc123",
      "accountId": "acc_123",
      "platform": "tiktok",
      "status": "scheduled",
      "scheduledTime": "2024-04-22T12:00:00Z",
      "renderAsVideo": false,
      "createdAt": "2024-04-21T20:15:00Z"
    },
    {
      "postId": "post_def456",
      "accountId": "acc_456",
      "platform": "instagram",
      "status": "scheduled",
      "scheduledTime": "2024-04-22T12:00:00Z",
      "renderAsVideo": false,
      "createdAt": "2024-04-21T20:15:00Z"
    }
  ]
}
Slideshow ProcessingBy 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.

Error Responses

Invalid Slide Duration
{
  "error": {
    "code": "invalid_parameter",
    "message": "slideDuration must be 4, 6, or 8 seconds"
  }
}
Missing Content
{
  "error": {
    "code": "missing_required_fields",
    "message": "contentUrls array is required and cannot be empty"
  }
}
Account Not Found
{
  "error": {
    "code": "not_found",
    "message": "Account acc_123 not found"
  }
}