Image Upload

Learn how to upload images to use in various tasks, including image-to-image generation, background removal, upscaling, and more.

Introduction

Images can be uploaded to the Runware platform for use as inputs in other tasks like image-to-image generation, upscaling, ControlNet preprocessing, and background removal.

A few things to keep in mind:

  • Valid extensions are: jpeg, jpg, png, webp, bmp and gif.
  • There is no limit on image size but we save them with a maximum of 2048 pixels in width or height, maintaining the original aspect ratio.
  • Images are deleted 30 days after last use. As long as you continue using them, we will continue saving them indefinitely.

Support for uploading additional media types (video, audio) is planned for a future release.

Request

Our API always accepts an array of objects as input, where each object represents a specific task to be performed. The structure of the object varies depending on the type of the task. For this section, we will focus on the parameters related to the image upload task.

The following JSON snippet shows the basic structure of a request object. All properties are explained in detail in the next section.

[
  {
    "taskType": "imageUpload",
    "taskUUID": "50836053-a0ee-4cf5-b9d6-ae7c5d140ada",
    "image": "data:image/png;base64,iVBORw0KGgo..."
  }
]

taskType

const:imageUpload required value: imageUpload

taskUUID

string required UUID v4

UUID v4 identifier for tracking tasks and matching async responses. Must be unique per task.

image

string required

Image to upload (URL, Data URI, or Base64).

Response

Results will be delivered in the format below.

{
  "data": {
    "taskType": "imageUpload",
    "taskUUID": "9ed8a593-5515-46f3-9cd7-81ab0508176c",
    "imageUUID": "989ba605-1449-4e1e-b462-cd83ec9c1a67"
  }
}

taskType

string required value: imageUpload

Identifier for the type of task being performed

taskUUID

string required UUID v4

UUID v4 identifier for tracking tasks and matching async responses. Must be unique per task.

imageUUID

string required

Unique identifier for the uploaded image