Common Workflows

Short examples for the loops agents usually need: discover state, prepare content, confirm the action, then track the result.

View Markdown

Discover workspace state

CLIbash
reelsfarm agent status
reelsfarm social connected --agent
reelsfarm assets list --category products --agent
reelsfarm posts list --status SCHEDULED --agent
SDKts
const account = await rf.account.get();
const connected = await rf.social.listConnected();
const products = await rf.assets.list("products", { limit: 10 });
const posts = await rf.posts.list({ status: "SCHEDULED", limit: 10 });

Generate an avatar

CLIbash
reelsfarm avatars generate \
  --prompt "Creator selfie style, bright room, holding a phone" \
  --model gpt-image-2.5-sunburst \
  --aspect-ratio 9:16 \
  --quality high \
  --agent

reelsfarm confirm conf_123 --agent
SDKts
const preparedOrJob = await rf.avatars.generate({
  prompt: "Creator selfie style, bright room, holding a phone",
  model: "gpt-image-2.5-sunburst",
  aspectRatio: "9:16",
  quality: "high",
});

if ("wait" in preparedOrJob) {
  const result = await preparedOrJob.wait();
}

Avatar model and quality values

Use gpt-image-2.5-sunburst for GPT Image 2.5. Reels Farm routes new images to its generation model and reference edits or conversation continuations to its editing model. GPT Image 2 and GPT Image 2.5 accept low, medium, or high quality. Seedream 5.0 Pro accepts basic or high. Omit quality for Nano Banana models.

Generate slideshow text

CLIbash
reelsfarm slideshows generate-text \
  --prompt "Summer serum launch for TikTok" \
  --slide-count 6 \
  --agent
SDKts
const slideshowText = await rf.slideshows.generateText({
  prompt: "Summer serum launch for TikTok",
  slideCount: 6,
});

Upload product images from an agent

These calls are composable primitives, not a fixed campaign workflow. The create call reserves the shared product-assets quota in request order. In Review mode, confirm it once; completion is an idempotent continuation that must use the same MCP connection and needs no second confirmation.

MCP callsjson
reelsfarm_create_product_upload_sessions
{
  "idempotencyKey": "summer-products-upload-001",
  "files": [
    { "clientId": "front", "filename": "front.webp", "contentType": "image/webp", "size": 481233, "displayName": "Serum front" },
    { "clientId": "detail", "filename": "detail.jpg", "contentType": "image/jpeg", "size": 732190 }
  ]
}

PUT each sessions[].uploadUrl
Use every returned header and the exact declared file bytes.

reelsfarm_complete_product_upload_sessions
{ "sessionIds": ["session_uuid_1", "session_uuid_2"] }

Partial quota fill

The response accepts as many files as fit, in input order, and returns the rest under skipped. Sessions expire after 15 minutes; each file is limited to 100 MB and must be PNG, JPEG, or WebP.

Finalize and export a slideshow video

MCP callsjson
reelsfarm_prepare_finalize_slideshow
{ "slideshowId": "slideshow_uuid", "slides": [/* strict finalized slide objects */], "idempotencyKey": "finalize-summer-001" }

reelsfarm_get_slideshow_export_job_status
{ "jobId": "finalize_job_id" }

reelsfarm_prepare_export_slideshow_video
{ "slideshowId": "slideshow_uuid", "idempotencyKey": "video-summer-001" }

reelsfarm_get_slideshow_video_export_job_status
{ "jobId": "video_export_job_id" }

Video export uses the slideshow-video credit cost. If the finalized slideshow has not changed, the prepare call can return a cached normalized video artifact immediately instead of a new job.

Reuse videos in UGC and schedule the result

MCP callsjson
reelsfarm_list_videos
{ "sourceType": "SLIDESHOW", "limit": 20 }

reelsfarm_prepare_generate_ugc_video
{
  "idempotencyKey": "ugc-summer-001",
  "parts": [
    { "videoUrl": "/api/assets/user-uploads?key=user/hooks/hook.mp4", "sourceType": "my-hooks", "assetCategory": "hooks" },
    { "videoId": "slideshow_video_uuid", "sourceType": "my-videos", "assetCategory": "videos" }
  ],
  "quality": "high"
}

reelsfarm_get_video_job_status
{ "jobId": "ugc_job_id" }

reelsfarm_preflight_publishing
{
  "contentType": "UGC_VIDEO",
  "contentId": "completed_ugc_video_uuid",
  "publishFormat": "VIDEO",
  "connectionIds": ["22222222-2222-4222-8222-222222222222"]
}

reelsfarm_prepare_schedule_post
{
  "contentType": "UGC_VIDEO",
  "contentId": "completed_ugc_video_uuid",
  "scheduledFor": "2026-09-20T15:00:00Z",
  "publishFormat": "VIDEO",
  "platforms": [{ "platform": "TIKTOK", "connectionId": "22222222-2222-4222-8222-222222222222" }],
  "idempotencyKey": "schedule-summer-001"
}

Ordered parts

Part order is composition order, so placing a reusable slideshow video after a hook produces the intended hook-then-slideshow UGC output. A part must provide exactly one of videoId or videoUrl.

Generate a product scene

SDKts
const scene = await rf.productScenes.generate({
  avatarUrl: "https://example.com/avatar.png",
  productImageUrl: "https://example.com/product.png",
  prompt: "Natural UGC kitchen counter shot, creator holding the product",
});

Product scene generation starts an asynchronous Product Studio composition. In Review, approve and confirm the prepared action first. In Creator or Autopilot, an allowed prepare call can start the job immediately. Poll the returned job or use the SDK job wrapper.

Schedule content

CLIbash
reelsfarm posts preflight \
  --content-type SLIDESHOW \
  --content-id 11111111-1111-4111-8111-111111111111 \
  --publish-format VIDEO \
  --connection-ids 22222222-2222-4222-8222-222222222222 \
  --agent

reelsfarm posts schedule \
  --content-type SLIDESHOW \
  --content-id 11111111-1111-4111-8111-111111111111 \
  --when 2026-10-01T15:00:00Z \
  --publish-format VIDEO \
  --platforms-json '[{"platform":"TIKTOK","connectionId":"22222222-2222-4222-8222-222222222222","tiktokPublishMode":"DIRECT","tiktokPrivacyLevel":"PUBLIC_TO_EVERYONE","tiktokIsAigc":true}]' \
  --caption "Launch day" \
  --agent

reelsfarm confirm conf_123 --agent
SDKts
const readiness = await rf.posts.preflight({
  contentType: "SLIDESHOW",
  contentId: "11111111-1111-4111-8111-111111111111",
  publishFormat: "VIDEO",
  connectionIds: ["22222222-2222-4222-8222-222222222222"],
});

// Inspect settingsSchema, rules, and limits before choosing platform settings.
if (readiness.targets.some((target) => !target.ready)) {
  throw new Error("Resolve publishing preflight issues first");
}
console.log(readiness.targets.map(({ settingsSchema, rules, limits }) => ({ settingsSchema, rules, limits })));

const prepared = await rf.posts.schedule({
  contentType: "SLIDESHOW",
  contentId: "11111111-1111-4111-8111-111111111111",
  scheduledFor: "2026-10-01T15:00:00Z",
  publishFormat: "VIDEO",
  caption: "Launch day",
  platforms: [{
    platform: "TIKTOK",
    connectionId: "22222222-2222-4222-8222-222222222222",
    tiktokPublishMode: "DIRECT",
    // Use a privacy option returned for this account and an explicit AI disclosure.
    tiktokPrivacyLevel: "PUBLIC_TO_EVERYONE",
    tiktokIsAigc: true,
  }],
});

Account-specific publishing settings

Publishing preflight returns settingsSchema, rules, and limits for each target. settingsSchema is JSON Schema 2020-12 for one platforms entry. Use its exact connectionId and platform. ready checks account and media readiness; required settings still need values. TikTok options reflect live account restrictions. Integration targets can expose fewer settings than native accounts. Missing limits are unknown. Repeat preflight when content, format, or destination changes.

For a native Instagram Reel, instagramShareToFeed defaults to false. False keeps the Reel in the Reels tab only. True also allows it on the profile grid. Send this setting only when the selected account's video settingsSchema includes it. It is not available for Instagram integration accounts or photo posts. Trial Reel and profile grid are separate settings.

Native Instagram video targetjson
{ "platform": "INSTAGRAM", "connectionId": "22222222-2222-4222-8222-222222222222", "instagramTestReel": false, "instagramShareToFeed": false }

Create an automation

CLIbash
reelsfarm automations create \
  --json-definition '{"name":"Daily TikTok","status":"PAUSED","targetConnectionId":"22222222-2222-4222-8222-222222222222","schedule":{"slots":[{"days":["mon"],"timeLocal":"09:00"}]},"content":{"topic":"mindset","slidesCount":5}}' \
  --agent

In Review, automation creation returns a prepared action. Autopilot can execute authorized automation work immediately. Creator blocks automation activation. Keep new automations paused until the content rules, account target, and schedule are settled.

Track the result

CLIbash
reelsfarm posts status --id post_123 --agent
reelsfarm events recent --limit 20 --agent
SDKts
const status = await rf.posts.getStatus("post_123");
const events = await rf.events.recent({ limit: 20 });