Data
Template definitions
Editable slideshow, video, and post template configuration objects.
Template definitions
Templates store reusable authoring configuration and never own a publishing schedule. The current storage adapter can read legacy definition rows while the API and UI expose them as slideshow, video, or post templates. Runtime inputs and outputs are documented separately.
Automation definitions. Optionality and accepted values are included in each field description.
AutomationRecord
| Field | Type | Example | Description |
|---|---|---|---|
ownerId | string | "record-123" | Optional. Injected record owner. Accepted format: Railway user ID. |
id | string | "record-123" | Required. Automation ID. Accepted format: Stable domain ID. |
sourceAutomationId | string | "record-123" | Optional. Imported automation identity. Accepted format: External ID. |
sourceUrl | string | "https://example.com/item" | Optional. Import source. Accepted format: URL. |
name | string | "Example" | Required. Display name. |
status | string enum | "live" | Required. Lifecycle state; unknown covers old records. Accepted format: live, paused, unknown. |
favorite | boolean | true | Required. UI favorite state. Accepted format: true, false. |
theme | string | "Example" | Required. UI theme label. |
importedAt | ISO datetime | "2026-08-01T09:00:00.000Z" | Optional. Import time. Accepted format: ISO 8601. |
updatedAt | ISO datetime | "2026-08-01T09:00:00.000Z" | Required. Last update. Accepted format: ISO 8601. |
schema | AutomationSchema | "Example" | Required. Editable/runtime definition. Accepted format: See below. |
raw | object | { "key": "value" } | Optional. Preserved external source payload. Accepted format: JSON object. |
AutomationSchema
| Field | Type | Example | Description |
|---|---|---|---|
automationKind | string enum | "slideshow" | Required. Generation family. Accepted format: slideshow, video, ugc. |
aspect_ratio | string enum | "9:16" | Required. Global output aspect ratio. Accepted format: 9:16, 4:5, 3:4, 3:2, 1:1. |
font | string | "Example" | Required. Global font. Accepted format: Registered/font-family string. |
image_fit | string enum | "cover" | Required. Image fit policy. Accepted format: cover, contain, fit. |
language | string | "Example" | Required. Generation language. Accepted format: Language label/code. |
created_at | Date/ISO on serialization | "2026-08-01T09:00:00.000Z" | Required. Definition creation time. Accepted format: Valid datetime. |
social_integrations | PostFastSocialIntegration[] | [] | Required. Publication targets. Accepted format: Array. |
prompt_formatting | PromptFormatting | "Example" | Required. Text-generation direction. Accepted format: See below. |
hooks | AutomationHookItem[] | [] | Required. Canonical hook catalog. Accepted format: Array. |
image_collection_ids | ImageCollectionConfig | "Example" | Required. Media source selection. Accepted format: See below. |
tone | AutomationToneSection | "Example" | Required. Tone selection/custom direction. Accepted format: See below. |
formatting | AutomationFormatSection[] | "hook" | Required. Slide/text layout. Accepted format: IDs hook, body, cta. |
tiktok_post_settings | object | "TikTokPostSettings" | Required. Compatibility publishing policy. Accepted format: See TikTokPostSettings. |
social_post_settings | object | { "key": "value" } | Required. Provider-specific PostFast controls. Accepted format: Provider-keyed controls. |
social_publish_as | object | "slideshow" | Required. Per-provider media mode. Accepted format: Provider keys; values slideshow or video. |
schedule | AutomationSchedule | "Example" | Required. Posting schedule. Accepted format: See below. |
posting_mode | string enum | "manual" | Optional. Publication workflow. Accepted format: manual, review, auto. |
generation_lead_minutes | number | 1 | Optional. Generate before scheduled publication. Accepted format: Non-negative number. |
hook_slots | object | { token: collectionId } | Optional. Explicit variable-collection overrides. Accepted format: { token: collectionId }. |
hook_no_duplicate_slots | boolean | true | Optional. Avoid duplicate hook slot selections. Accepted format: true, false. |
distinct_variable_draws | boolean | true | Optional. Draw different values for repeated variables. Accepted format: true, false. |
web_search_enabled | boolean | true | Optional. Allow provider web-search generation. Accepted format: true, false. |
reuse_policy | AutomationReusePolicy | "Example" | Optional. Recent-content exclusion settings. Accepted format: See below. |
content_strategy | AutomationContentStrategy | "Example" | Optional. Route-based content strategy. Accepted format: See below. |
video_format | AutomationVideoFormat | "Example" | Optional. Segment/template configuration. Accepted format: Required by video flows. |
ugc | AutomationUgcConfig | "Example" | Optional. UGC actor/voice/caption configuration. Accepted format: Required by UGC flows. |
PromptFormatting
| Field | Type | Example | Description |
|---|---|---|---|
style | string | "Example" | Required. Style direction. |
narrative | string | "Example" | Required. Narrative/writing direction. |
num_of_slides | number | 1 | Required. Default slide count. Accepted format: Positive integer. |
hook_case | string | "lib/hook-casing.ts" | Optional. Hook capitalization transform. Accepted format: Hook-case modes registered in lib/hook-casing.ts. |
ImageCollectionConfig
| Field | Type | Example | Description |
|---|---|---|---|
first_slide.collection | string | "Example" | Required. First-slide source collection. Accepted format: Collection ID. |
first_slide.mode | string enum | "collection" | Required. First-slide selection mode. Accepted format: collection, single_image. |
first_slide.single_image | string or null | null | Required. Fixed first image. Accepted format: Asset/image ID or null. |
all_slides | string | "Example" | Required. Body-slide source. Accepted format: Collection ID. |
cta_slide.check | boolean | true | Required. Enable dedicated CTA media. Accepted format: true, false. |
cta_slide.cta_collection_id | string | "record-123" | Required. CTA source collection. Accepted format: Collection ID. |
cta_slide.image_id | string or null | null | Required. Fixed CTA image. Accepted format: Asset/image ID or null. |
video_demo_asset_id | string | "record-123" | Optional. Optional demo video. Accepted format: Asset ID. |
AutomationSchedule
| Field | Type | Example | Description |
|---|---|---|---|
timezone | string | "Asia/Singapore" | Required. Slot calculation timezone. Accepted format: IANA timezone. |
posting_times | object[] | [] | Required. Schedule entries. Accepted format: Array. |
posting_times[].time | string | "HH:mm" | Required. Posting time. Accepted format: Local HH:mm time. |
posting_times[].days | string[] | "Mon" | Required. Active weekdays. Accepted format: Mon, Tue, Wed, Thu, Fri, Sat, Sun. |
posting_times[].enabled | boolean | true | Optional. Entry enablement. Accepted format: true, false; normalized default applies. |
paused | boolean | true | Optional. Schedule-level pause. Accepted format: true, false. |
jitter_minutes | number | 1 | Optional. Random timing offset ceiling. Accepted format: Non-negative integer. |
AutomationHookItem
| Field | Type | Example | Description |
|---|---|---|---|
id | string | "record-123" | Required. Hook identity. Accepted format: Stable ID. |
text | string | "Example" | Required. Hook template. Accepted format: Free string with supported variables. |
enabled | boolean | true | Required. Selection eligibility. Accepted format: true, false. |
bodySlideCount | number | 1 | Optional. Per-hook body slide count. Accepted format: Positive integer. |
tone | string | "Example" | Optional. Per-hook tone override. |
createdAt | ISO datetime | "2026-08-01T09:00:00.000Z" | Required. Creation time. Accepted format: ISO 8601. |
updatedAt | ISO datetime | "2026-08-01T09:00:00.000Z" | Optional. Last update. Accepted format: ISO 8601. |
AutomationFormatSection
| Field | Type | Example | Description |
|---|---|---|---|
id | string enum | "hook" | Required. Section identity. Accepted format: hook, body, cta. |
textItems | TextItem[] | [] | Required. Text boxes. Accepted format: Array. |
aspect_ratio | string enum | "9:16" | Required. Section ratio. Accepted format: 9:16, 4:5, 3:4, 3:2, 1:1. |
imageGrid | string enum | "none" | Required. Image layout. Accepted format: none, 2x2, 1x2, 1x3, oval-icons. |
slideCount | number | 1 | Required. Static/default count. Accepted format: Positive integer. |
slideCountMode | string enum | "static" | Optional. Count mode. Accepted format: static, varying. |
slideCountMin | number | 1 | Optional. Varying lower bound. Accepted format: Positive integer. |
slideCountMax | number | 1 | Optional. Varying upper bound. Accepted format: Positive integer. |
noText | boolean | true | Required. Disable text rendering. Accepted format: true, false. |
overlay | boolean | true | Required. Enable overlay rendering. Accepted format: true, false. |
aiImageSelection | boolean | true | Optional. Let the model choose media. Accepted format: true, false. |
overlayImage | object | { enabled, collectionId?, padding } | Optional. Overlay-image policy. Accepted format: { enabled, collectionId?, padding }. |
slideOverrides | object[] | { slideIndex, contentDirection }[] | Optional. Per-slide copy direction. Accepted format: { slideIndex, contentDirection }[]. |
imageOverrides | object[] | { slideIndex, collectionId }[] | Optional. Per-slide media source. Accepted format: { slideIndex, collectionId }[]. |
imageMode | string enum | "collection" | Optional. Image selection mode. Accepted format: collection, single_image. |
TextItem
| Field | Type | Example | Description |
|---|---|---|---|
id | string | "record-123" | Required. Text-box identity. Accepted format: Stable ID. |
text | string | "Example" | Required. Text/prompt content. |
fontSize | string | "Example" | Required. Font size. Accepted format: CSS-like size string. |
textStyle | string | "Example" | Required. Text style. Accepted format: Registered style. |
font | string | "Example" | Required. Font. Accepted format: Font family. |
textPosition | string enum | "top" | Required. Vertical placement. Accepted format: top, center, bottom. |
textItemWidth | string | "Example" | Required. Text box width. Accepted format: CSS-like width. |
wordLengthMin | number | 1 | Required. Minimum generated word count. Accepted format: Non-negative integer. |
wordLengthMax | number | 1 | Required. Maximum generated word count. Accepted format: Integer ≥ minimum. |
contentDirection | string | "Example" | Required. Generation instruction. |
textMode | string enum | "prompt" | Required. Generated vs fixed text. Accepted format: prompt, static. |
staticText | string | "Example" | Required. Fixed text when static. |
textAlign | string enum | "left" | Required. Horizontal alignment. Accepted format: left, center, right. |
textAnchor | string enum | "padded" | Required. Horizontal safe-area behavior. Accepted format: padded, flush. |
textVerticalAnchor | string enum | "padded" | Optional. Vertical safe-area behavior. Accepted format: padded, flush. |
TikTokPostSettings
| Field | Type | Example | Description |
|---|---|---|---|
caption | PostTextSetting | "mode" | Required. Caption rule. Accepted format: mode: prompt or static; resolution: generated or hook. |
description | PostTextSetting | "Example" | Required. Description rule. Accepted format: Same contract as caption. |
visibility | string enum | "PUBLIC_TO_EVERYONE" | Required. TikTok visibility. Accepted format: PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, SELF_ONLY. |
auto_music | boolean | true | Required. Automatic music. Accepted format: true, false. |
auto_post | boolean | true | Required. Automatic publication. Accepted format: true, false. |
allow_comments | boolean | true | Required. Comments permission. Accepted format: true, false. |
allow_duet | boolean | true | Required. Duet permission. Accepted format: true, false. |
allow_stitch | boolean | true | Required. Stitch permission. Accepted format: true, false. |
disclose_video_content | boolean | true | Required. AI/content disclosure. Accepted format: true, false. |
disclose_brand_organic | boolean | true | Required. Organic brand disclosure. Accepted format: true, false. |
disclose_branded_content | boolean | true | Required. Branded-content disclosure. Accepted format: true, false. |
post_mode | string enum | "MEDIA_UPLOAD" | Required. TikTok posting mode. Accepted format: MEDIA_UPLOAD, DIRECT_POST. |
publish_type | string enum | "slideshow" | Optional. Published media form. Accepted format: slideshow, video. |
slideshow_transition_style | string | "Example" | Optional. Transition name. |
slideshow_slide_duration | number | 1 | Optional. Per-slide duration. Accepted format: Positive seconds. |
slideshow_sound_id | string | "record-123" | Optional. Sound ID. Accepted format: Provider ID. |
slideshow_sound_name | string | "Example" | Optional. Sound name. |
slideshow_sound_url | string | "https://example.com/item" | Optional. Sound preview/source. Accepted format: URL. |
AutomationVideoFormat and AutomationVideoSegment
| Field | Type | Example | Description |
|---|---|---|---|
template | string enum | "ugc_ad" | Required. Video template. Accepted format: ugc_ad, greenscreen_meme, react_reveal, compilation, birdseye_pov, screen_record, screenshot_pictures, aesthetic, story_over_broll, faceless_reel. |
hookPlacement | string enum | "global" | Required. Hook text location. Accepted format: global, first_segment. |
globalTextItems | TextItem[] | [] | Required. Global overlays. Accepted format: Array. |
segments | AutomationVideoSegment[] | [] | Required. Ordered segment definitions. Accepted format: Array. |
segments[].id | string | "record-123" | Required. Segment identity. Accepted format: Stable ID. |
segments[].label | string | "Example" | Required. Display label. |
segments[].guidance | string | "Example" | Required. Generation/edit guidance. |
segments[].mediaSource | string enum | "collection" | Required. Source family. Accepted format: collection, demo_asset, slideshow_automation. |
segments[].mediaKind | string enum | "video" | Required. Expected media. Accepted format: video, image. |
segments[].collectionId | string | "record-123" | Required. Collection source. Accepted format: Collection ID or normalized empty value. |
segments[].demoAssetId | string | "record-123" | Required. Demo source. Accepted format: Asset ID or normalized empty value. |
segments[].slideshowAutomationId | string | "record-123" | Optional. Slideshow source. Accepted format: Automation ID. |
segments[].clipCount | number | 1 | Required. Number of clips. Accepted format: Positive integer. |
segments[].clipDurationMs | number | 1 | Required. Target clip duration. Accepted format: Positive integer. |
segments[].playFullVideo | boolean | true | Optional. Bypass clipping. Accepted format: true, false. |
segments[].transition | string enum | "cut" | Required. Transition into next segment. Accepted format: cut, fade. |
segments[].textItems | TextItem[] | [] | Required. Segment overlays. Accepted format: Array. |
AutomationUgcConfig
| Field | Type | Example | Description |
|---|---|---|---|
enabled | boolean | true | Required. Enable UGC flow. Accepted format: true, false. |
productUrl | string | "https://example.com/item" | Optional. Product source. Accepted format: URL. |
productBrief | string | "Example" | Optional. Product direction. |
actorSource | string enum | "generate" | Required. Actor source. Accepted format: generate, gallery, upload. |
actorAssetUrl | string | "https://example.com/item" | Optional. Selected actor media. Accepted format: URL/path. |
actorPrompt | string | "Example" | Optional. Actor generation prompt. |
voiceId | string | "record-123" | Required. Voice selection. Accepted format: Provider voice ID. |
voiceModel | string | "Example" | Optional. Voice model. Accepted format: Provider model ID. |
lipSyncTier | string enum | "standard" | Required. Lip-sync quality tier. Accepted format: standard, premium. |
targetDurationSeconds | number | 1 | Required. Target duration. Accepted format: Positive number. |
brollCount | number | 1 | Required. B-roll count. Accepted format: Non-negative integer. |
captions.enabled | boolean | true | Required. Caption rendering. Accepted format: true, false. |
captions.style | string | "Example" | Required. Caption style. Accepted format: Registered/free style. |
captions.fallback | string enum | "drawtext" | Required. Caption fallback renderer. Accepted format: drawtext, png_frames. |
hookOverlay.enabled | boolean | true | Required. Hook overlay. Accepted format: true, false. |
hookOverlay.durationMs | number | 1 | Required. Overlay duration. Accepted format: Non-negative integer. |
hookOverlay.style | string | "Example" | Required. Overlay style. Accepted format: Registered/free style. |
XAutomationRecord
| Field | Type | Example | Description |
|---|---|---|---|
id | string | "record-123" | Required. Automation ID. Accepted format: Stable domain ID. |
ownerId | string | "record-123" | Optional. Owner. Accepted format: Railway user ID. |
platform | string enum | "x" | Required. Target platform. Accepted format: x, threads. |
name | string | "Example" | Required. Display name. |
status | string enum | "live" | Required. Lifecycle. Accepted format: live, paused. |
createdAt | ISO datetime | "2026-08-01T09:00:00.000Z" | Required. Creation time. Accepted format: ISO 8601. |
updatedAt | ISO datetime | "2026-08-01T09:00:00.000Z" | Required. Last update. Accepted format: ISO 8601. |
niche.label | string | "Example" | Required. Niche label. |
brief | XAutomationBrief or null | null | Required. Inferred/editorial brief. Accepted format: Object or null. |
excludedTopics | string[] | [] | Required. Prohibited topics. Accepted format: Array. |
proofBank | ProofEntry[] | "kind" | Required. Approved proof. Accepted format: kind: result, testimonial, stat. |
output.contentType | string enum | "single" | Required. Output form. Accepted format: single, thread, article. |
output.archetype | string enum | "Example" | Required. Writing structure. Accepted format: See archetypes below. |
output.singleLength | string enum | "short" | Required. Single-post length. Accepted format: short, standard, long. |
output.maxCharacters | number | 1 | Required. Platform character ceiling. Accepted format: Positive integer. |
output.threadPostCount | range | { min, max } | Required. Thread length. Accepted format: { min, max }. |
output.articleWordCount | range | { min, max } | Required. Article length. Accepted format: { min, max }. |
generation.model | string | "Example" | Required. Text model. Accepted format: Registered model ID. |
generation.autoInferBrief | boolean | true | Required. Infer brief automatically. Accepted format: true, false. |
generation.language | string | "Example" | Required. Language. Accepted format: Language label/code. |
generation.hookStyles | string[] | [] | Required. Hook directions. Accepted format: Array. |
generation.voicePreset | string | "Example" | Required. Voice preset. Accepted format: Registered/free preset. |
generation.voiceOverride | string | "Example" | Required. Custom voice direction. |
media.mode | string enum | "none" | Required. Image generation policy. Accepted format: none, generate. |
media.aspectRatio | string enum | "1:1" | Required. Generated-image ratio. Accepted format: 1:1, 4:5, 16:9. |
media.prompt | string | "Example" | Required. Image prompt direction. |
discovery.enabled | boolean | true | Required. Trend discovery. Accepted format: true, false. |
discovery.sources | string[] | "x" | Required. Discovery networks. Accepted format: x, tiktok, instagram. |
discovery.lookbackHours | number | 1 | Required. Discovery window. Accepted format: Positive number. |
discovery.minimumViews | number | 1 | Required. View threshold. Accepted format: Non-negative number. |
discovery.minimumEngagementRate | number | 1 | Required. Engagement threshold. Accepted format: Non-negative percentage. |
discovery.reactionMode | string enum | "none" | Required. Reaction behavior. Accepted format: none, repost, quote. |
benchmarks | XAutomationBenchmark[] | [] | Required. Reference posts. Accepted format: Array. |
publishing.integrations | PostFastSocialIntegration[] | [] | Required. Targets. Accepted format: Array. |
publishing.autoPost | boolean | true | Required. Auto-publication. Accepted format: true, false. |
schedule | AutomationSchedule | "Example" | Required. Schedule. Accepted format: See earlier table. |
usage | object | { "key": "value" } | Required. Bounded repetition memory. Accepted format: Recent archetypes/hooks/bodies. |
operations | XAutomationOperation[] | "kind" | Required. Auditable background operations. Accepted format: kind: derive_brief; status succeeded or failed. |