Skip to main content
GET
/
upload-url
Error
A valid request URL is required to generate request examples
{
  "upload_url": "<string>",
  "file_id": "<string>",
  "download_url": "<string>"
}

Description

This endpoint generates an upload URL for file uploads, such as images, to the storage.

Parameters

  • type (required, query): The MIME type of the file (e.g., image/png, image/jpg, image/jpeg).
  • file_size (required, query): The size of the file to be uploaded.

Responses

200 OK



`{
  "upload_url": "string",  // URL to upload the file
  "file_id": "string",  // File ID for the uploaded file
  "download_url": "string"  // Download URL for the file
}`

401 Invalid or Expired Token


`Invalid or expired token`

500 Error Generating Upload URL


`{
  "error": "string"  // Error message detailing why the URL generation failed
}`

Authorizations

Authorization
string
header
required

API token created in Comfy Deploy /api-keys

Query Parameters

type
enum<string>
required
Available options:
image/png,
image/jpg,
image/jpeg
file_size
string
required

Response

Retrieve the output

upload_url
string
required
file_id
string
required
download_url
string
required