carousel/generate
Carousel post generation — slide-ordered swipeable image deck.
Category: carousel
Source: workflows/carousel/generate.py
Input Schema
Section titled “Input Schema”| Field | Type | Default | Description |
|---|---|---|---|
aspect_ratio | string | "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. |
audience | string | "general" | Target reader persona (e.g. ‘curious learners’). |
channels | string[] | — | Distribution channels (e.g. [‘instagram’]). Shapes prompt guidance. |
industry | string | "" | Industry/vertical hint passed through to outline + caption prompts. |
keywords | string[] | — | Topical keywords to weave into the deck’s narrative. |
num_thumbnails | object | — | Legacy alias for slide_count — accepted so callers that still submit the image/generate shape can swap workflow names without touching the input dict. |
regenerate | object | — | When 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_count | integer | 5 | Number of slides (3–10). |
tone | string | "" | Voice/tone hint (e.g. ‘warm’, ‘punchy’). Empty = let the model pick. |
topic | string | "" | Subject of the carousel — drives outline + image prompts. |
variants | integer | 1 | Number of independent variant executions (1–10). When > 1, the engine runs the workflow N times with different sampling, producing N outputs. |
visual_style | string | "" | 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. |
Output Schema
Section titled “Output Schema”| Field | Type | Default | Description |
|---|---|---|---|
caption | string | "" | Human-readable caption for the carousel post body — summarizes the deck for use as the Instagram/social caption. |
kind | string | "carousel" | Card kind for consumers — always ‘carousel’. |
slides | any[] | — | Ordered slide list. Index matches slides[i].order. |
topic | string | "" | Echoed input topic. |
Task Pipeline
Section titled “Task Pipeline”draft_outline → derive_aesthetic → render_slides → write_caption| Task | Description |
|---|---|
draft_outline | Ask the LLM for a per-slide outline ([{title, body}, …]). |
derive_aesthetic | Derive a deck-wide aesthetic brief from topic, tone, audience. |
render_slides | Generate one image per outline entry — preserve order. |
write_caption | Compose the post-body caption summarizing the carousel deck. |
Run-spec example
Section titled “Run-spec example”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:
fab-workflow --from-file my-run.yamlOr submit over the wire — the same file is the request body:
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.yamlEvery 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.).