{
  "openapi": "3.0.1",
  "info": {
    "title": "Social Media Image Resizer: Instagram, Facebook & LinkedIn",
    "description": "Resize images to social media sizes in bulk: image URLs in, Instagram, Facebook, LinkedIn, X, YouTube, Pinterest and OG files out with signed links. Fit by crop, pad or blur-pad. Direct image files only; no face detection, no posting, no web pages.",
    "version": "0.1",
    "x-build-id": "Vfsey0gU9hTVHWUTB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-done-right~social-image-resizer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-done-right-social-image-resizer",
        "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/data-done-right~social-image-resizer/runs": {
      "post": {
        "operationId": "runs-sync-data-done-right-social-image-resizer",
        "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/data-done-right~social-image-resizer/run-sync": {
      "post": {
        "operationId": "run-sync-data-done-right-social-image-resizer",
        "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": [
          "urls",
          "presets"
        ],
        "properties": {
          "urls": {
            "title": "Image URLs",
            "type": "array",
            "description": "Direct links to the image files to resize, one per line. JPEG, PNG, WebP, AVIF, GIF, BMP and TIFF are read. Example: https://example.com/photo.jpg. Web pages, SVG and HEIC are not supported. Use only images you have the right to process.",
            "items": {
              "type": "string"
            }
          },
          "presets": {
            "title": "Presets",
            "type": "array",
            "description": "Which social-media sizes to produce for every image. One file per image and preset; each file is one charged output. Example: [\"instagram-square\", \"og-image\"]. Sizes are the commonly published ones and platforms change them.",
            "items": {
              "type": "string",
              "enum": [
                "instagram-square",
                "instagram-portrait",
                "instagram-landscape",
                "instagram-story",
                "facebook-post",
                "facebook-cover",
                "linkedin-post",
                "linkedin-cover",
                "x-post",
                "x-header",
                "youtube-thumbnail",
                "pinterest-pin",
                "og-image"
              ],
              "enumTitles": [
                "Instagram post, square 1:1 (1080x1080)",
                "Instagram post, portrait 4:5 (1080x1350)",
                "Instagram post, landscape 1.91:1 (1080x566)",
                "Instagram Story / Reel, 9:16 (1080x1920)",
                "Facebook link or image post, 1.91:1 (1200x630)",
                "Facebook page cover photo (820x312)",
                "LinkedIn post / link image, 1.91:1 (1200x627)",
                "LinkedIn personal profile banner, 4:1 (1584x396)",
                "X (Twitter) post image, 16:9 (1600x900)",
                "X (Twitter) profile header, 3:1 (1500x500)",
                "YouTube thumbnail, 16:9 (1280x720)",
                "Pinterest pin, 2:3 (1000x1500)",
                "Open Graph / link preview image (og:image) (1200x630)"
              ]
            }
          },
          "customSizes": {
            "title": "Custom sizes (optional)",
            "type": "array",
            "description": "Extra exact sizes as WIDTHxHEIGHT in pixels, one per line, each side 16 to 8000. Each size is one more output per image. Example: 1000x1000.",
            "items": {
              "type": "string"
            }
          },
          "fit": {
            "title": "Fit mode",
            "enum": [
              "cover",
              "contain",
              "blur-pad"
            ],
            "type": "string",
            "description": "How the image is fitted to each size. cover crops, contain pads with Background color, blur-pad pads with a blurred enlarged copy of the same image. Example: cover.",
            "default": "cover"
          },
          "cropFocus": {
            "title": "Crop focus",
            "enum": [
              "center",
              "top",
              "bottom",
              "left",
              "right"
            ],
            "type": "string",
            "description": "Which part of the image is kept when cover crops, or where a blur-pad backdrop is centered. It is a fixed position, not face or subject detection. Example: top (keeps heads in portraits).",
            "default": "center"
          },
          "backgroundColor": {
            "title": "Background color",
            "type": "string",
            "description": "Fills the padding in contain mode and replaces transparency in JPEG output. Hex color. Example: #ffffff.",
            "default": "#ffffff"
          },
          "allowUpscale": {
            "title": "Allow enlarging small images",
            "type": "boolean",
            "description": "On by default, so every file has exactly the preset size even when the source is smaller (it can look soft). Off: a small source is never enlarged and is padded in the background color instead.",
            "default": true
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "jpeg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "Format of every output file. Example: jpeg. Instagram, LinkedIn and Facebook uploads accept JPEG and PNG; WebP is not accepted by every upload form.",
            "default": "jpeg"
          },
          "quality": {
            "title": "Quality (1-100)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Lossy quality for JPEG and WebP; ignored for PNG. Example: 90.",
            "default": 90
          },
          "stripMetadata": {
            "title": "Strip metadata",
            "type": "boolean",
            "description": "Remove EXIF (camera, GPS location) and the color profile. The orientation is always applied to the pixels first, so photos are never rotated wrongly.",
            "default": true
          },
          "maxOutputs": {
            "title": "Max output files",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Most files delivered (and charged) in this run, counting every image and preset. With 4 presets, 100 means up to 25 images. Images beyond the cap are skipped and not charged. Example: 100.",
            "default": 100
          },
          "maxSourceSizeMb": {
            "title": "Max source file size (MB)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Source images larger than this are skipped before they are fully downloaded. Images above 64 megapixels are always refused (memory safety).",
            "default": 25
          },
          "concurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "How many images are processed at the same time. Default 4.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}