v36

latestOpenAPI 3.0.3GNU General Public License v3.0raw.githubusercontent.com2026-08-017758212.6 KB
file

View a file

Retrieve and view a file from the ComfyUI file system. This endpoint is typically used to view generated images or other output files. Cookie auth is allowed on this endpoint because it's used by img/video tags in browsers.

get/api/view

Query parameters

filenamestring required
Example:ComfyUI_00004_.png

Name of the file to view

subfolderstring
Example:tests/foo/bar

Subfolder path where the file is located

typestring
Example:output

Type of file (e.g., output, input, temp)

fullpathstring

Full path to the file (used for temp files)

formatstring

Format of the file

frame_rateinteger

Frame rate for video files

workflowstring

Workflow identifier

timestampinteger
Example:1234567890

Timestamp parameter

channelstring
Example:rgb

Image channel to extract from PNG images.

  • 'rgb': Return only RGB channels (alpha set to fully opaque)
  • 'a' or 'alpha': Return alpha channel as grayscale image
  • If not specified, return original image unchanged via redirect
resinteger
Example:256

Maximum dimension (width or height) to resize the image to, preserving aspect ratio. The image is fit within a res x res box. Returns a JPEG thumbnail. Only applies to raster image files (PNG, JPEG, WebP, GIF).

Response

Success - File content returned (used when channel or res parameter is present)