{
  "openapi": "3.0.1",
  "info": {
    "title": "SeedVR2 AI Image Upscaler | Upscale Photos 2x-4x, Restore JPEG",
    "description": "Upscale images 2x, 3x or 4x with SeedVR2, ByteDance's AI restoration model: sharper detail, JPEG blocks and blur cleaned up, up to 32 megapixels. PNG, JPEG or WebP, transparency kept. One row per image with a download link; failed images are free.",
    "version": "0.1",
    "x-build-id": "qp6vUXyjbAw4hGfbE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ratatoskr~seedvr2-image-upscaler/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ratatoskr-seedvr2-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/ratatoskr~seedvr2-image-upscaler/runs": {
      "post": {
        "operationId": "runs-sync-ratatoskr-seedvr2-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/ratatoskr~seedvr2-image-upscaler/run-sync": {
      "post": {
        "operationId": "run-sync-ratatoskr-seedvr2-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": "Images",
            "type": "array",
            "description": "Links to the images to upscale, one per line: JPEG, PNG, WebP, GIF (first frame), AVIF or TIFF, up to 25 MB each. Google Drive links (files shared with anyone who has the link) and Dropbox links work, and so do data URIs and plain base64, the way n8n, Make and Zapier pass files on. Clear the example and leave this empty to upscale only the images of the dataset below.",
            "items": {
              "type": "string"
            }
          },
          "scale": {
            "title": "Enlargement",
            "enum": [
              "2",
              "3",
              "4"
            ],
            "type": "string",
            "description": "How much larger each side gets: 4x turns a 500 x 375 photo into 2000 x 1500. A larger result than \"Max output size\" is enlarged less, to fit it.",
            "default": "4"
          },
          "targetLongEdge": {
            "title": "Target long edge (pixels), instead of the enlargement",
            "minimum": 64,
            "maximum": 16384,
            "type": "integer",
            "description": "Enlarge every image until its longer side is this many pixels (at most 4x), for example 3840 for 4K. An image already this long is skipped and not charged. Leave empty to use the enlargement above."
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "png",
              "jpg",
              "webp"
            ],
            "type": "string",
            "description": "PNG is lossless and keeps transparency; JPEG is about a quarter of the size; WebP keeps transparency at a fraction of PNG's size.",
            "default": "png"
          },
          "quality": {
            "title": "JPEG and WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1 to 100. 95 keeps the restored detail; PNG ignores it.",
            "default": 95
          },
          "maxOutputMegapixels": {
            "title": "Max output size (megapixels)",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "The largest result: 16 megapixels is about 4600 x 3500. An image that would come out larger is enlarged less, to this size. Up to 4 megapixels is in the image price, each started megapixel above it is an extra event (see Pricing).",
            "default": 16
          },
          "skipIfLongEdgeAtLeast": {
            "title": "Skip images whose long edge is already (pixels)",
            "minimum": 1,
            "type": "integer",
            "description": "Images at least this long on their longer side are passed over and not charged; their row links the original."
          },
          "datasetId": {
            "title": "Images from another Actor's dataset",
            "type": "string",
            "description": "The id of a dataset to read image links from, such as the results of a product or real estate scraper. Read after the links above."
          },
          "urlField": {
            "title": "Field with the image link in that dataset",
            "type": "string",
            "description": "Where each item keeps its image link, for example imageUrl or images[0].url. Leave empty to take the first of imageUrl, image, images, photo, thumbnail and url."
          },
          "seed": {
            "title": "Seed",
            "minimum": 0,
            "type": "integer",
            "description": "The same seed gives the same result for the same image. Leave empty for a new one each run."
          },
          "maxItems": {
            "title": "Max images",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop after this many images (100 if left empty). Every image in the list counts, including repeated, skipped and failed ones.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}