All docs
API reference

Slideshows

Generate, list, fetch, and export TikTok slideshows.

1 min readLast updated Edit this page

Slideshows are the main output of ViralSlides. Each one is a 6-slide deck plus marketing assets, owned by exactly one app.

GET/v0/api/v1/slideshowsAPI key or session

List slideshows in your organization, newest first.

Parameters

NameInTypeDescription
pagequeryinteger1-indexed page (default 1).
limitqueryintegerItems per page, max 100 (default 20).
app_idquerystringFilter to one app.
statusquerystringQUEUED | RENDERING | READY | FAILED.

Response

json
{
  "success": true,
  "data": [
    {
      "_id": "ss_01HQ...",
      "app_id": "app_01HQ...",
      "hook_id": "hk_01HQ...",
      "hook_text_snapshot": "POV: you found the meditation app that...",
      "status": "READY",
      "language": "en",
      "template_set": "default",
      "createdAt": "2026-05-17T11:55:00.000Z"
    }
  ],
  "page": 1,
  "limit": 20,
  "total": 42
}
POST/v0/api/v1/apps/:id/slideshowsAPI key or session

Generate a niche-template slideshow for the given app. The app's niche drives which templates are available; the default image source provides the slide imagery. Subject to your plan's slideshows-per-month quota.

Parameters

NameInTypeDescription
id*pathstringTarget app id.
template_key*bodystringNiche template key, e.g. "trending-designs-monthly". See GET /v0/api/v1/niches for the catalog.
variable_overridesbodyobjectOptional explicit values for template variables (e.g. {"aesthetic":"Coquette"}). LLM picks any missing fields.

Request

Request bodyjson
{
  "template_key": "trending-designs-monthly",
  "variable_overrides": { "month": "May", "year": "2026" }
}

Response

202 Acceptedjson
{
  "success": true,
  "body": { "slideshow_id": "ss_01HQ..." }
}

cURL

Terminalbash
curl -X POST https://api.viralslides.app/v0/api/v1/apps/app_01HQ.../slideshows \
  -H "Authorization: Bearer vs_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "template_key": "trending-designs-monthly"
  }'

TypeScript / JS

Node.jstypescript
const res = await fetch("https://api.viralslides.app/v0/api/v1/apps/app_01HQ.../slideshows", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.VIRALSLIDES_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ template_key: "trending-designs-monthly" }),
})
const { body } = await res.json()
console.log(body.slideshow_id)

Errors

StatusCodeDescription
400TEMPLATE_KEY_REQUIREDBody missing template_key.
400NICHE_NOT_REGISTEREDThe app's niche is not in the niche catalog.
400NO_IMAGE_SOURCEThe app has no image source configured.
402QUOTA_EXCEEDEDYou've hit slideshows_per_month for this billing cycle.
404APP_NOT_FOUNDThe target app id is not in your organization.
GET/v0/api/v1/slideshows/:idAPI key or session

Fetch a slideshow by id, including all slides and marketing assets.

Parameters

NameInTypeDescription
id*pathstringSlideshow id.

Response

json
{
  "success": true,
  "body": {
    "_id": "ss_01HQ...",
    "app_id": "app_01HQ...",
    "status": "READY",
    "slides": [ /* 6 slides */ ],
    "marketing_assets": [ /* caption, hashtags, ctas */ ]
  }
}

Errors

StatusCodeDescription
404SLIDESHOW_NOT_FOUNDNot in your organization.
GET/v0/api/v1/slideshows/:id/zipAPI key or session

Build (or fetch a cached) ZIP bundle of slides + marketing assets and return a download URL. The URL is valid for ~1 hour.

Parameters

NameInTypeDescription
id*pathstringSlideshow id.

Response

json
{
  "success": true,
  "data": {
    "url": "https://cdn.viralslides.app/orgs/.../export.zip",
    "expires_at": "2026-05-17T13:00:00.000Z",
    "cached": false
  }
}

cURL

Terminalbash
curl https://api.viralslides.app/v0/api/v1/slideshows/ss_01HQ.../zip \
  -H "Authorization: Bearer vs_live_..."

TypeScript / JS

Node.jstypescript
const res = await fetch(`https://api.viralslides.app/v0/api/v1/slideshows/${id}/zip`, {
  headers: { Authorization: `Bearer ${process.env.VIRALSLIDES_API_KEY}` },
})
const { data } = await res.json()
// data.url is a public CDN URL good for ~1 hour
window.location.href = data.url

Errors

StatusCodeDescription
404SLIDESHOW_NOT_FOUNDNot in your organization.
500ZIP_GENERATION_FAILEDInternal error packing the ZIP. Retry safe.
500ZIP_UPLOAD_FAILEDStorage upload failed. Retry safe.
ZIP contents

Each ZIP contains slides/01.png … 06.png, marketing/caption.txt, marketing/hashtags.txt, marketing/cta.txt, metadata.json, and README.txt. ZIPs are cached in R2 — if the slideshow hasn't changed since the last build, you get the cached URL back.