{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Image Upscaler for Print: 300 DPI for POD & KDP",
    "description": "AI image upscaler that makes print-ready files at the exact size each platform needs: Merch by Amazon 4500x5400 PNG, Redbubble, TeePublic, Printful, Printify, Etsy wall art and KDP covers. Keeps transparency with no halos, sets 300 DPI + sRGB, fits file-size limits. Real-ESRGAN, commercial use OK.",
    "version": "1.0",
    "x-build-id": "FQHQnjPn2KmcU6CcE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vncntlabs~print-ready-upscaler/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vncntlabs-print-ready-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/vncntlabs~print-ready-upscaler/runs": {
      "post": {
        "operationId": "runs-sync-vncntlabs-print-ready-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/vncntlabs~print-ready-upscaler/run-sync": {
      "post": {
        "operationId": "run-sync-vncntlabs-print-ready-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": "Direct links to PNG, JPG, WEBP, GIF (first frame), BMP or TIFF files. One output file per image. Share/preview pages (Google Drive viewer, Dropbox ?dl=0) are not images - use the direct download link.",
            "items": {
              "type": "string"
            }
          },
          "uploadedImage": {
            "title": "Or upload one image",
            "type": "string",
            "description": "Upload a single image from your computer (stored in a key-value store)."
          },
          "keyValueStoreId": {
            "title": "Key-value store with images (bulk)",
            "type": "string",
            "description": "Pick one of your key-value stores that holds the images (read-only access). Every key ending in .png/.jpg/.jpeg/.webp/.gif/.bmp/.tif(f) is processed unless you list keys below."
          },
          "keyValueStoreKeys": {
            "title": "Keys in that store",
            "type": "array",
            "description": "Optional: only process these keys.",
            "items": {
              "type": "string"
            }
          },
          "preset": {
            "title": "Print target",
            "enum": [
              "merch-standard",
              "redbubble-tee",
              "redbubble-premium-tee",
              "redbubble-apparel",
              "redbubble-sticker",
              "redbubble-pillow",
              "redbubble-home-large",
              "redbubble-jigsaw",
              "redbubble-mug",
              "redbubble-tall-mug",
              "redbubble-clock",
              "redbubble-coaster",
              "redbubble-pin",
              "teepublic",
              "printful-tee",
              "printify-tee",
              "kdp-paperback-cover",
              "kdp-ebook-cover",
              "print-8x10",
              "print-11x14",
              "print-16x20",
              "print-18x24",
              "print-24x36",
              "print-a4",
              "print-a3",
              "print-a2",
              "custom",
              "scale"
            ],
            "type": "string",
            "description": "Platform size to produce. Pixel sizes come from each platform's help pages (see README).",
            "default": "merch-standard"
          },
          "fitMode": {
            "title": "Fit mode",
            "enum": [
              "contain",
              "cover",
              "exact"
            ],
            "type": "string",
            "description": "How the design is placed when its aspect ratio differs from the target.",
            "default": "contain"
          },
          "anchor": {
            "title": "Vertical alignment",
            "enum": [
              "center",
              "top",
              "bottom"
            ],
            "type": "string",
            "description": "Where the design sits (contain) or which part is kept (cover). Many apparel sellers align designs to the top.",
            "default": "center"
          },
          "trimTransparent": {
            "title": "Trim transparent margins first",
            "type": "boolean",
            "description": "Crop empty transparent borders before fitting so the design fills the print area. Default: on for apparel/sticker presets, off for others."
          },
          "kdpTrimSize": {
            "title": "KDP trim size (inches)",
            "type": "string",
            "description": "Width x height in inches, e.g. 5x8, 5.5x8.5, 6x9, 8.5x11.",
            "default": "6x9"
          },
          "kdpPageCount": {
            "title": "Page count",
            "minimum": 24,
            "maximum": 830,
            "type": "integer",
            "description": "Used for spine width (KDP: 24-830 pages).",
            "default": 120
          },
          "kdpPaperType": {
            "title": "Paper type",
            "enum": [
              "white",
              "cream",
              "standard-color",
              "premium-color"
            ],
            "type": "string",
            "description": "Sets spine thickness per page (white/standard colour 0.002252 in, cream 0.0025 in, premium colour 0.002347 in).",
            "default": "white"
          },
          "kdpCoverType": {
            "title": "Cover artwork type",
            "enum": [
              "full-wrap",
              "front-only"
            ],
            "type": "string",
            "description": "Full wrap = 0.125 + trim + spine + trim + 0.125 inches wide. Hardcover is not supported (use KDP's template).",
            "default": "full-wrap"
          },
          "width": {
            "title": "Custom width (px)",
            "minimum": 16,
            "maximum": 16000,
            "type": "integer",
            "description": "Output width in pixels (preset \"custom\")."
          },
          "height": {
            "title": "Custom height (px)",
            "minimum": 16,
            "maximum": 16000,
            "type": "integer",
            "description": "Output height in pixels (preset \"custom\")."
          },
          "widthInches": {
            "title": "Custom width (inches)",
            "type": "string",
            "description": "Alternative to pixels: inches x DPI."
          },
          "heightInches": {
            "title": "Custom height (inches)",
            "type": "string",
            "description": "Output height in inches (preset \"custom\"), multiplied by DPI."
          },
          "scaleFactor": {
            "title": "Scale factor",
            "type": "string",
            "description": "For preset 'scale': 1-8.",
            "default": "4"
          },
          "dpi": {
            "title": "DPI override",
            "minimum": 36,
            "maximum": 1200,
            "type": "integer",
            "description": "DPI written into the file (and used to convert inches). Default: the preset's DPI (300, TeePublic 150)."
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "auto",
              "png",
              "jpg",
              "pdf"
            ],
            "type": "string",
            "description": "File type. KDP covers must be PDF; Merch/Redbubble need PNG for transparency.",
            "default": "auto"
          },
          "maxFileSizeMB": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Compress until the file fits (Merch preset defaults to its 25 MB limit). PNG: max compression, then optional 256-colour reduction. JPG/PDF: highest quality that fits."
          },
          "allowColorReduction": {
            "title": "Allow 256-colour PNG if needed to fit the size limit",
            "type": "boolean",
            "description": "Last resort when a PNG is still over the size limit: reduce to 256 colours with dithering (fine for most flat designs; may band smooth gradients). Off = fail instead (not charged).",
            "default": true
          },
          "backgroundColor": {
            "title": "Background colour for JPG/PDF",
            "type": "string",
            "description": "Used to fill transparency/padding when the output has no alpha.",
            "default": "#FFFFFF"
          },
          "metadata": {
            "title": "Metadata",
            "enum": [
              "strip",
              "keep"
            ],
            "type": "string",
            "description": "Strip removes camera/editor metadata (recommended for marketplace uploads). DPI and the sRGB profile are always written.",
            "default": "strip"
          },
          "model": {
            "title": "AI model",
            "enum": [
              "general",
              "illustration"
            ],
            "type": "string",
            "description": "Real-ESRGAN network used for AI upscaling (both BSD-3-Clause, commercial use OK).",
            "default": "general"
          },
          "alphaUpscaling": {
            "title": "Transparency edges",
            "enum": [
              "ai",
              "lanczos"
            ],
            "type": "string",
            "description": "How transparent edges are enlarged.",
            "default": "ai"
          },
          "animatedImages": {
            "title": "Animated GIF/WEBP",
            "enum": [
              "reject",
              "first-frame"
            ],
            "type": "string",
            "description": "Animated GIF/WEBP/APNG: reject (default, not charged) or use the first frame.",
            "default": "reject"
          },
          "maxImages": {
            "title": "Max images per run",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety cap on images processed per run.",
            "default": 100
          },
          "maxInputFileSizeMB": {
            "title": "Max input file size (MB)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Larger downloads are rejected (not charged).",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}