{
  "openapi": "3.0.1",
  "info": {
    "title": "Image Resizer API",
    "description": "Resize, compress, and convert images with an image resizer API. Process URLs, base64 data, or Apify uploads, then export generated file URLs, dimensions, formats, byte sizes, and compression facts.",
    "version": "1.0",
    "x-build-id": "3UmWi4J5h6AcqPT3t"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maximedupre~image-resizer-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maximedupre-image-resizer-api",
        "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/maximedupre~image-resizer-api/runs": {
      "post": {
        "operationId": "runs-sync-maximedupre-image-resizer-api",
        "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/maximedupre~image-resizer-api/run-sync": {
      "post": {
        "operationId": "run-sync-maximedupre-image-resizer-api",
        "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",
        "required": [
          "images"
        ],
        "properties": {
          "images": {
            "title": "Images",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Use url, base64, or keyValueStoreKey for each image. Add id or filename when you want stable tracking in the output.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "title": "Image URL",
                  "description": "Public HTTP or HTTPS image URL."
                },
                "base64": {
                  "type": "string",
                  "title": "Base64 image data",
                  "description": "Base64-encoded image data."
                },
                "keyValueStoreKey": {
                  "type": "string",
                  "title": "Key-value store key",
                  "description": "Apify key-value store record key for an uploaded image."
                },
                "id": {
                  "type": "string",
                  "title": "Image ID",
                  "description": "Optional stable ID copied to the output."
                },
                "filename": {
                  "type": "string",
                  "title": "Output filename",
                  "description": "Optional generated file name."
                }
              }
            }
          },
          "combineImages": {
            "title": "Combine images into one output",
            "type": "boolean",
            "description": "Create one combined image from 2 or 3 sources for catalog cards, comparisons, or product angles.",
            "default": false
          },
          "targetPreset": {
            "title": "Target size",
            "enum": [
              "custom",
              "ecommerce_square",
              "website_thumbnail",
              "social_square",
              "whatsapp_carousel",
              "whatsapp_catalog_thumbnail",
              "whatsapp_template_header"
            ],
            "type": "string",
            "description": "Choose Custom to use width and height, or pick a ready-made platform size.",
            "default": "custom"
          },
          "width": {
            "title": "Custom width",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Output width in pixels when Target size is Custom.",
            "default": 800
          },
          "height": {
            "title": "Custom height",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Output height in pixels when Target size is Custom.",
            "default": 600
          },
          "fit": {
            "title": "Resize fit",
            "enum": [
              "cover",
              "contain",
              "fill",
              "inside",
              "outside"
            ],
            "type": "string",
            "description": "Choose how each image fills, fits inside, or stretches to the target size.",
            "default": "cover"
          },
          "position": {
            "title": "Crop position",
            "enum": [
              "center",
              "top",
              "bottom",
              "left",
              "right",
              "top-left",
              "top-right",
              "bottom-left",
              "bottom-right"
            ],
            "type": "string",
            "description": "Anchor the image when Resize fit crops or pads the source.",
            "default": "center"
          },
          "paddingMode": {
            "title": "Padding style",
            "enum": [
              "solid",
              "blur",
              "edge_extend"
            ],
            "type": "string",
            "description": "Fill extra space for padded layouts with a solid color, blurred image, or extended edge pixels.",
            "default": "solid"
          },
          "backgroundColor": {
            "title": "Background color",
            "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$",
            "type": "string",
            "description": "Hex color for solid padding and transparent areas.",
            "default": "#FFFFFF"
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "webp",
              "jpeg",
              "png",
              "avif",
              "gif",
              "tiff",
              "original"
            ],
            "type": "string",
            "description": "Choose the generated image file format.",
            "default": "webp"
          },
          "quality": {
            "title": "Quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Quality for lossy formats such as JPEG, WebP, and AVIF.",
            "default": 80
          },
          "maxFileSizeMb": {
            "title": "Maximum file size",
            "minimum": 0.1,
            "maximum": 50,
            "type": "number",
            "description": "Optional size limit in MB for platform-ready files."
          },
          "preserveMetadata": {
            "title": "Preserve image metadata",
            "type": "boolean",
            "description": "Keep EXIF and other metadata in generated files.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}