DeckFlow Logo Developers DeckFlow documentation
Developer GuideAPI ReferenceMCPCLI

Optimizer

The Optimizer API specifications and task parameters, supporting file compression, image resizing, PPTX font embedding, and video size reduction.

API Endpoints

Optimization tasks are processed asynchronously. Use the two endpoints below to create and retrieve tasks. Click "Try it" on the right to open the interactive playground.

POST /tools/tasks

Creates an asynchronous optimization task. Pass the corresponding optimizer tool identifier in type.

GET /tools/tasks/:id

Queries the execution status of an optimization task and retrieves the final output download link via result.url.

Request Headers

Header Type Required Description
Authorization String Yes Bearer <YOUR_API_KEY> — API Key.
Content-Type String Yes (POST) Must be multipart/form-data.

POST Request Body Parameters (Form Data)

Parameter Type Required Description
files File Yes The source file to be processed. Supports uploading multiple files.
type String Yes Task type identifier. For example: file.compress.
params String (JSON) No JSON string of tool-specific parameters. Defaults to empty JSON string "{}".
notifyURL String No Webhook callback URL to receive task status update notifications.

Task Parameter Specifications

File Compressor

Reduces the file size of office documents and archives while maximizing visual quality. Supports .zip, .pptx, .key, .docx, .xlsx formats, with a file size limit of 300 MB. params is an empty object {}.

Image Resizer

Customizable resizing of images while maintaining original aspect ratio. Supports image/* format, with a file size limit of 100 MB. The structure of params is as follows:

{
  "maxWidth": 800,   // number. Optional. Restricts max width in pixels (mutually exclusive with maxHeight)
  "maxHeight": 600   // number. Optional. Restricts max height in pixels (mutually exclusive with maxWidth)
}

PPTX Font Embedder

Embeds external fonts directly into PPTX presentations to resolve formatting discrepancies due to missing system fonts. Supports .pptx format, with a file size limit of 300 MB. The structure of params is as follows:

{
  "usedFonts": ["Inter", "Roboto"] // array of strings. Array of font family names to embed from Google Fonts library
}

Video Size Reducer

Compresses video file size efficiently to reduce bandwidth usage. Supports video/* (e.g. MP4, MOV, and other common formats), with a file size limit of 300 MB. params is an empty object {}.