Skip to content

carousel/generate

Carousel post generation — slide-ordered swipeable image deck.

Category: carousel
Source: workflows/carousel/generate.py

FieldTypeDefaultDescription
aspect_ratiostring"1:1"Aspect ratio for slide images. Default ‘1:1’ is supported by every provider in the SDK fallback chain. Imagen accepts ‘1:1’, ‘9:16’, ‘16:9’, ‘4:3’, ‘3:4’; portrait ‘4:5’ is NOT supported by Imagen and will silently downgrade to a lower-quality provider.
audiencestring"general"Target reader persona (e.g. ‘curious learners’).
channelsstring[]Distribution channels (e.g. [‘instagram’]). Shapes prompt guidance.
industrystring""Industry/vertical hint passed through to outline + caption prompts.
keywordsstring[]Topical keywords to weave into the deck’s narrative.
num_thumbnailsobjectLegacy alias for slide_count — accepted so callers that still submit the image/generate shape can swap workflow names without touching the input dict.
regenerateobjectWhen set, this run is a regeneration. Workflows may read direction / keep / extra_instructions to modulate prompts; the engine persists parent_run_id and parent_variant_index as run lineage columns.
slide_countinteger5Number of slides (3–10).
tonestring""Voice/tone hint (e.g. ‘warm’, ‘punchy’). Empty = let the model pick.
topicstring""Subject of the carousel — drives outline + image prompts.
variantsinteger1Number of independent variant executions (1–10). When > 1, the engine runs the workflow N times with different sampling, producing N outputs.
visual_stylestring""Optional visual style override. When empty (the default), the workflow derives a deck-wide aesthetic brief from topic + tone + audience — recommended, since it produces a more cohesive, tone-matched look than a hard-coded preset.
FieldTypeDefaultDescription
captionstring""Human-readable caption for the carousel post body — summarizes the deck for use as the Instagram/social caption.
kindstring"carousel"Card kind for consumers — always ‘carousel’.
slidesany[]Ordered slide list. Index matches slides[i].order.
topicstring""Echoed input topic.
draft_outline → derive_aesthetic → render_slides → write_caption
TaskDescription
draft_outlineAsk the LLM for a per-slide outline ([{title, body}, …]).
derive_aestheticDerive a deck-wide aesthetic brief from topic, tone, audience.
render_slidesGenerate one image per outline entry — preserve order.
write_captionCompose the post-body caption summarizing the carousel deck.

Save the YAML below as my-run.yaml, edit the values, and run with the CLI or POST it to the API. Required fields are uncommented; optional knobs are documented above the input: block — copy any line under input: and uncomment to set.

workflow: carousel/generate
# Optional fields — copy any line(s) under `input:` and uncomment to set:
# Aspect ratio for slide images. Default '1:1' is supported by every provider in the SDK fallback chain. Imagen accepts '1:1', '9:16', '16:9', '4:3', '3:4'; portrait '4:5' is NOT supported by Imagen and will silently downgrade to a lower-quality provider.
# aspect_ratio: "1:1"
#
# Target reader persona (e.g. 'curious learners').
# audience: general
#
# Distribution channels (e.g. ['instagram']). Shapes prompt guidance.
# channels: []
#
# Industry/vertical hint passed through to outline + caption prompts.
# industry: ""
#
# Topical keywords to weave into the deck's narrative.
# keywords: []
#
# Legacy alias for ``slide_count`` — accepted so callers that still submit the ``image/generate`` shape can swap workflow names without touching the input dict.
# num_thumbnails: null
#
# Number of slides (3–10).
# [min=3, max=10]
# slide_count: 5
#
# Voice/tone hint (e.g. 'warm', 'punchy'). Empty = let the model pick.
# tone: ""
#
# Subject of the carousel — drives outline + image prompts.
# topic: ""
#
# Optional visual style override. When empty (the default), the workflow derives a deck-wide aesthetic brief from topic + tone + audience — recommended, since it produces a more cohesive, tone-matched look than a hard-coded preset.
# visual_style: ""
#
input: {}

Run it locally:

Terminal window
fab-workflow --from-file my-run.yaml

Or submit over the wire — the same file is the request body:

Terminal window
curl -X POST 'https://gofabric.dev/v1/workflows/runs?name=carousel/generate' \
-H 'Authorization: Bearer fab_xxx' \
-H 'content-type: application/yaml' \
--data-binary @my-run.yaml

Every workflow also accepts the universal WorkflowInput fields — variants (1–10 fan-out) and regenerate (creative-direction hints with run lineage). See Run-specs (YAML / TOML / JSON) for the full top-level shape (metadata, priority, bundle, parent, etc.).