Carousels & Infographics

Render carousel

Renders (or reuses a cached render of) the latest version: slide PNGs + publish PDF for carousels, or the single canvas PNG for infographics. Idempotent: an already-rendered version returns instantly.

POST/api/public/carousels/:id/render
cURLPOST /api/public/carousels/:id/render
curl -X POST https://postiv.ai/api/public/carousels/ID_ID/render \
  -H "Authorization: Bearer pk_postiv_..." \
  -H "Content-Type: application/json" \
  -d '{}'
200Response
{
  "success": true,
  "carouselId": "car1...",
  "format": "carousel",
  "versionId": "cv1...",
  "versionNumber": 1,
  "slideCount": 6,
  "cached": false,
  "rendered": true,
  "pdfReady": true,
  "pdfUrl": "https://postiv-user-media.s3.../deck.pdf",
  "slideImages": [
    {
      "index": 0,
      "imageUrl": "https://postiv-user-media.s3.../slide-001.png"
    }
  ],
  "openInPostivUrl": "https://postiv.ai/app/create?carouselId=car1...",
  "carousel": {
    "id": "car1...",
    "title": "5 Content Mistakes",
    "status": "draft"
  }
}

Authorization

Requires an organization API key with the posts:write scope, sent as Authorization: Bearer or x-api-key.

Path parameters

idstringrequired

Resource id from the corresponding list or create endpoint.

Response

Render result with preview URLs.

carouselIduuid
formatstring
versionId / versionNumber / slideCountmixed
cachedboolean

true if served from an existing rendered PDF (carousels only; always false for infographics).

renderedboolean

Always true on success.

pdfReadyboolean
pdfUrlstring|null
slideImagesarray

[{ index, imageUrl }]: 7-day signed URLs.

openInPostivUrlstring
carousel.id / title / statusmixed

Errors

404carousel_not_found
400carousel_empty: 0 slides in the latest version
502carousel_render_failed: screenshot/PDF rendering error

Good to know

  • Each slide is screenshotted via browserless; ~5-10 seconds per slide for a fresh (non-cached) render, hence the 300s route timeout. Must be called after every edit-carousel-slide since edits invalidate the previous render.