{
  "openapi": "3.0.1",
  "info": {
    "title": "Images to PDF Converter — Merge JPG & PNG into One PDF",
    "description": "Merge JPG, PNG, HEIC, WebP and other images from URLs into one PDF (or one PDF per image): A4, Letter or fit-to-image pages, margins, auto-rotation, compression. Download link per PDF. $0.022 for a 10-image PDF.",
    "version": "0.1",
    "x-build-id": "7Xf5UoNcfHakeYK9C"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/actor-forge~images-to-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-actor-forge-images-to-pdf",
        "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/actor-forge~images-to-pdf/runs": {
      "post": {
        "operationId": "runs-sync-actor-forge-images-to-pdf",
        "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/actor-forge~images-to-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-actor-forge-images-to-pdf",
        "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": [
          "imageUrls"
        ],
        "properties": {
          "imageUrls": {
            "title": "Image URLs",
            "type": "array",
            "description": "Direct links to the images, in page order (JPEG, PNG, HEIC/HEIF, WebP, AVIF, GIF, TIFF or SVG; the format is detected from the file itself). Up to 25 MB and 50 megapixels per image.",
            "items": {
              "type": "string"
            }
          },
          "format": {
            "title": "Output format",
            "enum": [
              "webp",
              "avif",
              "jpeg",
              "png",
              "pdf",
              "keep"
            ],
            "type": "string",
            "description": "PDF (default) builds PDF files from your images. The other formats convert the images themselves (WebP, AVIF, JPEG, PNG) instead.",
            "default": "pdf"
          },
          "quality": {
            "title": "Quality (1-100)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "JPEG quality for photos inside the PDF: lower = smaller PDF. 85 (default) looks identical on screen and in print; 70 roughly halves the size. PNG, GIF, TIFF and SVG images are embedded losslessly.",
            "default": 85
          },
          "width": {
            "title": "Max width (px)",
            "minimum": 0,
            "maximum": 16384,
            "type": "integer",
            "description": "Optional: shrink images wider than this before putting them in the PDF (makes the PDF much smaller; 2000 px is plenty for A4). Empty = keep the original size. Image pixels are never upscaled (fitting to the PDF page is separate)."
          },
          "height": {
            "title": "Max height (px)",
            "minimum": 0,
            "maximum": 16384,
            "type": "integer",
            "description": "Resize so the image is at most this tall. Empty = keep the original height."
          },
          "fit": {
            "title": "Resize mode",
            "enum": [
              "inside",
              "cover",
              "contain"
            ],
            "type": "string",
            "description": "When both width and height are set: 'inside' keeps the aspect ratio within the box, 'cover' crops to fill the box exactly, 'contain' pads to the box with the background colour.",
            "default": "inside"
          },
          "background": {
            "title": "Background colour",
            "type": "string",
            "description": "Hex colour used for padding ('contain') and for transparent areas when converting to JPEG.",
            "default": "#ffffff"
          },
          "stripMetadata": {
            "title": "Strip metadata (EXIF, GPS)",
            "type": "boolean",
            "description": "Remove EXIF, GPS location, camera details, XMP and IPTC from the output (photos are rotated upright first). Smaller files and no leaked locations. Each row still reports whether the original had EXIF / GPS.",
            "default": true
          },
          "maxFileSizeKb": {
            "title": "Target max file size (KB)",
            "minimum": 0,
            "type": "number",
            "description": "Optional. Lowers the quality step by step (and, if needed, the dimensions) until each image fits under this size. Rows show the quality used and whether the target was met."
          },
          "keepAnimation": {
            "title": "Keep GIF / WebP animation",
            "type": "boolean",
            "description": "Animated GIF or WebP converted to WebP keep all frames. Off = first frame only. AVIF, JPEG and PNG output always use the first frame.",
            "default": true
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "links",
              "zip",
              "both"
            ],
            "type": "string",
            "description": "'Links' saves each image with its own download link. 'ZIP' bundles all images into ZIP files (up to 200 MB each; links in the OUTPUT record). 'Both' does both. A merged PDF is always a download link.",
            "default": "links"
          },
          "filenamePattern": {
            "title": "File name pattern",
            "type": "string",
            "description": "Tokens: {index} (00001…), {name} (original file name), {width}, {height}, {format}. The extension is added automatically; duplicate names get a -2, -3… suffix.",
            "default": "{index}-{name}"
          },
          "maxImages": {
            "title": "Max images",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop after converting this many images.",
            "default": 1000
          },
          "pdfMode": {
            "title": "PDF mode",
            "enum": [
              "merge",
              "separate"
            ],
            "type": "string",
            "description": "'Merge' puts all images into one PDF, one image per page, in the order of your list. 'Separate' makes one PDF per image.",
            "default": "merge"
          },
          "pdfPageSize": {
            "title": "Page size",
            "enum": [
              "fit",
              "a4",
              "letter"
            ],
            "type": "string",
            "description": "'Fit image' makes each page exactly the size of its image (96 dpi). A4 and Letter pages turn portrait or landscape to match each image, which is scaled to fill the page inside the margin.",
            "default": "a4"
          },
          "pdfMarginMm": {
            "title": "Page margin (mm)",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "White margin around the image on A4 and Letter pages. 'Fit image' pages have no margin.",
            "default": 10
          },
          "pdfFileName": {
            "title": "PDF file name",
            "type": "string",
            "description": "Name of the merged PDF (without .pdf). Very large merges are split into parts: name.pdf, name-part-2.pdf, ...",
            "default": "images"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}