Resize Image
Pricing
$1.30 / 1,000 image resizeds
Go to Apify Store
Resize Image
Batch resize, crop, and convert images to any dimension or format using Sharp. Supports JPEG, PNG, WebP, AVIF, and more.
Resize Image
Pricing
$1.30 / 1,000 image resizeds
Batch resize, crop, and convert images to any dimension or format using Sharp. Supports JPEG, PNG, WebP, AVIF, and more.
You can access the Resize Image programmatically from your own applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.
{ "openapi": "3.0.1", "info": { "version": "1.0", "x-build-id": "Yi4LxqfIbU8PvnyIr" }, "servers": [ { "url": "https://api.apify.com/v2" } ], "paths": { "/acts/junipr~resize-image/run-sync-get-dataset-items": { "post": { "operationId": "run-sync-get-dataset-items-junipr-resize-image", "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/junipr~resize-image/runs": { "post": { "operationId": "runs-sync-junipr-resize-image", "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/junipr~resize-image/run-sync": { "post": { "operationId": "run-sync-junipr-resize-image", "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": { "images": { "title": "Image Sources", "type": "array", "description": "List of image sources to process. Each item: { url, kvKey, outputName }. Use imageUrls for a simple URL list.", "default": [] }, "imageUrls": { "title": "Image URLs (shorthand)", "type": "array", "description": "Simple list of image URLs. Cannot be combined with 'images'.", "default": [], "items": { "type": "string" } }, "width": { "title": "Width (px)", "minimum": 1, "maximum": 10000, "type": "integer", "description": "Output width in pixels. If only width is set, height auto-scales to maintain aspect ratio." }, "height": { "title": "Height (px)", "minimum": 1, "maximum": 10000, "type": "integer", "description": "Output height in pixels. If only height is set, width auto-scales to maintain aspect ratio." }, "scalePercent": { "title": "Scale Percent", "minimum": 1, "maximum": 500, "type": "number", "description": "Scale by percentage instead of pixel dimensions. 50 = half size, 200 = double. Cannot be used with width/height." }, "fit": { "title": "Fit Mode", "enum": [ "cover", "contain", "fill", "inside", "outside" ], "type": "string", "description": "How to fit image into target dimensions.", "default": "inside" }, "position": { "title": "Crop Position", "enum": [ "center", "top", "bottom", "left", "right", "top-left", "top-right", "bottom-left", "bottom-right", "attention", "entropy" ], "type": "string", "description": "Crop anchor for fit: cover. Use 'attention' for smart focal point detection or 'entropy' for maximum detail.", "default": "center" }, "withoutEnlargement": { "title": "No Upscale", "type": "boolean", "description": "Do not upscale images smaller than target dimensions.", "default": true }, "withoutReduction": { "title": "No Downscale", "type": "boolean", "description": "Do not downscale images larger than target dimensions.", "default": false }, "kernel": { "title": "Resampling Kernel", "enum": [ "nearest", "cubic", "mitchell", "lanczos2", "lanczos3" ], "type": "string", "description": "Resampling algorithm. lanczos3 is highest quality; nearest is fastest for pixel art.", "default": "lanczos3" }, "outputFormat": { "title": "Output Format", "enum": [ "original", "jpeg", "png", "webp", "avif", "tiff", "gif" ], "type": "string", "description": "Output image format. 'original' preserves the input format.", "default": "original" }, "quality": { "title": "Quality (1-100)", "minimum": 1, "maximum": 100, "type": "integer", "description": "Output quality for lossy formats (JPEG, WebP, AVIF). Ignored for PNG — use compressionLevel.", "default": 80 }, "compressionLevel": { "title": "PNG Compression Level (0-9)", "minimum": 0, "maximum": 9, "type": "integer", "description": "PNG zlib compression level. 0 = no compression, 9 = maximum. Only applies to PNG output.", "default": 6 }, "progressive": { "title": "Progressive Encoding", "type": "boolean", "description": "Use progressive/interlaced encoding for JPEG and PNG. Improves perceived load time in browsers.", "default": false }, "chromaSubsampling": { "title": "JPEG Chroma Subsampling", "enum": [ "4:4:4", "4:2:0" ], "type": "string", "description": "JPEG chroma subsampling mode. 4:4:4 = highest quality; 4:2:0 = standard (default).", "default": "4:2:0" }, "mozjpeg": { "title": "MozJPEG Encoder", "type": "boolean", "description": "Use MozJPEG for 10-15% better JPEG compression at same quality. Slower encoding.", "default": false }, "stripMetadata": { "title": "Strip Metadata", "type": "boolean", "description": "Remove EXIF, ICC, XMP metadata. Reduces file size and removes privacy-sensitive data (GPS, device info).", "default": true }, "preserveIccProfile": { "title": "Preserve ICC Profile", "type": "boolean", "description": "Keep ICC color profile even when stripMetadata is true. Useful for print workflows requiring accurate color.", "default": false }, "outputMode": { "title": "Output Mode", "enum": [ "kvstore", "base64", "url-only" ], "type": "string", "description": "Where to write processed images.", "default": "kvstore" }, "kvStorePrefix": { "title": "KV Store Prefix", "type": "string", "description": "Prefix for Key-Value Store keys when outputMode is 'kvstore'.", "default": "resized-" }, "includeStats": { "title": "Include Stats", "type": "boolean", "description": "Include file size, dimensions, and format in dataset output.", "default": true }, "maxConcurrency": { "title": "Max Concurrency", "minimum": 1, "maximum": 20, "type": "integer", "description": "Maximum parallel image downloads and processing. Higher = faster for large batches.", "default": 5 }, "downloadTimeoutSecs": { "title": "Download Timeout (seconds)", "minimum": 5, "maximum": 120, "type": "integer", "description": "Timeout per image download in seconds.", "default": 30 }, "retryCount": { "title": "Retry Count", "minimum": 0, "maximum": 5, "type": "integer", "description": "Download retry attempts on failure.", "default": 3 } } }, "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 } } } } } } } } }}OpenAPI is a standard for designing and describing RESTful APIs, allowing developers to define API structure, endpoints, and data formats in a machine-readable way. It simplifies API development, integration, and documentation.
OpenAPI is effective when used with AI agents and GPTs by standardizing how these systems interact with various APIs, for reliable integrations and efficient communication.
By defining machine-readable API specifications, OpenAPI allows AI models like GPTs to understand and use varied data sources, improving accuracy. This accelerates development, reduces errors, and provides context-aware responses, making OpenAPI a core component for AI applications.
You can download the OpenAPI definitions for Resize Image from the options below:
If you’d like to learn more about how OpenAPI powers GPTs, read our blog post.
You can also check out our other API clients: