{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Image Upscaler - Enlarge Photos 2x or 4x with Real-ESRGAN",
    "description": "Batch upscale from URLs or any Apify dataset: AI (Real-ESRGAN) enlarges images 2x or 4x into sharper WebP, JPG or PNG files with download links, plus one ZIP of everything. Up to 0.5 MP per image at the base price. No GPU, no API key. Errors are free.",
    "version": "0.2",
    "x-build-id": "qH5XQWq8Sc9l3ayPE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapewise~image-upscaler/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapewise-image-upscaler",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/scrapewise~image-upscaler/runs": {
      "post": {
        "operationId": "runs-sync-scrapewise-image-upscaler",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/scrapewise~image-upscaler/run-sync": {
      "post": {
        "operationId": "run-sync-scrapewise-image-upscaler",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "imageUrls": {
            "title": "Image URLs",
            "type": "array",
            "description": "One public image link per line (JPG, PNG, WebP, GIF, BMP or TIFF), for example a product photo, a thumbnail or a scanned picture. Links to files in an Apify key-value store and data: URLs also work. Up to 2 megapixels of input per image (about 1600x1200); up to 0.5 MP (about 707x707) costs the base price. Leave empty and pick a dataset below to upscale the images another scraper found. Both empty = two small example images.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Dataset with image links",
            "type": "string",
            "description": "Optional. An Apify dataset from your account, picked from the list or pasted as an ID, for example the output of a product, real estate or social media scraper. Every item gives the image link in its imageUrl, image or url field (the first one that exists), or in the field you set below. Works together with the links above; up to 1,000 images per run."
          },
          "datasetField": {
            "title": "Dataset field with the image link",
            "type": "string",
            "description": "Optional. The dataset field that holds the image link, with dots for nested fields, for example product.imageUrl or images. A list of links in the field gives one image per link. Empty = imageUrl, image or url, whichever exists first."
          },
          "scale": {
            "title": "Upscale factor",
            "minimum": 2,
            "maximum": 4,
            "type": "integer",
            "description": "4 (default) or 2. 4x turns 500x500 into 2000x2000; 2x turns it into 1000x1000. The price is the same: it depends on the input size only.",
            "default": 4
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "webp",
              "jpg",
              "png"
            ],
            "type": "string",
            "description": "WebP (default) gives the smallest files and keeps transparent backgrounds. JPG works in every tool. PNG is lossless and keeps transparency, with large files. Transparent images saved as JPG get a white background. WebP results above 16383 px per side are saved as PNG or JPG instead.",
            "default": "webp"
          },
          "quality": {
            "title": "JPG / WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Compression quality for WebP and JPG, 1 to 100 (default 90). 95 or more also keeps full color detail in JPG. Ignored for PNG.",
            "default": 90
          },
          "downscaleLargeImages": {
            "title": "Downscale images above 2 megapixels",
            "type": "boolean",
            "description": "Off (default): images above 2 megapixels are skipped with a free TOO_LARGE row. On: they are first shrunk to 2 megapixels (aspect ratio kept) and then upscaled, and you pay for the 2 megapixels processed.",
            "default": false
          },
          "outputZip": {
            "title": "Also download everything as one ZIP",
            "type": "boolean",
            "description": "On: at the end of the run all upscaled files are packed into OUTPUT.zip in the run's key-value store (very large runs are split into OUTPUT-part-2.zip and so on). The link is in the last dataset row and in the run status. No extra charge.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}