Publish Your AI Workflow as an App: From Private Graph to /w/{slug}
Publishing compiles your WorkflowSpec, freezes a version, runs moderation, and lists a Hub app at /w/{slug} with JSON Schema inputs, estimates, remix lineage, and Open or Premium economics.
Publishing turns a private WorkflowSpec into a product: a moderated Hub listing, a shareable /w/{slug} app page, REST POST /w/{slug}/runs, and MCP tools — one promoted input schema, three surfaces. The AI workflow builder is where you finish the graph; the publish modal is where you choose Open vs Premium economics and ship.
The publish pipeline (four load-bearing steps)
POST /workflows/{id}/publish runs:
- Publish-mode compile — subworkflows inlined (depth ≤ 3); any remaining subworkflow node is an error. Same compile gate as save: typecheck, safety annotation, cost envelope.
- Version freeze — immutable
workflow_spec_versionspins block majors, bindings, and nested specs. Runners can pinversionon API submit. - Access mode — Open (fork, embed, 10% royalty on foreign settled platform credits) or Premium (1–1,000 cr/run creator price, optional clone license 1–10,000 cr, graph visibility your choice).
- Moderation — classifier on spec text (including style prose) plus cover and style reference stills; fail-closed on verified prohibited content. Listing stays
pendinguntil admin approve (or platform template).
Nothing executes uncompiled; nothing lists without passing moderation queue rules (workflows overview).
What runners see on /w/{slug}
The app page is anonymous-readable; run requires auth.
- Input form from promoted workflow inputs → JSON Schema Draft 2020-12 on the API.
- Estimate — signed-out visitors get public estimate preview (generation + premium line items, rate-limited); signed-in callers get full BYOK-aware quotes.
- Outputs — declared spec outputs (rendered video, artifacts).
- Lineage — remix banner, version history, published remixes list.
- Showcase — community gallery, owner moderation queue, featured pins.
Island code lives in AppPageIsland.tsx; routing matches share pages (/v/) — no per-slug SSR, build-time static shell + client fetch.

Published Hub app page at /w/{slug} with typed inputs and Run.
Open vs Premium: pick your distribution model
| Mode | Runner pays | Creator earns | Fork |
|---|---|---|---|
| Open | Platform block costs | 10% royalty on foreign runs (platform share) | Yes |
| Premium | Creator price + platform costs | 80% of frozen premium on success | Policy you set |
Royalties and premium settlement are success-only; failures and cancels refund premium charges. Self-runs do not pay open royalty to yourself. BYOK runs still compute royalty on settled platform credits where applicable.
Deep dive: AI workflow marketplace economics.
Inputs = API = MCP
Promote inputs in the spec panel (text, string, number, enum, image with artifact upload). That single definition drives:
- Hub form widgets (
ArtifactUploadInputfor images). POST /api/v1/w/{slug}/runsbody (type + enum validated at submit).- Dynamic
wf_<slug>MCP tools whenworkflowMcpDynamicToolsis on.
Builder extras: Idempotency-Key, metadata, signed webhook_url for kernel_run.completed|failed|cancelled|awaiting_approval (workflows as API endpoints).
Covers, moderation, and trust
Set cover_key on the spec — uploaded or from a successful owner-org run output (auto-cover at settlement never applies to public published specs without owner action). Cover changes on published workflows re-run sample-output classification inline.
Public publishes need moderationStatus: approved before Hub FTS lists them. NSFW catalog gates match entitlements elsewhere on Hub.
From Comfy import to published app
Importers get a draft spec + report; publish still requires compile + moderation — transpile does not bypass gates (import ComfyUI workflows). Many creators import, copilot-repair gaps, then publish Open for remix culture or Premium for closed high-value graphs.
Checklist before you publish
- Compile clean in publish mode (no subworkflow warnings you intend to inline).
- Promote every runner-facing field; hide author-only bindings in spec defaults.
- Run once in-editor; confirm memoized re-run behavior matches expectations (memoized workflow runs).
- Choose access mode and price; read Publishing and earning.
- Submit for moderation; link
/w/{slug}in docs and landing pages.
Where to go next
- Tour of the Workflow Hub
- Remixing AI workflows and lineage
- Workflow showcases and covers
- Start building: /ai-workflow-builder · /workflows/new
Version pins and breaking changes
Publish freezes workflow_spec_versions. API callers may pass version on submit to pin a published semver rather than head. When you publish a breaking input change, increment version and communicate — runners on old pins keep stable JSON Schema until they migrate. Fork lineage records which parent version a remix copied — not a substitute for semver discipline.
Clone license vs fork
Fork from Open listings is free lineage copy into your org. Clone license on Premium is a paid one-time copy with 80/20 settlement and premium_derived republish rules. App page CTA exposes the right action based on access mode; integrators should not assume fork API exists for premium without purchase.
Guest trial and acquisition (flag-gated)
When workflowGuestTrialEnabled is on, select open SFW image workflows expose a limited trial on the app page — platform org runner, watermark, non-downloadable outputs. Trials are acquisition, not a bypass of premium or royalty accounting on full runs (marketplace economics).
SEO and sharing
Static /w/{slug} shells hydrate client-side like /v/ share pages — canonical URLs belong in your sitemap after publish approval. Pair cover + showcase images with alt text for discovery (workflow showcases). Link from your marketing site to /ai-workflow-builder for “build your own” funnels.
Moderation queue expectations
First publish lands moderationStatus: pending until admin approve — plan launch dates accordingly. Spec sample images include style references — budget moderation time when style locks include three refs plus custom cover. Rejected publishes return actionable classifier reasons; fix prose or imagery, re-submit — no bypass path.
Embed and Open access
Open mode enables fork and embeddability — treat published graphs as public intellectual property under your license choice. Premium mode can hide graph while still exposing inputs — runners interact via form only. API GET /w/{slug} never leaks premium node list — integrators build UIs from JSON Schema alone.
Webhooks on published slug runs
Per-run webhook_url on POST /w/{slug}/runs enables SaaS orchestration — completed, failed, cancelled, and awaiting_approval events share signature verification with managed video webhooks. Idempotency keys prevent double spawn when your controller retries POST on timeout.
Internal org-only specs
Not every spec must publish — private org workflows still benefit from compile gate and memo on the editor run rail. Publish when you want /w/{slug}, Hub FTS, composer pins, and foreign royalty — keep internal R&D private to avoid accidental moderation queue load.
Field notes
Launch checklist: run once as owner, fix compile warnings, set cover, write description for FTS, publish, request indexing in GSC for /w/{slug}, add to site nav. Premium: document support contact for failed runs — refund policy is platform-settled but brand trust is yours. Open: encourage remix with showcase examples of good forks.
Platform links worth bookmarking
The AI workflow builder landing orients new authors; /workflows/new is the authenticated entry. Published runners live at /w/{slug} with JSON Schema exposed on GET /api/v1/w/{slug}. Hub discovery is /hub. Kernel contracts are unauthenticated at GET /api/v1/openapi.json and GET /api/v1/workflow-spec-schema. Docs cluster: workflows overview, building workflows, running workflows, publishing and earning. Comfy transpile honesty: /comfyui and import ComfyUI workflows. API integrators: workflows as API endpoints and agent-driven MCP builder. Next step for this topic: open /workflows/new and apply the pattern from publish your ai workflow as an app, then publish to /hub when the run is stable.
Glossary (quick)
WorkflowSpec — canonical IR JSON. Compile gate — validate before run/publish. Open royalty — 10% to creator on foreign settled platform credits. Premium — creator-priced runs with 80/20 success split. Memoization — content-addressed skip for unchanged blocks. approvalGate — human pause with webhook. bestOfN — parallel candidates, scoreBy winner. Lineage — fork/remix parent attribution. Slug run — execute published workflow by Hub slug without chat orchestrator.
Frequently asked questions
- What happens when I click Publish on a workflow?
- Publish-mode compile fully inlines subworkflows, creates an immutable workflow_spec_versions row, runs prohibited-content moderation on spec text and sample images, and sets access mode Open or Premium before the listing goes pending approval.
- What is the public URL for a published workflow?
- The Hub app page at /w/{slug} — static shell hydrating from GET /hub/workflow/{slug} with input JSON Schema, cost estimate, outputs, remix links, and showcase gallery.
- What is the difference between Open and Premium access?
- Open: forkable, embeddable, 10% royalty to the creator on foreign runs from the platform share. Premium: creator-set price per run (1–1,000 credits), 80/20 creator/platform split on success only, optional clone license.
- Do premium workflows leak the graph on the public API?
- No. GET /api/v1/w/{slug} and slug run endpoints expose inputs and pricing — not premium graph internals.