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.
Slideshow images
Slideshow backgrounds come from Viraloop's stock image boards, picked at random per slideshow. Pass imageCategory with a board name (case-insensitive), for example Crypto, Wealth, Entrepreneur - Hustle, Gym or Travel Scenery, to use that board for every slideshow in the batch. An unknown name returns 400 invalid_input whose message lists every valid board. It only affects slideshows.
Your own Library uploads are mixed in only when you tag them as Slideshow Image (or Green Screen Bg for green screen memes) in the web app. Untagged uploads are never used, and a request with imageCategory uses only that board.
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.
Static Meta ad creatives
Manage reusable campaign briefs on the Brand page.
GET /workspaces and GET /workspaces/{id} include campaignBriefs, with an
id, title, and brief for each saved option. To use one for a static ad,
pass its brief text as prompt to POST /content/meta-ad. The studio provides
a picker for the same saved briefs.
Each creative saves a copy of its chosen brief. Editing or deleting the Brand entry preserves the brief on existing creatives and their saved versions.
Pick a layout with template: product-hero (default), before-after,
us-vs-them, review, feature-callouts, promo-offer, pain-point,
how-it-works, notes-app or ugc-photo. style and ratio
still apply on top. review and promo-offer require headline (the real
customer quote or the offer); supportingText then carries the reviewer name or
the code/deadline. The generator never invents reviews, discounts or statistics.
{ "prompt": "...", "template": "review", "headline": "I got my evenings back.", "supportingText": "Sam, founder" }