Workflows#
End-to-end recipes for driving ZenCreator from your AI client. Each recipe gives the goal, an example natural-language ask you can give your agent, and the ordered MCP-tool chain — naming the generation tool (the tool_name value) it submits to zencreator_create_task.
Two layers, kept distinct. The
zencreator_*names below are MCP tools your client calls. The lowercase names likeby_prompt,image_editor,videogenare generation tools you pass as thetool_nameargument intozencreator_create_task. See Concepts for the full distinction and Models for the models each generation tool supports.
Prices in these examples are illustrative. Credit cost varies by generation tool, model, resolution, and duration, and is backend-driven. Always call
zencreator_estimate_price(orzencreator_compare_prices) and state the cost before you submit. Never trust a remembered number.
Reference pages used below: Generation tools · Assets · Templates · Models.
1. Text → image from scratch (by_prompt)#
Goal: Generate a brand-new image from a text prompt.
Ask your agent: "Generate a wide cinematic shot of a neon-lit Tokyo alley at night, photoreal."
Tool chain:
zencreator_list_tools— confirmby_promptis available and not blocked, and see its models and prices at a glance.zencreator_get_tool_schema(forby_prompt) — read the input/output JSON Schema, the prompt guide, and per-model guidance. Call this before submitting so you build a valid input. Optionallyzencreator_get_model_prompt_guidefor a specific model's prompt tips.zencreator_estimate_price— get the exact credit cost of your candidate input. State it to the user before confirming. To shop across models, usezencreator_compare_prices(cheapest first; it sweeps resolutions where relevant).- Submit and wait. For a single image this turn,
zencreator_run_and_waitis best: it submits and blocks until the task reaches a terminal status, then auto-fetches outputs and asset ids.- Alternatively, the explicit path:
zencreator_create_task(returns a task id) → pollzencreator_get_taskuntil terminal →zencreator_get_call_resultto fetch the call's full output and asset ids.zencreator_get_call_resultis required to discover generated asset ids — per-call output onzencreator_get_taskis lazy/null.
- Alternatively, the explicit path:
- Show or download the result.
zencreator_get_asset_preview_urlreturns a web preview (and can attach the image inline so it renders in chat).zencreator_get_asset_download_urlreturns a presigned link to the original. Use the_urls(batch) variants for multiple assets.
2. Edit / composite with a reference (image_editor)#
Goal: Edit, restyle, or composite using one or more reference images. image_editor is the main, most flexible image tool.
Ask your agent: "Take this product photo and place the bottle on a marble countertop with soft window light."
Tool chain:
zencreator_upload_asset— upload each reference image (from a URL or base64). Returns anasset_idyou pass into the generation input.zencreator_get_tool_schema(forimage_editor) — see how to wire the referenceasset_id(s) and prompt into the input, plus model guidance.zencreator_estimate_price— confirm the cost for your chosen model and resolution.zencreator_create_taskwithtool_name: "image_editor"— submit. (Image edits are usually fast enough forzencreator_run_and_waitif you want it inline.)- Fetch the result:
zencreator_get_call_resultfor the asset ids, thenzencreator_get_asset_preview_url/zencreator_get_asset_download_url.
Need a similar image from a reference rather than an edit? The legacy
by_refgeneration tool exists, but preferimage_editor.
3. Animate a photo → video (videogen)#
Goal: Turn a still image into a short video (or generate video from text).
Ask your agent: "Animate this portrait — gentle head turn and blinking, 5 seconds."
Tool chain:
zencreator_upload_asset— upload the source photo →asset_id.zencreator_get_tool_schema(forvideogen) — read the input shape (first frame asset, prompt, duration/resolution) and model guidance.zencreator_estimate_price— video cost scales with duration and resolution; estimate before submitting.zencreator_create_taskwithtool_name: "videogen"— submit and keep the returned task id.- Poll, don't block.
zencreator_get_taskto check status (orzencreator_get_processing_tasksfor a cheap "anything still running?"). When terminal,zencreator_get_call_resultto fetch the video asset id, thenzencreator_get_asset_download_url/zencreator_get_asset_preview_url.
Use
zencreator_create_task+ polling for video — notzencreator_run_and_wait. Videos take roughly 60–180s and can exceed your client's transport timeout if you block on them.run_and_waitis for images.
4. Use a template / preset#
Goal: Start from a ready-made preset instead of authoring an input by hand. (A template is also called a preset.)
Ask your agent: "Find a cyberpunk portrait template and run it on my uploaded face."
Tool chain:
- Find the template.
zencreator_list_templates(paginated) to browse, orzencreator_search_templatesfor semantic + keyword search if your deployment has the search subsystem enabled (it may not be available on every deployment). zencreator_get_template— fetch the full template, including its ready-to-submit input, so you can see exactly what it will run.zencreator_use_template— one-shot: fetch the template, merge any overrides you supply (e.g. swap in your own referenceasset_idor tweak the prompt), and submit in a single call.- Fetch the result the usual way:
zencreator_get_call_result→zencreator_get_asset_preview_url/zencreator_get_asset_download_url.
If you uploaded a reference to use in the template, do
zencreator_upload_assetfirst and pass the returnedasset_idas an override.
See Templates tools for the full reference.
5. Quick recipes#
All of these follow the same backbone: zencreator_get_tool_schema → zencreator_estimate_price → zencreator_create_task → zencreator_get_call_result → preview/download. Only the tool_name (and which assets you upload) changes.
| Goal | Generation tool (tool_name) |
Inputs to prepare |
|---|---|---|
| Swap a face onto a photo (image only) | faceswap |
Upload the target photo and the face source via zencreator_upload_asset. |
| Upscale an image to higher resolution | upscaler |
Upload (or reuse) the source image asset_id. |
| Talking-head lip-sync | lipsync |
Upload audio + a first-frame image; produces a talking head. |
| Text → video | text_to_video |
A text prompt only (no source image needed). Trusted-only tool — needs is_trusted. |
| Stitch 2–5 clips into one video | video_merger |
Upload each clip via zencreator_upload_asset; pass them as clips[] (each with its source_duration_sec, optional trims), plus transition / fps. The final assembly step after generating clips with videogen / text_to_video. |
Reminders:
- Face-swap and upscaler are image-only — for video, use
video2video(replace a character in a video) orvideo_upscalerinstead. lipsync,text_to_video, and any video output take 60–180s — submit withzencreator_create_taskand pollzencreator_get_task, don'trun_and_wait.- Always
zencreator_estimate_pricefirst; cost varies by model, resolution, and (for video) duration.
See Generation tools for every tool_name and Models for the models each one supports.
6. NSFW workflow#
ZenCreator supports uncensored / NSFW generation, gated by two account flags. Be frank but factual.
Goal: Generate adult content with an appropriate model.
Ask your agent: "I want to generate NSFW content — check my account is set up for it, then make this image."
Tool chain:
zencreator_get_me— checknsfw_allowedandis_trusted.nsfw_allowedmust betrue. If it'sfalse, the fix is: enable adult content in your ZenCreator account settings, then retry.is_trusted(Trusted Status) is required for trusted-only models — marked (trusted) in the model lists — and for the trusted-only toolsmale_undresser,flux_klein_lora,text_to_video. Trusted Status is granted automatically after your first payment (any credit pack) and is permanent.
- (Optional)
zencreator_craft_prompt— delegate authoring of the explicit, model-specific prompt to an uncensored sidecar LLM. This exists precisely so an orchestrator that won't write explicit prompts itself can still drive NSFW workflows. It spends no ZenCreator credits. (Available only when the prompt-agent sidecar is configured on your deployment.) - Pick a model. Choose an NSFW-capable (and, if needed, trusted) model for your generation tool — for example
SDXL_NSFW,FLUX_KLEIN_NSFW, or[email protected]. Theundress/male_undressergeneration tools (built on the Flux Klein LoRA) are purpose-built for removing clothing. See Models for the full list and which are (trusted). zencreator_get_tool_schema+zencreator_estimate_price— validate the input and confirm cost.zencreator_create_task(orzencreator_run_and_waitfor images) →zencreator_get_call_result→ preview/download.
Credits and running out#
Generation spends credits. Before you commit, call zencreator_estimate_price (or zencreator_compare_prices to shop models) and state the cost to the user.
If you run out mid-flight, generation returns HTTP 402 with a structured signal:
{ "error_code": "insufficient_credits", "out_of_credits": true, "purchase_url": "...", "message": "..." }
The same out_of_credits + purchase_url also appear in zencreator_get_me, so "out of credits" reads identically whether you check ahead or hit it mid-generation. Top up at https://app.zencreator.pro/billing.