muapi-social-pack

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Social Media Pack

社交媒体素材包

Re-render a hero image into Instagram, TikTok, YouTube-shorts and Twitter/X aspect ratios.
Estimated credits: ~24 per run.
将主视觉图重新渲染为Instagram、TikTok、YouTube Shorts和Twitter/X适配的宽高比。
预估消耗积分: 每次运行约24积分。

Inputs

输入参数

NameTypeRequiredDefaultDescription
source_image
image_urlyesURL of the hero image (or asset_id from this session).
caption_idea
textnoOptional caption / overlay direction (kept short).
formats
listno1:1, 9:16, 4:5, 16:9Aspect ratios to produce.
名称类型必填默认值描述
source_image
image_url主视觉图的URL(或本次会话中的asset_id)。
caption_idea
text可选的文案/叠加层方向(需简洁)。
formats
list1:1, 9:16, 4:5, 16:9要生成的宽高比。

Steps

步骤

Use the plan to fan out one node per format.
  1. For each requested aspect ratio in
    {{formats}}
    :
    • Call
      muapi image edit
      (model=nano-banana-2-edit) with the source image.
    • Prompt: "Reframe the composition to {{aspect_ratio}} for social media. Keep the subject centred and uncropped. Match the original lighting and palette. {{caption_idea_hint}}".
    • Where
      {{caption_idea_hint}}
      = "Leave headroom at the top for a caption: '<caption_idea>'." (only if caption_idea is non-empty).
  2. All formats run in parallel (no inter-node dependencies).
  3. Return one asset id per format, labelled with the platform it suits:
    • 1:1 → Instagram feed
    • 9:16 → TikTok / IG Reels / YT Shorts
    • 4:5 → Instagram portrait
    • 16:9 → Twitter / X / YouTube
    • 21:9 → cinematic banner
按照计划为每种格式创建一个并行节点。
  1. 针对
    {{formats}}
    中的每个请求宽高比:
    • 调用
      muapi image edit
      (model=nano-banana-2-edit)并传入源图片。
    • 提示词:“将构图重新调整为{{aspect_ratio}}以适配社交媒体。保持主体居中且不被裁剪。匹配原图的光线和色调。{{caption_idea_hint}}”。
    • 其中
      {{caption_idea_hint}}
      = “在顶部预留空间用于添加文案:'<caption_idea>'。”(仅当caption_idea不为空时使用)。
  2. 所有格式并行处理(节点间无依赖关系)。
  3. 返回每种格式对应的资产ID,并标注适配的平台:
    • 1:1 → Instagram动态
    • 9:16 → TikTok / IG Reels / YT Shorts
    • 4:5 → Instagram竖版动态
    • 16:9 → Twitter / X / YouTube
    • 21:9 → 电影感横幅

Notes

注意事项

  • Don't generate fresh images — only reframe / re-edit the source.
  • If the source already matches a format, skip that node and surface the original asset id for it.
  • 请勿生成全新图片——仅对源图进行重构图/重新编辑。
  • 如果源图已匹配某一格式,则跳过该节点并直接返回原资产ID。

Trigger Keywords

触发关键词

social pack
,
resize for social
,
cross-post
,
multi-platform

social pack
,
resize for social
,
cross-post
,
multi-platform

Notes for the Executing Agent

执行Agent注意事项

  • This recipe is LLM-orchestrated: read each phase, gather any missing inputs from the user, then call
    muapi
    CLI commands. Use
    muapi auth configure
    first if
    MUAPI_API_KEY
    is unset.
  • For model IDs without a CLI alias yet, fall back to the raw endpoint via
    curl -X POST https://api.muapi.ai/api/v1/<endpoint> -H "x-api-key: $MUAPI_API_KEY" -H 'content-type: application/json' -d '{...}'
    and poll with
    muapi predict wait <request_id>
    .
  • Substitute
    {{input_name}}
    placeholders with the user's actual inputs before issuing each call.
  • 本流程由LLM编排:阅读每个阶段,向用户收集缺失的输入,然后调用
    muapi
    CLI命令。如果
    MUAPI_API_KEY
    未设置,请先使用
    muapi auth configure
    进行配置。
  • 对于尚未有CLI别名的模型ID,可通过原始端点调用:
    curl -X POST https://api.muapi.ai/api/v1/<endpoint> -H "x-api-key: $MUAPI_API_KEY" -H 'content-type: application/json' -d '{...}'
    ,并使用
    muapi predict wait <request_id>
    轮询结果。
  • 在发出每个调用前,将
    {{input_name}}
    占位符替换为用户的实际输入。