Generate a video
Run this on the hosted Comfy Cloud connector (https://cloud.comfy.org/mcp). The user signs in with that connector's OAuth flow. Use the signed-in account. There is no API key to collect in chat, and there is no local ComfyUI install to start.
The server's tool descriptions and the built-in generate-video prompt own the call sequence and any dated model notes. Use those for arguments. Resolve model, template, and node names with the tools at run time.
What to do
- When they supply a source image or video,
upload_file it first and use the returned name in whichever route runs below. Do not inline media bytes.
- When the user names a model family, check both routes before spending money:
search_nodes for a partner or API node, and search_templates for an open-source template under the same family. Tell them apart with the fields those tools return (category, name prefix, tags), not with a remembered list. If only the partner route exists, call partner_generate for video, then stop, unless they asked to build a workflow. Its description names providers, not model ids, so pass your best-guess model slug. A wrong slug is rejected before the job is queued, and the error names the closest real slugs (Did you mean). Re-call once, and only when a suggestion keeps the provider prefix of the slug you guessed. If the bounce names a params.model tier, send that tier with the slug. A tier-shaped guess belongs in params.model; re-calling the bare slug runs that entry's default tier at a different price. Say which slug you switched to. If that re-call bounces too, stop. Suggestions are ranked across the whole registry, so one may name a provider the user never asked for. If none keeps your guess's provider prefix, do not re-call — that call queues and charges — and ask which model to use. Inside submit_batch, resend only the bounced item. Guessing costs one rejected call, so do not skip the tool for lack of a list. If the tool says "unknown model" with no close match, or "not yet implemented", continue with a template. If both an open-source template and a partner route exist, say so and ask which they want, unless they already chose. When they pick the partner route, call partner_generate for video as above, then stop, unless they asked to build a workflow. When they pick the open-source route, continue with a template. The open-source route has no partner fee and still spends Comfy Cloud compute credits when it runs on Comfy Cloud. Do not tell them the open-source route is gone until a broader search also misses it.
- Otherwise prefer a template. Search
search_templates for text-to-video, image-to-video, or the task they named. Filter with the tool's tag or media-type arguments when a text search is mostly images. Run a fit with get_template_schema and run_template.
- Hand-build only when no template fits. Discover loaders, samplers, and video save nodes with
search_nodes. Give every node a _meta.title in plain words. The graph needs an input that carries the request and a save or output node wired to the final video. Partner nodes often omit the save node.
- Video runs take longer than images. Wait with
wait_for_job, then get_output. In chat, show the returned link. When a download command is present and this session has a shell, run that command unchanged. Leave signed URL query strings as returned.
- When they asked for a workflow they can reopen,
save_workflow and return get_workflow_canvas_url. Say the layout is auto-generated. For a subgraph template, say the canvas shows one collapsed node and how to open it (double-click the node body, or right-click and unpack).
- When they ask to adjust this result (seed, prompt wording, duration, resolution, or a different reference) rather than a new subject, do not rebuild the graph and do not re-send the JSON. Call
submit_workflow with from_prompt_id set to the run being adjusted and input_overrides holding only the changed inputs ({nodeId: {inputName: value}}). If you do not know the node id, call get_job_status with include_workflow: true on that prompt id first. A new reference still goes through upload_file; override the loader input with the returned name. If that result came from partner_generate, there is no workflow to rerun: call partner_generate again with the changed fields. If they want this exact clip edited rather than the workflow's inputs changed, use use_previous_output or partner_generate media inputs.
If a family search comes back empty, broaden the query once before telling the user that route does not exist. Discovery does not spend generation credits. A generation needs an active Comfy Cloud subscription. If a run is refused, check get_billing_status and report what it says.
1---2name: generate-video3description: Generate, edit, or extend a video on Comfy Cloud. Use when the user asks for a clip, animation, text-to-video, image-to-video, or to change or continue a video they already have.4metadata:5 source: https://skillmd.com/skills/comfy-org/generate-video6---78# Generate a video910Run this on the hosted Comfy Cloud connector (`https://cloud.comfy.org/mcp`). The user signs in with that connector's OAuth flow. Use the signed-in account. There is no API key to collect in chat, and there is no local ComfyUI install to start.1112The server's tool descriptions and the built-in `generate-video` prompt own the call sequence and any dated model notes. Use those for arguments. Resolve model, template, and node names with the tools at run time.1314## What to do15161. When they supply a source image or video, `upload_file` it first and use the returned name in whichever route runs below. Do not inline media bytes.172. When the user names a model family, check both routes before spending money: `search_nodes` for a partner or API node, and `search_templates` for an open-source template under the same family. Tell them apart with the fields those tools return (category, name prefix, tags), not with a remembered list. If only the partner route exists, call `partner_generate` for video, then stop, unless they asked to build a workflow. Its description names providers, not model ids, so pass your best-guess model slug. A wrong slug is rejected before the job is queued, and the error names the closest real slugs (`Did you mean`). Re-call once, and only when a suggestion keeps the provider prefix of the slug you guessed. If the bounce names a `params.model` tier, send that tier with the slug. A tier-shaped guess belongs in `params.model`; re-calling the bare slug runs that entry's default tier at a different price. Say which slug you switched to. If that re-call bounces too, stop. Suggestions are ranked across the whole registry, so one may name a provider the user never asked for. If none keeps your guess's provider prefix, do not re-call — that call queues and charges — and ask which model to use. Inside `submit_batch`, resend only the bounced item. Guessing costs one rejected call, so do not skip the tool for lack of a list. If the tool says "unknown model" with no close match, or "not yet implemented", continue with a template. If both an open-source template and a partner route exist, say so and ask which they want, unless they already chose. When they pick the partner route, call `partner_generate` for video as above, then stop, unless they asked to build a workflow. When they pick the open-source route, continue with a template. The open-source route has no partner fee and still spends Comfy Cloud compute credits when it runs on Comfy Cloud. Do not tell them the open-source route is gone until a broader search also misses it.183. Otherwise prefer a template. Search `search_templates` for text-to-video, image-to-video, or the task they named. Filter with the tool's tag or media-type arguments when a text search is mostly images. Run a fit with `get_template_schema` and `run_template`.194. Hand-build only when no template fits. Discover loaders, samplers, and video save nodes with `search_nodes`. Give every node a `_meta.title` in plain words. The graph needs an input that carries the request and a save or output node wired to the final video. Partner nodes often omit the save node.205. Video runs take longer than images. Wait with `wait_for_job`, then `get_output`. In chat, show the returned link. When a download command is present and this session has a shell, run that command unchanged. Leave signed URL query strings as returned.216. When they asked for a workflow they can reopen, `save_workflow` and return `get_workflow_canvas_url`. Say the layout is auto-generated. For a subgraph template, say the canvas shows one collapsed node and how to open it (double-click the node body, or right-click and unpack).227. When they ask to adjust this result (seed, prompt wording, duration, resolution, or a different reference) rather than a new subject, do not rebuild the graph and do not re-send the JSON. Call `submit_workflow` with `from_prompt_id` set to the run being adjusted and `input_overrides` holding only the changed inputs (`{nodeId: {inputName: value}}`). If you do not know the node id, call `get_job_status` with `include_workflow: true` on that prompt id first. A new reference still goes through `upload_file`; override the loader input with the returned name. If that result came from `partner_generate`, there is no workflow to rerun: call `partner_generate` again with the changed fields. If they want this exact clip edited rather than the workflow's inputs changed, use `use_previous_output` or `partner_generate` media inputs.2324If a family search comes back empty, broaden the query once before telling the user that route does not exist. Discovery does not spend generation credits. A generation needs an active Comfy Cloud subscription. If a run is refused, check `get_billing_status` and report what it says.