{
  "openapi": "3.0.1",
  "info": {
    "title": "EPUB to PDF Converter - Ebook to PDF Online",
    "description": "Convert EPUB to PDF online in seconds. Upload an ebook or paste a URL and get a PDF back, with page size, margins and fonts under your control. Also converts AZW3, MOBI, FB2 and CBZ. Up to 100 books per run, returned as a single ZIP archive.",
    "version": "0.1",
    "x-build-id": "Wi2tHf6aNS9eeqObt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/marcel-rbro~epub-to-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-marcel-rbro-epub-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/marcel-rbro~epub-to-pdf/runs": {
      "post": {
        "operationId": "runs-sync-marcel-rbro-epub-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/marcel-rbro~epub-to-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-marcel-rbro-epub-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": {
          "files": {
            "title": "Ebooks",
            "maxItems": 100,
            "type": "array",
            "description": "The ebooks to convert. Upload files or paste direct URLs. Each one is converted separately and the results come back as a ZIP. Accepts .epub, .azw3, .mobi, .fb2, .cbz, .lit and .pdb. A DRM-protected or unreadable file is skipped with an explanation and does not stop the rest of the batch."
          },
          "file": {
            "title": "Single ebook",
            "type": "string",
            "description": "One ebook as a URL, kept for API callers and saved input configurations that predate the Ebooks field. Ignored when Ebooks is filled in."
          },
          "paperSize": {
            "title": "Page size",
            "enum": [
              "a4",
              "letter",
              "legal",
              "a3",
              "a5",
              "a6",
              "b4",
              "b5",
              "b6"
            ],
            "type": "string",
            "description": "A4 for printing outside the US, Letter inside it. A5 and A6 give a paperback or e-reader page instead of an office one, which is usually more comfortable to read on screen.",
            "default": "a4"
          },
          "baseFontSize": {
            "title": "Base font size",
            "minimum": 0,
            "maximum": 48,
            "type": "integer",
            "description": "Base body text size in points. Every other size in the book is rescaled around it. Leave at 0 to let calibre choose a size that suits the page.",
            "default": 0
          },
          "marginTop": {
            "title": "Top margin",
            "minimum": 1,
            "maximum": 288,
            "type": "integer",
            "description": "In points. 72 pt is one inch. calibre treats a page margin of 0 as \"unset\" rather than \"no margin\", so use 1 for a near-edge-to-edge page.",
            "default": 72
          },
          "marginBottom": {
            "title": "Bottom margin",
            "minimum": 1,
            "maximum": 288,
            "type": "integer",
            "description": "In points. Leave room here if you turn page numbers on.",
            "default": 72
          },
          "marginLeft": {
            "title": "Left margin",
            "minimum": 1,
            "maximum": 288,
            "type": "integer",
            "description": "In points.",
            "default": 72
          },
          "marginRight": {
            "title": "Right margin",
            "minimum": 1,
            "maximum": 288,
            "type": "integer",
            "description": "In points.",
            "default": 72
          },
          "pdfPageNumbers": {
            "title": "Add page numbers",
            "type": "boolean",
            "description": "Prints a page number at the bottom of every page. A footer template, if you set one, takes precedence over this.",
            "default": false
          },
          "standardFont": {
            "title": "Body font",
            "enum": [
              "serif",
              "sans",
              "mono"
            ],
            "type": "string",
            "description": "Which of the three font slots the body text uses. Serif is the conventional choice for a book.",
            "default": "serif"
          },
          "serifFamily": {
            "title": "Serif font family",
            "type": "string",
            "description": "Font family to use for serif text. Must be installed in the container: DejaVu Serif or Liberation Serif. Leave empty for calibre's default."
          },
          "sansFamily": {
            "title": "Sans-serif font family",
            "type": "string",
            "description": "Font family to use for sans-serif text. Must be installed in the container: DejaVu Sans or Liberation Sans. Leave empty for calibre's default."
          },
          "preserveCoverAspectRatio": {
            "title": "Preserve cover aspect ratio",
            "type": "boolean",
            "description": "Keeps the cover's proportions instead of stretching it to fill the first page. On by default, because a stretched cover is rarely what anyone wants.",
            "default": true
          },
          "smartenPunctuation": {
            "title": "Smarten punctuation",
            "type": "boolean",
            "description": "Converts plain quotes, dashes and ellipses into their typographic equivalents.",
            "default": false
          },
          "pdfHeaderTemplate": {
            "title": "Header template",
            "type": "string",
            "description": "HTML printed at the top of every page. The strings _PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_ are replaced with their current values, for example: <div style=\"text-align:center\">_SECTION_</div>"
          },
          "pdfFooterTemplate": {
            "title": "Footer template",
            "type": "string",
            "description": "HTML printed at the bottom of every page, using the same replaceable strings. Overrides the page numbers switch."
          },
          "outputFilename": {
            "title": "Output filename",
            "type": "string",
            "description": "Name of the resulting PDF. Defaults to the input filename with a .pdf extension. Ignored for a batch, where every PDF keeps its own filename and the ZIP is always converted-ebooks.zip."
          },
          "bookTitle": {
            "title": "Override title",
            "type": "string",
            "description": "Sets the title metadata of the PDF. Leave empty to keep the title stored in the source file."
          },
          "bookAuthors": {
            "title": "Override authors",
            "type": "string",
            "description": "Sets the author metadata of the PDF. Separate multiple authors with an ampersand, for example \"Ursula K. Le Guin & Someone Else\"."
          },
          "fileBase64": {
            "title": "File as base64",
            "type": "string",
            "description": "Alternative to the file field for API callers: a single source ebook encoded as base64. Adds about 33% to the payload size."
          },
          "filename": {
            "title": "Filename for base64 input",
            "type": "string",
            "description": "Original filename to use when the file is passed as base64."
          },
          "verboseLog": {
            "title": "Verbose log",
            "type": "boolean",
            "description": "Includes the full calibre conversion log in the Actor log. Useful when a conversion produces odd output.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}