Generations
Generations are AI-created, ready-to-post content suggestions. Viraloop uses the workspace's brand context (identity, tone of voice, content angles) and its Turbo configuration to produce a batch of suggestions you can review and then publish as posts.
What a suggestion is
Each suggestion contains:
id: use it later assuggestionIdwhen publishingformat: one ofwalloftext,slideshow,greenscreencaption: the on-screen text of the video itself (the hook the viewer reads)postCaption: the post body, the description text published alongside the video on the platformhashtags: hashtags to publish with the postwhy: a short rationale for why this suggestion should performangle: the content angle it was derived fromdeck: the editable render blueprint (text boxes, ratio, media) used to render the video server-sidestatus:pending(awaiting review),acceptedorscheduled
caption and postCaption are separate on purpose: the first is part of the video, the second is platform metadata. Both can be overridden when you create the post.
Formats
walloftext: a bold text overlay carried by a simple background videoslideshow: a swipeable sequence of image slides with textgreenscreen: a green-screen style meme format
Pass format to force one of them, or omit it to use the workspace's configured content mix.
Generating
POST /generations is synchronous: the request returns when generation finishes, typically 5 to 60 seconds depending on count (1 to 10). Content generation costs no credits in v1. The endpoint is rate limited to 10 requests per 300 seconds and supports the Idempotency-Key header for safe retries.
curl -s -X POST https://viraloop.io/api/v1/generations \
-H "Authorization: Bearer $VIRALOOP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"count": 3, "format": "walloftext"}'
viraloop generate --count 3 --json
Optional body fields: influencerId features that AI influencer in every suggestion, workspaceId targets a workspace other than the team's default. Requires the generations:write scope.
Reviewing
List the queue (automation-owned suggestions are excluded) and inspect single suggestions:
viraloop generations list --json
viraloop generations get <id> --json
GET /generations supports status, page, limit and workspaceId filters. GET /generations/{id} returns the full deck, rationale and remix source. Both require the generations:read scope.
Previewing before accepting
GET /generations/{id} returns the full deck: slide image URLs, caption
text boxes (text, position, styling) and the background clip or meme assets
for the video formats. Render those client-side (image or clip with the
caption text overlaid) as the preview your users accept or skip from.
Previewing and accepting cost nothing; billing only happens when a piece's
media is downloaded or published.
Getting the media files (serve them yourself)
To fetch a suggestion's finished media instead of (or before) publishing:
- Accept it:
POST /generations/{id}/acceptreturns acontentId. - Download:
GET /content/{contentId}/download. The first call starts the
409; poll until it returns 200 with the
files (typically under a minute).viraloop generations accept <id> --json
viraloop content download <contentId> --json
Publishing
Publish a suggestion by passing its id to POST /posts:
viraloop posts create --suggestion <id> --accounts tiktok:<accountId> --when asap --wait --json
If the suggestion is already scheduled, this returns 409 with error type conflict; generate or pick another. See posts and scheduling for accounts, timing and polling.