Skip to main content

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 as suggestionId when publishing
  • format: one of walloftext, slideshow, greenscreen
  • caption: 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 platform
  • hashtags: hashtags to publish with the post
  • why: a short rationale for why this suggestion should perform
  • angle: the content angle it was derived from
  • deck: the editable render blueprint (text boxes, ratio, media) used to render the video server-side
  • status: pending (awaiting review), accepted or scheduled

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 video
  • slideshow: a swipeable sequence of image slides with text
  • greenscreen: 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.

bash
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"}'
bash
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:

bash
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:

  1. Accept it: POST /generations/{id}/accept returns a contentId.
  2. Download: GET /content/{contentId}/download. The first call starts the
server-side render and returns 409; poll until it returns 200 with the files (typically under a minute).
bash
viraloop generations accept <id> --json
viraloop content download <contentId> --json

Publishing

Publish a suggestion by passing its id to POST /posts:

bash
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.

json
{ "prompt": "...", "template": "review", "headline": "I got my evenings back.", "supportingText": "Sam, founder" }