{
  "openapi": "3.0.1",
  "info": {
    "title": "Images to PDF: many images into one PDF or one each",
    "description": "Turns the images you link or store into one PDF in your order, or one PDF per image. Choose A4, Letter, Legal, A3, A5 or the image size, orientation, fit and margins. JPEG photos go in with no quality loss. Returns a download link for each PDF.",
    "version": "0.1",
    "x-build-id": "IpLiwZ0YAfFcwOCFq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/examsens.ai~images-to-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-examsens.ai-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/examsens.ai~images-to-pdf/runs": {
      "post": {
        "operationId": "runs-sync-examsens.ai-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/examsens.ai~images-to-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-examsens.ai-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",
        "properties": {
          "imageUrls": {
            "title": "Image URLs",
            "type": "array",
            "description": "Direct links to images, in page order: JPEG, PNG, WebP, GIF, BMP, TIFF or AVIF.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "inputStore": {
            "title": "Files in a key value store",
            "type": "string",
            "description": "To use images from your computer, upload them to one of your key value stores, then pick that store here. Every record whose key ends in an image extension, such as .jpg or .png, is used in key order, or only the keys you list below in your order."
          },
          "inputKeys": {
            "title": "Record keys",
            "type": "array",
            "description": "Only use these records from the store above, in this order, one key per line.",
            "items": {
              "type": "string"
            }
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "single",
              "perImage"
            ],
            "type": "string",
            "description": "One PDF with every image as a page in your order, or one PDF per image.",
            "default": "single"
          },
          "pageSize": {
            "title": "Page size",
            "enum": [
              "a4",
              "letter",
              "legal",
              "a3",
              "a5",
              "image"
            ],
            "type": "string",
            "description": "A fixed paper size, or Image size: each page is exactly the size of its image plus the margins, at the DPI stored in the image, or 96 DPI when none or less than 30 is stored.",
            "default": "a4"
          },
          "orientation": {
            "title": "Orientation",
            "enum": [
              "auto",
              "portrait",
              "landscape"
            ],
            "type": "string",
            "description": "Auto makes each page horizontal for wide images and vertical for tall ones. Not used with Image size.",
            "default": "auto"
          },
          "fit": {
            "title": "Fit",
            "enum": [
              "fit",
              "shrink",
              "fill",
              "stretch"
            ],
            "type": "string",
            "description": "Fit: scale the image to fit inside the margins with the aspect ratio kept. Shrink only: scale down images that are too big and leave smaller ones at their own size. Fill: cover the area inside the margins with the aspect ratio kept, cropping the overflow. Stretch: fill the area exactly and distort the image. Not used with Image size.",
            "default": "fit"
          },
          "marginMm": {
            "title": "Margin (mm)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Space around the image on every side, in millimeters. 0 for edge to edge.",
            "default": 10
          },
          "compressImages": {
            "title": "Compress images",
            "type": "boolean",
            "description": "Store every image as JPEG at the quality below, for a smaller PDF. When off, JPEG photos go in unchanged and every other image goes in lossless.",
            "default": false
          },
          "jpegQuality": {
            "title": "JPEG quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1 to 100, used when Compress images is on.",
            "default": 80
          },
          "backgroundColor": {
            "title": "Background for transparency",
            "type": "string",
            "description": "Fills transparent areas of PNG, WebP and GIF images. A CSS color such as #ffffff or white.",
            "default": "#ffffff"
          },
          "title": {
            "title": "PDF title",
            "type": "string",
            "description": "Title stored in the PDF properties. Optional."
          },
          "outputName": {
            "title": "File name",
            "type": "string",
            "description": "Name of the single PDF. One PDF per image names each file after its image.",
            "default": "images"
          },
          "maxImages": {
            "title": "Maximum images",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Upper limit of images used in one run.",
            "default": 500
          },
          "maxFileSizeMb": {
            "title": "Maximum image size (MB)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Larger images are skipped with an error item and are not charged.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}