> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Compress PDF

> <!-- aisa-pricing:start -->
按用量计费；默认请求预估费用：$0.0103 USD（不是固定价格）。 声明的单位费率：每 provider_credit $0.000001 USD。 最终费用以账户适用价格及实际结算为准。
<!-- aisa-pricing:end -->

## 请求规范

* **方法与路径:** POST /apis/v1/pdf-co/pdf-compress
* **可用状态:** enabled
* **请求 URL 模板:** `https://api.aisa.one/apis/v1/pdf-co/pdf-compress`
* **Runtime 事实版本:** 2a3bd567205aeb00d10d4a6e8fbb280d098e3912e71bc16c07b9f91f82195a26

[完整 OpenAPI 定义](https://aisa.one/docs/reference-contracts/zh/pdf-co.json)

有效请求与价格声明（包括认证和引用的 schema）：

```json theme={null}
{
  "operationId": "pdf-co.pdf-compress",
  "method": "POST",
  "path": "/apis/v1/pdf-co/pdf-compress",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "required": [
            "url"
          ],
          "properties": {
            "url": {
              "type": "string",
              "description": "URL of the source PDF file to compress."
            },
            "name": {
              "type": "string",
              "description": "File name for the generated PDF."
            },
            "config": {
              "type": "object",
              "properties": {
                "save": {
                  "type": "object",
                  "properties": {
                    "garbage": {
                      "type": "integer",
                      "maximum": 4,
                      "minimum": 0,
                      "description": "PDF garbage collection level from 0 to 4."
                    }
                  },
                  "description": "PDF cleanup overrides.",
                  "additionalProperties": false
                },
                "fonts": {
                  "type": "object",
                  "properties": {
                    "subset": {
                      "type": "boolean",
                      "description": "Whether to remove unused glyphs from fonts."
                    },
                    "compress": {
                      "type": "boolean",
                      "description": "Whether to compress font streams."
                    }
                  },
                  "description": "Font optimization overrides.",
                  "additionalProperties": false
                },
                "images": {
                  "type": "object",
                  "properties": {
                    "color": {
                      "type": "object",
                      "properties": {
                        "skip": {
                          "type": "boolean",
                          "description": "Whether to skip all optimization for this image type."
                        },
                        "downsample": {
                          "type": "object",
                          "properties": {
                            "skip": {
                              "type": "boolean",
                              "description": "Whether to preserve the image dimensions."
                            },
                            "threshold_ppi": {
                              "type": "integer",
                              "description": "Resolution above which the image is downsampled."
                            },
                            "downsample_ppi": {
                              "type": "integer",
                              "description": "Target image resolution in pixels per inch."
                            }
                          },
                          "description": "Image resolution reduction settings.",
                          "additionalProperties": false
                        },
                        "compression": {
                          "type": "object",
                          "properties": {
                            "skip": {
                              "type": "boolean",
                              "description": "Whether to skip image re-encoding."
                            },
                            "compression_format": {
                              "enum": [
                                "jpeg",
                                "jpeg2000",
                                "ccitt_g4",
                                "ccitt_g3",
                                "zip"
                              ],
                              "type": "string",
                              "description": "Image compression format."
                            },
                            "compression_params": {
                              "type": "object",
                              "properties": {
                                "mct": {
                                  "enum": [
                                    0,
                                    1
                                  ],
                                  "type": "integer",
                                  "description": "Whether JPEG2000 enables the multi-component transform."
                                },
                                "quality": {
                                  "type": "integer",
                                  "maximum": 100,
                                  "minimum": 1,
                                  "description": "JPEG quality from 1 (smallest) to 100 (highest quality)."
                                },
                                "irreversible": {
                                  "type": "boolean",
                                  "description": "Whether JPEG2000 uses irreversible lossy encoding."
                                },
                                "quality_mode": {
                                  "enum": [
                                    "rates",
                                    "dB"
                                  ],
                                  "type": "string",
                                  "description": "JPEG2000 quality layer interpretation mode."
                                },
                                "quality_layers": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "integer"
                                      },
                                      {
                                        "type": "number"
                                      }
                                    ]
                                  },
                                  "description": "JPEG2000 quality layer values."
                                }
                              },
                              "description": "JPEG or JPEG2000 compression settings.",
                              "additionalProperties": false
                            }
                          },
                          "description": "Image re-encoding settings.",
                          "additionalProperties": false
                        }
                      },
                      "description": "Color image optimization overrides.",
                      "additionalProperties": false
                    },
                    "grayscale": {
                      "type": "object",
                      "properties": {
                        "skip": {
                          "type": "boolean",
                          "description": "Whether to skip all optimization for this image type."
                        },
                        "downsample": {
                          "type": "object",
                          "properties": {
                            "skip": {
                              "type": "boolean",
                              "description": "Whether to preserve the image dimensions."
                            },
                            "threshold_ppi": {
                              "type": "integer",
                              "description": "Resolution above which the image is downsampled."
                            },
                            "downsample_ppi": {
                              "type": "integer",
                              "description": "Target image resolution in pixels per inch."
                            }
                          },
                          "description": "Image resolution reduction settings.",
                          "additionalProperties": false
                        },
                        "compression": {
                          "type": "object",
                          "properties": {
                            "skip": {
                              "type": "boolean",
                              "description": "Whether to skip image re-encoding."
                            },
                            "compression_format": {
                              "enum": [
                                "jpeg",
                                "jpeg2000",
                                "ccitt_g4",
                                "ccitt_g3",
                                "zip"
                              ],
                              "type": "string",
                              "description": "Image compression format."
                            },
                            "compression_params": {
                              "type": "object",
                              "properties": {
                                "mct": {
                                  "enum": [
                                    0,
                                    1
                                  ],
                                  "type": "integer",
                                  "description": "Whether JPEG2000 enables the multi-component transform."
                                },
                                "quality": {
                                  "type": "integer",
                                  "maximum": 100,
                                  "minimum": 1,
                                  "description": "JPEG quality from 1 (smallest) to 100 (highest quality)."
                                },
                                "irreversible": {
                                  "type": "boolean",
                                  "description": "Whether JPEG2000 uses irreversible lossy encoding."
                                },
                                "quality_mode": {
                                  "enum": [
                                    "rates",
                                    "dB"
                                  ],
                                  "type": "string",
                                  "description": "JPEG2000 quality layer interpretation mode."
                                },
                                "quality_layers": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "integer"
                                      },
                                      {
                                        "type": "number"
                                      }
                                    ]
                                  },
                                  "description": "JPEG2000 quality layer values."
                                }
                              },
                              "description": "JPEG or JPEG2000 compression settings.",
                              "additionalProperties": false
                            }
                          },
                          "description": "Image re-encoding settings.",
                          "additionalProperties": false
                        }
                      },
                      "description": "Grayscale image optimization overrides.",
                      "additionalProperties": false
                    },
                    "monochrome": {
                      "type": "object",
                      "properties": {
                        "skip": {
                          "type": "boolean",
                          "description": "Whether to skip all optimization for this image type."
                        },
                        "downsample": {
                          "type": "object",
                          "properties": {
                            "skip": {
                              "type": "boolean",
                              "description": "Whether to preserve the image dimensions."
                            },
                            "threshold_ppi": {
                              "type": "integer",
                              "description": "Resolution above which the image is downsampled."
                            },
                            "downsample_ppi": {
                              "type": "integer",
                              "description": "Target image resolution in pixels per inch."
                            }
                          },
                          "description": "Image resolution reduction settings.",
                          "additionalProperties": false
                        },
                        "compression": {
                          "type": "object",
                          "properties": {
                            "skip": {
                              "type": "boolean",
                              "description": "Whether to skip image re-encoding."
                            },
                            "compression_format": {
                              "enum": [
                                "jpeg",
                                "jpeg2000",
                                "ccitt_g4",
                                "ccitt_g3",
                                "zip"
                              ],
                              "type": "string",
                              "description": "Image compression format."
                            },
                            "compression_params": {
                              "type": "object",
                              "properties": {
                                "mct": {
                                  "enum": [
                                    0,
                                    1
                                  ],
                                  "type": "integer",
                                  "description": "Whether JPEG2000 enables the multi-component transform."
                                },
                                "quality": {
                                  "type": "integer",
                                  "maximum": 100,
                                  "minimum": 1,
                                  "description": "JPEG quality from 1 (smallest) to 100 (highest quality)."
                                },
                                "irreversible": {
                                  "type": "boolean",
                                  "description": "Whether JPEG2000 uses irreversible lossy encoding."
                                },
                                "quality_mode": {
                                  "enum": [
                                    "rates",
                                    "dB"
                                  ],
                                  "type": "string",
                                  "description": "JPEG2000 quality layer interpretation mode."
                                },
                                "quality_layers": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "integer"
                                      },
                                      {
                                        "type": "number"
                                      }
                                    ]
                                  },
                                  "description": "JPEG2000 quality layer values."
                                }
                              },
                              "description": "JPEG or JPEG2000 compression settings.",
                              "additionalProperties": false
                            }
                          },
                          "description": "Image re-encoding settings.",
                          "additionalProperties": false
                        }
                      },
                      "description": "Monochrome image optimization overrides.",
                      "additionalProperties": false
                    }
                  },
                  "description": "Image optimization overrides.",
                  "additionalProperties": false
                }
              },
              "description": "Partial advanced compression configuration.",
              "additionalProperties": false
            },
            "password": {
              "type": "string",
              "description": "Password for opening a protected source PDF."
            },
            "expiration": {
              "type": "integer",
              "description": "Number of minutes before the temporary output link expires."
            },
            "colorQuality": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "JPEG quality for color and grayscale images from 1 to 100."
            },
            "compressionLevel": {
              "enum": [
                "low",
                "medium",
                "high",
                "aggressive"
              ],
              "type": "string",
              "description": "Ready-to-use PDF compression preset."
            }
          },
          "additionalProperties": false
        }
      }
    }
  },
  "x-aisa-status": "enabled",
  "x-aisa-pricing": {
    "cost_contract": "response_units",
    "customer_multiplier": 1.0,
    "customer_pricing": "provider_cost_multiplier",
    "default_request_estimate_usd": 0.0103,
    "estimate_source": "profile_seed",
    "evidence_source": "response_body",
    "maximum_units": 10000000,
    "unit": "provider_credit",
    "unit_rate_usd": 1e-06
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## 费用与请求规则

按用量计费；默认请求预估费用：\$0.0103 USD（不是固定价格）。 声明的单位费率：每 provider\_credit \$0.000001 USD。 最终费用以账户适用价格及实际结算为准。

公开参考值不是你的账户报价或最终扣费。对于支持 X-AISA-Cost-Mode: quote 的接口，执行前请针对完整请求获取免费报价；执行后通过响应费用元数据和 Usage Logs 核对结算费用。1 USD 等于 1,000,000 个整数 micro-USD。

* **默认请求参考估价（USD）:** 0.0103
* **声明的单位费率（USD）:** 1e-06
* **计费单位:** provider\_credit
* **计费依据:** response\_units
* **公开参考倍率:** 1.0
* **声明的最大计数或单位数:** 10000000
* **结算证据来源:** response\_body


## OpenAPI

````yaml reference-contracts/zh/pdf-co.json POST /apis/v1/pdf-co/pdf-compress
openapi: 3.1.0
info:
  description: ''
  title: PDF.co
  version: '1'
  x-aisa-capabilities:
    idempotency: Idempotency-Key
    max_price: X-AISA-Max-Price-USD
    quote:
      header: X-AISA-Cost-Mode
      value: quote
  x-aisa-configured-paths:
    - /apis/v1/pdf-co/convert-excel-to-html
    - /apis/v1/pdf-co/convert-excel-to-xml
    - /apis/v1/pdf-co/pdf-auto-rotate
    - /apis/v1/pdf-co/pdf-compress
    - /apis/v1/pdf-co/pdf-find
    - /apis/v1/pdf-co/pdf-forms-info-reader
    - /apis/v1/pdf-co/pdf-from-csv
    - /apis/v1/pdf-co/pdf-from-document-txt
    - /apis/v1/pdf-co/pdf-from-image
    - /apis/v1/pdf-co/pdf-from-url
    - /apis/v1/pdf-co/pdf-info-reader
    - /apis/v1/pdf-co/pdf-merge
    - /apis/v1/pdf-co/pdf-rotate
    - /apis/v1/pdf-co/pdf-search-and-delete-text
    - /apis/v1/pdf-co/pdf-search-and-replace-text
    - /apis/v1/pdf-co/pdf-security-add
    - /apis/v1/pdf-co/pdf-security-remove
    - /apis/v1/pdf-co/pdf-split
    - /apis/v1/pdf-co/pdf-to-csv
    - /apis/v1/pdf-co/pdf-to-html
    - /apis/v1/pdf-co/pdf-to-text
    - /apis/v1/pdf-co/pdf-to-xls
    - /apis/v1/pdf-co/pdf-to-xlsx
    - /apis/v1/pdf-co/pdf-to-xml
    - /apis/v1/pdf-co/xls-to-pdf
  x-aisa-document:
    facts_hash: 2a3bd567205aeb00d10d4a6e8fbb280d098e3912e71bc16c07b9f91f82195a26
    generator_version: '3'
    protocol_version: '1'
    schema_version: '1'
    composer_version: '28'
    response_pending:
      - operation_id: pdf-co.convert-excel-to-html
        path: /apis/v1/pdf-co/convert-excel-to-html
        method: POST
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
      - operation_id: pdf-co.convert-excel-to-xml
        path: /apis/v1/pdf-co/convert-excel-to-xml
        method: POST
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
      - operation_id: pdf-co.pdf-find
        path: /apis/v1/pdf-co/pdf-find
        method: POST
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
      - operation_id: pdf-co.pdf-forms-info-reader
        path: /apis/v1/pdf-co/pdf-forms-info-reader
        method: POST
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
      - operation_id: pdf-co.pdf-from-document-txt
        path: /apis/v1/pdf-co/pdf-from-document-txt
        method: POST
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
      - operation_id: pdf-co.pdf-info-reader
        path: /apis/v1/pdf-co/pdf-info-reader
        method: POST
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
      - operation_id: pdf-co.pdf-merge
        path: /apis/v1/pdf-co/pdf-merge
        method: POST
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
      - operation_id: pdf-co.pdf-rotate
        path: /apis/v1/pdf-co/pdf-rotate
        method: POST
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
      - operation_id: pdf-co.pdf-search-and-delete-text
        path: /apis/v1/pdf-co/pdf-search-and-delete-text
        method: POST
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
      - operation_id: pdf-co.pdf-search-and-replace-text
        path: /apis/v1/pdf-co/pdf-search-and-replace-text
        method: POST
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
      - operation_id: pdf-co.pdf-split
        path: /apis/v1/pdf-co/pdf-split
        method: POST
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
      - operation_id: pdf-co.pdf-to-csv
        path: /apis/v1/pdf-co/pdf-to-csv
        method: POST
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
      - operation_id: pdf-co.pdf-to-html
        path: /apis/v1/pdf-co/pdf-to-html
        method: POST
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
      - operation_id: pdf-co.pdf-to-text
        path: /apis/v1/pdf-co/pdf-to-text
        method: POST
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
      - operation_id: pdf-co.pdf-to-xls
        path: /apis/v1/pdf-co/pdf-to-xls
        method: POST
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
      - operation_id: pdf-co.pdf-to-xlsx
        path: /apis/v1/pdf-co/pdf-to-xlsx
        method: POST
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
      - operation_id: pdf-co.pdf-to-xml
        path: /apis/v1/pdf-co/pdf-to-xml
        method: POST
        statuses:
          - '200'
        reason: public success response has no authoritative payload declaration
    document_hash: sha256:87a4d85474bf5cf726efde4c3cc38a1dc18d870e1a853b001b5c3bbefbd66897
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: pdf-co
  x-aisa-catalogs:
    pdf-co:
      title: PDF.co
      description: ''
      x-aisa-document:
        facts_hash: 2a3bd567205aeb00d10d4a6e8fbb280d098e3912e71bc16c07b9f91f82195a26
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
      x-aisa-plans:
        builder: 1
        display_plan: payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/pdf-co/pdf-compress:
    post:
      tags:
        - PDF.co
      summary: Compress PDF
      description: >-
        <!-- aisa-pricing:start -->

        按用量计费；默认请求预估费用：$0.0103 USD（不是固定价格）。 声明的单位费率：每 provider_credit $0.000001
        USD。 最终费用以账户适用价格及实际结算为准。

        <!-- aisa-pricing:end -->
      operationId: pdf-co.pdf-compress
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - url
              properties:
                url:
                  type: string
                  description: URL of the source PDF file to compress.
                name:
                  type: string
                  description: File name for the generated PDF.
                config:
                  type: object
                  properties:
                    save:
                      type: object
                      properties:
                        garbage:
                          type: integer
                          maximum: 4
                          minimum: 0
                          description: PDF garbage collection level from 0 to 4.
                      description: PDF cleanup overrides.
                      additionalProperties: false
                    fonts:
                      type: object
                      properties:
                        subset:
                          type: boolean
                          description: Whether to remove unused glyphs from fonts.
                        compress:
                          type: boolean
                          description: Whether to compress font streams.
                      description: Font optimization overrides.
                      additionalProperties: false
                    images:
                      type: object
                      properties:
                        color:
                          type: object
                          properties:
                            skip:
                              type: boolean
                              description: >-
                                Whether to skip all optimization for this image
                                type.
                            downsample:
                              type: object
                              properties:
                                skip:
                                  type: boolean
                                  description: Whether to preserve the image dimensions.
                                threshold_ppi:
                                  type: integer
                                  description: >-
                                    Resolution above which the image is
                                    downsampled.
                                downsample_ppi:
                                  type: integer
                                  description: Target image resolution in pixels per inch.
                              description: Image resolution reduction settings.
                              additionalProperties: false
                            compression:
                              type: object
                              properties:
                                skip:
                                  type: boolean
                                  description: Whether to skip image re-encoding.
                                compression_format:
                                  enum:
                                    - jpeg
                                    - jpeg2000
                                    - ccitt_g4
                                    - ccitt_g3
                                    - zip
                                  type: string
                                  description: Image compression format.
                                compression_params:
                                  type: object
                                  properties:
                                    mct:
                                      enum:
                                        - 0
                                        - 1
                                      type: integer
                                      description: >-
                                        Whether JPEG2000 enables the
                                        multi-component transform.
                                    quality:
                                      type: integer
                                      maximum: 100
                                      minimum: 1
                                      description: >-
                                        JPEG quality from 1 (smallest) to 100
                                        (highest quality).
                                    irreversible:
                                      type: boolean
                                      description: >-
                                        Whether JPEG2000 uses irreversible lossy
                                        encoding.
                                    quality_mode:
                                      enum:
                                        - rates
                                        - dB
                                      type: string
                                      description: >-
                                        JPEG2000 quality layer interpretation
                                        mode.
                                    quality_layers:
                                      type: array
                                      items:
                                        anyOf:
                                          - type: integer
                                          - type: number
                                      description: JPEG2000 quality layer values.
                                  description: JPEG or JPEG2000 compression settings.
                                  additionalProperties: false
                              description: Image re-encoding settings.
                              additionalProperties: false
                          description: Color image optimization overrides.
                          additionalProperties: false
                        grayscale:
                          type: object
                          properties:
                            skip:
                              type: boolean
                              description: >-
                                Whether to skip all optimization for this image
                                type.
                            downsample:
                              type: object
                              properties:
                                skip:
                                  type: boolean
                                  description: Whether to preserve the image dimensions.
                                threshold_ppi:
                                  type: integer
                                  description: >-
                                    Resolution above which the image is
                                    downsampled.
                                downsample_ppi:
                                  type: integer
                                  description: Target image resolution in pixels per inch.
                              description: Image resolution reduction settings.
                              additionalProperties: false
                            compression:
                              type: object
                              properties:
                                skip:
                                  type: boolean
                                  description: Whether to skip image re-encoding.
                                compression_format:
                                  enum:
                                    - jpeg
                                    - jpeg2000
                                    - ccitt_g4
                                    - ccitt_g3
                                    - zip
                                  type: string
                                  description: Image compression format.
                                compression_params:
                                  type: object
                                  properties:
                                    mct:
                                      enum:
                                        - 0
                                        - 1
                                      type: integer
                                      description: >-
                                        Whether JPEG2000 enables the
                                        multi-component transform.
                                    quality:
                                      type: integer
                                      maximum: 100
                                      minimum: 1
                                      description: >-
                                        JPEG quality from 1 (smallest) to 100
                                        (highest quality).
                                    irreversible:
                                      type: boolean
                                      description: >-
                                        Whether JPEG2000 uses irreversible lossy
                                        encoding.
                                    quality_mode:
                                      enum:
                                        - rates
                                        - dB
                                      type: string
                                      description: >-
                                        JPEG2000 quality layer interpretation
                                        mode.
                                    quality_layers:
                                      type: array
                                      items:
                                        anyOf:
                                          - type: integer
                                          - type: number
                                      description: JPEG2000 quality layer values.
                                  description: JPEG or JPEG2000 compression settings.
                                  additionalProperties: false
                              description: Image re-encoding settings.
                              additionalProperties: false
                          description: Grayscale image optimization overrides.
                          additionalProperties: false
                        monochrome:
                          type: object
                          properties:
                            skip:
                              type: boolean
                              description: >-
                                Whether to skip all optimization for this image
                                type.
                            downsample:
                              type: object
                              properties:
                                skip:
                                  type: boolean
                                  description: Whether to preserve the image dimensions.
                                threshold_ppi:
                                  type: integer
                                  description: >-
                                    Resolution above which the image is
                                    downsampled.
                                downsample_ppi:
                                  type: integer
                                  description: Target image resolution in pixels per inch.
                              description: Image resolution reduction settings.
                              additionalProperties: false
                            compression:
                              type: object
                              properties:
                                skip:
                                  type: boolean
                                  description: Whether to skip image re-encoding.
                                compression_format:
                                  enum:
                                    - jpeg
                                    - jpeg2000
                                    - ccitt_g4
                                    - ccitt_g3
                                    - zip
                                  type: string
                                  description: Image compression format.
                                compression_params:
                                  type: object
                                  properties:
                                    mct:
                                      enum:
                                        - 0
                                        - 1
                                      type: integer
                                      description: >-
                                        Whether JPEG2000 enables the
                                        multi-component transform.
                                    quality:
                                      type: integer
                                      maximum: 100
                                      minimum: 1
                                      description: >-
                                        JPEG quality from 1 (smallest) to 100
                                        (highest quality).
                                    irreversible:
                                      type: boolean
                                      description: >-
                                        Whether JPEG2000 uses irreversible lossy
                                        encoding.
                                    quality_mode:
                                      enum:
                                        - rates
                                        - dB
                                      type: string
                                      description: >-
                                        JPEG2000 quality layer interpretation
                                        mode.
                                    quality_layers:
                                      type: array
                                      items:
                                        anyOf:
                                          - type: integer
                                          - type: number
                                      description: JPEG2000 quality layer values.
                                  description: JPEG or JPEG2000 compression settings.
                                  additionalProperties: false
                              description: Image re-encoding settings.
                              additionalProperties: false
                          description: Monochrome image optimization overrides.
                          additionalProperties: false
                      description: Image optimization overrides.
                      additionalProperties: false
                  description: Partial advanced compression configuration.
                  additionalProperties: false
                password:
                  type: string
                  description: Password for opening a protected source PDF.
                expiration:
                  type: integer
                  description: Number of minutes before the temporary output link expires.
                colorQuality:
                  type: integer
                  maximum: 100
                  minimum: 1
                  description: JPEG quality for color and grayscale images from 1 to 100.
                compressionLevel:
                  enum:
                    - low
                    - medium
                    - high
                    - aggressive
                  type: string
                  description: Ready-to-use PDF compression preset.
              additionalProperties: false
      responses:
        '200':
          description: Tool result data
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Response576A0Ea506F3_connect_PDF_CO_PDF_COMPRESS__output__public_data
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
components:
  schemas:
    Response576A0Ea506F3_connect_PDF_CO_PDF_COMPRESS__output__public_data:
      $ref: >-
        #/components/schemas/Response576A0Ea506F3_connect_PDF_CO_PDF_COMPRESS__output__f550ba0ddc42d909
    Response576A0Ea506F3_connect_PDF_CO_PDF_COMPRESS__output__f550ba0ddc42d909:
      type: object
      required:
        - error
        - status
      properties:
        url:
          type: string
        name:
          type: string
        error:
          type: boolean
        status:
          type: integer
        credits:
          type: integer
        duration:
          type: integer
        pageCount:
          type: integer
        remainingCredits:
          type: integer
        outputLinkValidTill:
          type: string
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.