{
  "openapi": "3.0.1",
  "info": {
    "title": "Social Image Resizer (No Crop): Instagram, Pinterest",
    "description": "Resize images for Instagram (1080x1350), Pinterest (1000x1500), square and Stories without cropping. Fits the whole photo on any background color, fixes phone rotation, flattens transparent PNGs. Bulk URLs or uploads, JPG/PNG/WebP. $0.005 per image, failures free. API, n8n and MCP ready.",
    "version": "1.0",
    "x-build-id": "ZVm32DIhJLUoYz34Z"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bigaceboy~social-image-letterboxer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bigaceboy-social-image-letterboxer",
        "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/bigaceboy~social-image-letterboxer/runs": {
      "post": {
        "operationId": "runs-sync-bigaceboy-social-image-letterboxer",
        "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/bigaceboy~social-image-letterboxer/run-sync": {
      "post": {
        "operationId": "run-sync-bigaceboy-social-image-letterboxer",
        "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",
            "maxItems": 500,
            "type": "array",
            "description": "Direct, publicly reachable links to image files (JPG, PNG, WebP, GIF first frame, AVIF, TIFF). Each link must return the image itself, not a web page. You can also pass Apify key-value store records as kvs://<storeIdOrName>/<key>.",
            "items": {
              "type": "string"
            }
          },
          "keyValueStoreImages": {
            "title": "Uploaded images / key-value store files",
            "maxItems": 500,
            "type": "array",
            "description": "Optional. Upload image files here, or reference images already saved in an Apify key-value store as \"<storeIdOrName>/<key>\" (or just \"<key>\" for this run's default store). Combined with Image URLs.",
            "items": {
              "type": "string"
            }
          },
          "presets": {
            "title": "Output sizes",
            "type": "array",
            "description": "Which sizes to create for every image. instagram-portrait = 1080×1350 (4:5, Instagram & Facebook feed), pinterest-pin = 1000×1500 (2:3), square = 1080×1080 (1:1), story = 1080×1920 (9:16 Stories, Reels, TikTok). Choose 'custom' and set Custom width/height for any other size. Each selected size is one billable output image.",
            "items": {
              "type": "string",
              "enum": [
                "instagram-portrait",
                "pinterest-pin",
                "square",
                "story",
                "custom"
              ],
              "enumTitles": [
                "Instagram/Facebook portrait 1080×1350",
                "Pinterest pin 1000×1500",
                "Square 1080×1080",
                "Story/Reel 1080×1920",
                "Custom size (set width and height below)"
              ]
            },
            "default": [
              "instagram-portrait",
              "pinterest-pin"
            ]
          },
          "customWidth": {
            "title": "Custom width",
            "minimum": 16,
            "maximum": 8000,
            "type": "integer",
            "description": "Width in pixels for the 'custom' size (16–8000). Setting both custom width and height adds a custom output even if 'custom' is not selected."
          },
          "customHeight": {
            "title": "Custom height",
            "minimum": 16,
            "maximum": 8000,
            "type": "integer",
            "description": "Height in pixels for the 'custom' size (16–8000). Example: 1200 × 628 for a link preview, 1280 × 720 for a YouTube thumbnail."
          },
          "backgroundColor": {
            "title": "Background color",
            "pattern": "^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$",
            "type": "string",
            "description": "Hex color used for the letterbox bars and behind transparent areas, e.g. #F4EFE6 (warm cream, default), #FFFFFF (white) or #000000 (black).",
            "default": "#F4EFE6"
          },
          "paddingPercent": {
            "title": "Padding (%)",
            "minimum": 0,
            "maximum": 40,
            "type": "integer",
            "description": "Extra breathing room on every side, as a percent of the output width (left/right) and height (top/bottom). 0 = image touches the edges on its long side. Max 40.",
            "default": 0
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "File format of the results. jpg is smallest and accepted everywhere; png is lossless; webp is small and modern. Transparency is always flattened onto the background color.",
            "default": "jpg"
          },
          "quality": {
            "title": "Quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Compression quality for jpg and webp (1–100). 90 is visually lossless for social posts. Ignored for png.",
            "default": 90
          },
          "maxInputSizeMb": {
            "title": "Max input file size",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Source files bigger than this are skipped with a TOO_LARGE error (not charged). Images over 40 megapixels are also skipped.",
            "default": 25
          },
          "downloadTimeoutSecs": {
            "title": "Download timeout",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "How long to wait for each image URL before giving up (not charged).",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}