---
title: "View or download a file"
method: GET
path: "/api/view"
tags: ["view"]
---

# View or download a file

`GET /api/view`

Serves a file (image, audio, or video) from the input/output/temp directory identified by the query parameters.

## Query parameters

- `filename` string, required
- `type` 'input' | 'output' | 'temp'
- `subfolder` string
- `preview` string
- `channel` 'rgba' | 'rgb' | 'a'

## Response `200`

File content

## Other responses

- `302` — Redirect to GCS signed URL
- `400` — Invalid request parameters
- `404` — File not found
- `500` — Internal server error

## Changes

- **2026-05-22** `09a5075587c8` — 3 info
  - added the non-success response with the status `302`
  - added the non-success response with the status `400`
  - added the non-success response with the status `500`
- **2026-04-24** `a66055fa384e` — 6 breaking, 6 warning, 19 info
  - the `query` request parameter `channel` was restricted to a list of enum values
  - the `query` request parameter `type` was restricted to a list of enum values
  - for the `query` request parameter `type`, default value `output` was added
  - removed the media type `application/json` for the response with the status `404`
  - …27 more

[Change history](https://skmtc.dev/comfy-org/apis/comfyui-api/changes/api/view/get.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/09a5075587c8/schema)
