genmedia-workflow
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGenmedia workflow production
Genmedia工作流制作
Runtime: All endpoint calls run via the genmedia CLI. See theskill for command syntax; rungenmediaonce if not yet installed.genmedia init
Use this skill when a single model call is not enough. A workflow is a planned
sequence of genmedia calls with clear inputs, outputs, dependencies, and
quality checks.
Load references as needed:
references/pipeline-patterns.mdreferences/node-rules.mdreferences/utility-endpoints.mdreferences/recipes.md- for creative model defaults
model-routing
Use for default creative model choices. Still inspect schemas,
check pricing when cost matters, and use exact endpoint fields.
model-routing当单次模型调用无法满足需求时,请使用此技能。工作流是一系列规划好的genmedia调用序列,具备明确的输入、输出、依赖关系和质量检查机制。
按需加载参考文档:
references/pipeline-patterns.mdreferences/node-rules.mdreferences/utility-endpoints.mdreferences/recipes.md- 用于创意模型默认配置
model-routing
使用选择默认的创意模型。仍需检查模式、在关注成本时查看定价,并使用精确的端点字段。
model-routingInputs to collect
需要收集的输入信息
Ask only for missing information that changes the pipeline:
- Final deliverable: image set, video, clips, audio, subtitles, dataset, social batch, product campaign, storyboard, style exploration.
- Source assets: product images, character references, first frames, video, audio, logo, transcript, brand guide.
- Runtime limits: quality target, cost sensitivity, number of variants, duration, aspect ratios, deadline.
- Continuity requirements: product identity, character face, scene layout, voice, color grade.
- Model preference: ask the user only when quality, speed, cost, or audio tradeoffs are not clear from the brief.
仅询问会改变流水线的缺失信息:
- 最终交付物:图像集、视频、剪辑、音频、字幕、数据集、社交平台批量内容、产品推广活动素材、分镜脚本、风格探索素材。
- 源资产:产品图片、角色参考图、首帧画面、视频、音频、标志、文字稿、品牌指南。
- 运行限制:质量目标、成本敏感度、变体数量、时长、宽高比、截止日期。
- 连续性要求:产品标识、角色面部特征、场景布局、语音、色彩分级。
- 模型偏好:仅当从需求简述中无法明确质量、速度、成本或音频方面的权衡时,才向用户询问。
Core workflow
核心工作流
-
Write a short pipeline graph before running anything.text
input assets -> planner -> generation nodes -> utility nodes -> QA -> final outputs -
Resolve endpoints for each role. Check known endpoint IDs first.bash
genmedia models --endpoint_id openai/gpt-image-2 --json genmedia models --endpoint_id fal-ai/nano-banana-pro/edit --json genmedia models --endpoint_id bytedance/seedance-2.0/image-to-video --json genmedia models --endpoint_id xai/grok-imagine-video/image-to-video --json genmedia models --endpoint_id veed/fabric-1.0 --jsonUse text search only as fallback discovery for roles not covered byor the utility reference:model-routingbashgenmedia models "image generation product photography" --json genmedia models "image editing reference preservation" --json genmedia models "image to video" --json genmedia models "subtitle video utility" --json genmedia docs "fal.ai workflow utility endpoints" --json -
Inspect every endpoint before use.bash
genmedia schema <endpoint_id> --json genmedia pricing <endpoint_id> --json -
Upload local files once and reuse returned URLs.bash
genmedia upload ./input.png --json genmedia upload ./voiceover.wav --json -
Run each node with JSON output. Use async for slow generation.bash
genmedia run <endpoint_id> --<field> "<value>" --json genmedia run <endpoint_id> --<field> "<value>" --async --json genmedia status <endpoint_id> <request_id> --download "./outputs/workflow/{request_id}_{index}.{ext}" --json -
For downstream nodes, pass the media URL from the previouswhen it is available. If you only have a local file path, upload it first.
result -
Download final assets with templates that cannot collide.bash
--download "./outputs/workflow/{request_id}_{index}.{ext}" -
Return a compact manifest.json
{ "goal": "short deliverable description", "nodes": [ { "id": "shot_01", "role": "image_to_video", "endpoint_id": "...", "request_id": "...", "input_urls": ["..."], "output_urls": ["..."], "downloaded_files": ["..."], "notes": "continuity or defect notes" } ], "final_files": ["..."] }
-
在运行任何操作前,编写简短的流水线图。text
输入资产 -> 规划器 -> 生成节点 -> 工具节点 -> 质量检查 -> 最终输出 -
为每个角色解析端点。首先检查已知的endpoint_id。bash
genmedia models --endpoint_id openai/gpt-image-2 --json genmedia models --endpoint_id fal-ai/nano-banana-pro/edit --json genmedia models --endpoint_id bytedance/seedance-2.0/image-to-video --json genmedia models --endpoint_id xai/grok-imagine-video/image-to-video --json genmedia models --endpoint_id veed/fabric-1.0 --json仅当或工具参考未覆盖对应角色时,才使用文本搜索作为后备发现方式:model-routingbashgenmedia models "image generation product photography" --json genmedia models "image editing reference preservation" --json genmedia models "image to video" --json genmedia models "subtitle video utility" --json genmedia docs "fal.ai workflow utility endpoints" --json -
使用前检查每个端点。bash
genmedia schema <endpoint_id> --json genmedia pricing <endpoint_id> --json -
上传本地文件一次,重复使用返回的URL。bash
genmedia upload ./input.png --json genmedia upload ./voiceover.wav --json -
以JSON输出运行每个节点。对慢速生成任务使用异步模式。bash
genmedia run <endpoint_id> --<field> "<value>" --json genmedia run <endpoint_id> --<field> "<value>" --async --json genmedia status <endpoint_id> <request_id> --download "./outputs/workflow/{request_id}_{index}.{ext}" --json -
对于下游节点,在前一个节点的可用时,传入媒体URL。如果只有本地文件路径,请先上传。
result -
使用不会冲突的模板下载最终资产。bash
--download "./outputs/workflow/{request_id}_{index}.{ext}" -
返回简洁的清单。json
{ "goal": "简短的交付物描述", "nodes": [ { "id": "shot_01", "role": "image_to_video", "endpoint_id": "...", "request_id": "...", "input_urls": ["..."], "output_urls": ["..."], "downloaded_files": ["..."], "notes": "连续性或缺陷说明" } ], "final_files": ["..."] }
Pipeline rules
流水线规则
- Keep one node responsible for one clear transformation.
- Fan out independent generation, crop, upscale, subtitle, or variation nodes.
- Keep sequential chains only when node B needs node A output.
- For consistency, prefer reference/edit or image-to-video over independent text-only generations.
- For default creative model choices, follow unless the user names a model.
model-routing - Use utility endpoints for deterministic work: crop, resize, grid, composite, audio merge, subtitle, speed change, compression.
- Record endpoint, schema-relevant parameters, request ID, and output path for every node.
- If a 422 error occurs, read , inspect schema again, then fix the exact field.
validation_errors
- 每个节点只负责一项明确的转换任务。
- 并行处理独立的生成、裁剪、放大、字幕或变体节点。
- 仅当节点B需要节点A的输出时,才使用顺序链。
- 为保证一致性,优先使用参考/编辑或图像转视频功能,而非独立的纯文本生成。
- 除非用户指定模型,否则遵循选择默认的创意模型。
model-routing - 使用工具端点处理确定性工作:裁剪、调整大小、网格布局、合成、音频合并、字幕添加、速度调整、压缩。
- 记录每个节点的端点、与模式相关的参数、请求ID和输出路径。
- 如果出现422错误,请查看,再次检查模式,然后修复精确的字段。
validation_errors
Quality gate
质量检查关卡
Before returning, verify:
- The pipeline graph matches the requested deliverable.
- No generation model was chosen from memory alone.
- All local source files were uploaded before use.
- Final files were saved through .
--download - Utility endpoints used exact schema fields.
- Continuity anchors were repeated where identity or product fidelity matters.
- Each node output is either accepted, retried, or marked with a defect.
If the workflow becomes too complex, stop expanding and ask the user to choose
between faster iteration, higher fidelity, or broader variation.
返回结果前,验证以下内容:
- 流水线图与请求的交付物匹配。
- 所有生成模型均不是仅凭记忆选择的。
- 所有本地源文件在使用前均已上传。
- 最终文件已通过保存。
--download - 工具端点使用了精确的模式字段。
- 在涉及标识或产品保真度的地方,重复使用了连续性锚点。
- 每个节点的输出要么被接受、重试,要么标记为有缺陷。
如果工作流变得过于复杂,请停止扩展并询问用户在更快迭代、更高保真度或更多变体之间进行选择。