---
title: "Create asset records from a workflow execution"
method: POST
path: "/api/assets/from-workflow"
tags: ["assets"]
---

# Create asset records from a workflow execution

`POST /api/assets/from-workflow`

[cloud-only] Registers output files from a workflow execution as assets in the asset database.

## Request body

- object
  - `prompt_id` string, uuid, required — Prompt ID whose outputs should be registered as assets
  - `tags` string[] — Tags to apply to the created assets

## Response `200`

Assets created or referenced

- object
  - `assets` Asset[]
    - `id` string, uuid, required — Unique identifier for the asset
    - `name` string, required — Name of the asset file
    - `hash` string, nullable — Blake3 content hash of the asset (preferred over asset_hash)
    - `asset_hash` string, nullable — Deprecated: use `hash` instead. Blake3 hash of the asset content.
    - `size` integer, required — Size of the asset in bytes
    - `mime_type` string — MIME type of the asset
    - `tags` string[] — Tags associated with the asset
    - `user_metadata` object — Custom user metadata
    - `metadata` object — System-managed metadata (read-only)
    - `preview_url` string, uri — URL for asset preview/thumbnail
    - `preview_id` string, uuid — ID of the preview asset if available
    - `prompt_id` string, uuid, nullable — Deprecated: use job_id instead. ID of the prompt that created this asset.
    - `job_id` string, uuid, nullable — ID of the job that created this asset
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `last_access_time` string, date-time
    - `is_immutable` boolean — Whether this asset is immutable

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Not found
- `500` — Internal server error

## Changes

- **2026-05-22** `09a5075587c8` — 2 info
  - api operation id `createAssetsFromWorkflow` removed and replaced with `postAssetsFromWorkflow`
  - added the non-success response with the status `500`
- **2026-05-22** `495cc1244e22` — 1 breaking, 1 info
  - removed the success response with the status `201`
  - added the success response with the status `200`
- **2026-05-19** `751ce8e3ddf2` — 2 warning
  - removed the optional property `assets/items/height` from the response with the `201` status
  - removed the optional property `assets/items/width` from the response with the `201` status
- **2026-05-08** `c9640fded659` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/comfy-org/apis/comfyui-api/changes/api/assets/from-workflow/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/c4db9e1283df/schema)
