---
title: "Publish a workflow to the hub"
method: POST
path: "/api/hub/workflows"
tags: ["hub"]
---

# Publish a workflow to the hub

`POST /api/hub/workflows`

[cloud-only] Publishes a workflow to the hub with metadata, thumbnail, and sample images.

## Request body

- PublishHubWorkflowRequest — [cloud-only] Request body for publishing or updating a workflow on the Hub.
  - `username` string, required
  - `name` string, required
  - `workflow_filename` string, required
  - `asset_ids` string[], required
  - `description` string
  - `tags` string[]
  - `models` string[]
  - `custom_nodes` string[]
  - `tutorial_url` string
  - `metadata` object
  - `thumbnail_type` 'image' | 'video' | 'image_comparison'
  - `thumbnail_token_or_url` string
  - `thumbnail_comparison_token_or_url` string
  - `sample_image_tokens_or_urls` string[]

## Response `200`

Workflow published to hub

- HubWorkflowDetail — [cloud-only] Full Hub workflow detail including versions, assets, and statistics.
  - `share_id` string, required
  - `workflow_id` string, required
  - `name` string, required
  - `status` 'pending' | 'approved' | 'rejected' | 'deprecated', required
  - `description` string
  - `thumbnail_type` 'image' | 'video' | 'image_comparison'
  - `thumbnail_url` string
  - `thumbnail_comparison_url` string
  - `tutorial_url` string
  - `metadata` object
  - `sample_image_urls` string[]
  - `publish_time` string, date-time, nullable
  - `workflow_json` object, required
  - `assets` AssetInfo[], required
    - `id` string, required
    - `filename` string, required
    - `mime_type` string
    - `size_bytes` integer
  - `profile` HubProfile, required — [cloud-only] A public user profile on the ComfyUI Hub.
    - `username` string, required
    - `display_name` string
    - `bio` string
    - `avatar_url` string, uri
    - `links` string[]
    - `workflow_count` integer
    - `created_at` string, date-time

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Workflow or profile not found

## Changes

- **2026-05-08** `c9640fded659` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/comfy-org/apis/comfyui-api/changes/api/hub/workflows/post.md)

---

[API](https://skmtc.dev/comfy-org/apis/comfyui-api.md) · [All operations](https://skmtc.dev/comfy-org/apis/comfyui-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/comfy-org/comfyui-api/revisions/c9640fded659/schema)
