---
title: "Upload an image file"
method: POST
path: "/api/upload/image"
tags: ["upload"]
---

# Upload an image file

`POST /api/upload/image`

Uploads an image file into one of the input/output/temp directories so it can be referenced by workflow nodes.

## Response `200`

Upload result

- UploadResult — Response body returned by the image/mask upload endpoints, describing where the uploaded file now lives.
  - `name` string — Saved filename (may be renamed to avoid collisions)
  - `subfolder` string — Subfolder the file was saved to
  - `type` string — Directory type (input, temp)

## Other responses

- `400` — No file provided or invalid request

## Changes

- **2026-04-24** `a66055fa384e` — 2 breaking, 8 info
  - request property `type` was restricted to a list of enum values
  - removed the media type `application/json` for the response with the status `400`
  - api tag `upload` added
  - api tag `file` removed
  - …6 more

[Change history](https://skmtc.dev/comfy-org/apis/comfyui-api/changes/api/upload/image/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/a66055fa384e/schema)
