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

# ConvertAPI Integration for AI Agents & Workflows

> Powerful file conversion service supporting hundreds of format conversions including documents, images, spreadsheets, and web pages to PDF/JPG.

{/* Self-hosted logo — build-time vendored from modulex.json / Iconify (see scripts/lib/logo.js). */}

<img src="https://mintcdn.com/modulexaillc/zKB2qsP6Q61VNLfB/logos/convertapi.svg?fit=max&auto=format&n=zKB2qsP6Q61VNLfB&q=85&s=0220c6ef862be86a598e12005a31618a" alt="ConvertAPI logo" width="72" height="72" data-path="logos/convertapi.svg" />

## Overview

Add **ConvertAPI** to any ModuleX agent or workflow. File-format conversion (PDF, DOCX, JPG, etc.), base64 file conversion, web-page-to-PDF rendering, and format-discovery against the ConvertAPI v2 REST endpoints (`v2.convertapi.com`).

<Info>
  **Categories**: Productivity & Collaboration · Utilities · Convert · Documents · **Auth**: API Key · **Actions**: 4
</Info>

## Authentication

### API Key Authentication

Authenticate using your ConvertAPI Secret key

#### Required Credentials

| Field             | Description                                   | Required | Format                     |
| ----------------- | --------------------------------------------- | -------- | -------------------------- |
| ConvertAPI Secret | Your ConvertAPI Secret key for authentication | Yes      | `xxxxxxxxxxxxxxxxxxxxxxxx` |

## Available Actions

<AccordionGroup>
  <Accordion title="convert_file — Convert a file from a URL to another format. Supports hundreds of conversions including PDF, DOCX, JPG, PNG, XLSX, and more.">
    ### Parameters

    <ResponseField name="file_url" type="string" required>
      URL of the file to convert
    </ResponseField>

    <ResponseField name="format_from" type="string" required>
      Input file format (e.g. 'docx', 'pdf', 'png')
    </ResponseField>

    <ResponseField name="format_to" type="string" required>
      Output file format (e.g. 'pdf', 'jpg', 'docx')
    </ResponseField>

    <ResponseField name="filename" type="string">
      Output filename without extension
    </ResponseField>

    <ResponseField name="timeout" type="integer">
      Conversion timeout in seconds (Default: `300`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "ConvertedFile": {
          "additionalProperties": false,
          "properties": {
            "filename": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Filename"
            },
            "file_size": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "File Size"
            },
            "file_url": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "File Url"
            },
            "file_data_base64": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "File Data Base64"
            }
          },
          "title": "ConvertedFile",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "conversion_cost": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Conversion Cost"
        },
        "files": {
          "items": {
            "$ref": "#/$defs/ConvertedFile"
          },
          "title": "Files",
          "type": "array"
        },
        "format_from": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Format From"
        },
        "format_to": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Format To"
        }
      },
      "required": [
        "success"
      ],
      "title": "ConvertFileOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="convert_base64_file — Convert a base64-encoded file to another format. Useful when file content is already in memory.">
    ### Parameters

    <ResponseField name="base64_string" type="string" required>
      Base64-encoded file content
    </ResponseField>

    <ResponseField name="format_from" type="string" required>
      Input file format (e.g. 'docx', 'pdf')
    </ResponseField>

    <ResponseField name="format_to" type="string" required>
      Output file format (e.g. 'pdf', 'jpg')
    </ResponseField>

    <ResponseField name="filename" type="string">
      Output filename without extension (Default: `converted`)
    </ResponseField>

    <ResponseField name="timeout" type="integer">
      Conversion timeout in seconds (Default: `300`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "ConvertedFile": {
          "additionalProperties": false,
          "properties": {
            "filename": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Filename"
            },
            "file_size": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "File Size"
            },
            "file_url": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "File Url"
            },
            "file_data_base64": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "File Data Base64"
            }
          },
          "title": "ConvertedFile",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "conversion_cost": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Conversion Cost"
        },
        "files": {
          "items": {
            "$ref": "#/$defs/ConvertedFile"
          },
          "title": "Files",
          "type": "array"
        },
        "format_from": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Format From"
        },
        "format_to": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Format To"
        }
      },
      "required": [
        "success"
      ],
      "title": "ConvertBase64FileOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="convert_web_url — Convert a web page URL to PDF or JPG. Renders the page and captures it as a document or image.">
    ### Parameters

    <ResponseField name="url" type="string" required>
      Website URL to convert
    </ResponseField>

    <ResponseField name="format_to" type="string">
      Output format: 'pdf' or 'jpg' (Default: `pdf`)
    </ResponseField>

    <ResponseField name="filename" type="string">
      Output filename without extension
    </ResponseField>

    <ResponseField name="timeout" type="integer">
      Conversion timeout in seconds (Default: `300`)
    </ResponseField>

    <ResponseField name="conversion_delay" type="integer">
      Delay in seconds to let page fully load before conversion
    </ResponseField>

    <ResponseField name="page_orientation" type="string">
      PDF page orientation ('portrait' or 'landscape')
    </ResponseField>

    <ResponseField name="page_size" type="string">
      PDF page size (e.g. 'a4', 'letter', 'legal')
    </ResponseField>

    <ResponseField name="javascript" type="boolean">
      Allow web pages to run JavaScript (Default: `true`)
    </ResponseField>

    <ResponseField name="ad_block" type="boolean">
      Block ads in the converting page (Default: `false`)
    </ResponseField>

    <ResponseField name="cookie_consent_block" type="boolean">
      Try to remove cookie consent popups (Default: `false`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "ConvertedFile": {
          "additionalProperties": false,
          "properties": {
            "filename": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Filename"
            },
            "file_size": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "File Size"
            },
            "file_url": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "File Url"
            },
            "file_data_base64": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "File Data Base64"
            }
          },
          "title": "ConvertedFile",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "conversion_cost": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Conversion Cost"
        },
        "files": {
          "items": {
            "$ref": "#/$defs/ConvertedFile"
          },
          "title": "Files",
          "type": "array"
        },
        "source_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Source Url"
        },
        "format_to": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Format To"
        }
      },
      "required": [
        "success"
      ],
      "title": "ConvertWebUrlOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_supported_formats — Get the list of supported output formats for a given input format. Use this to discover available conversions.">
    ### Parameters

    <ResponseField name="format_from" type="string" required>
      Input format to check (e.g. 'docx', 'pdf', 'png')
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "format_from": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Format From"
        },
        "supported_formats": {
          "items": {
            "type": "string"
          },
          "title": "Supported Formats",
          "type": "array"
        },
        "count": {
          "default": 0,
          "title": "Count",
          "type": "integer"
        }
      },
      "required": [
        "success"
      ],
      "title": "GetSupportedFormatsOutput",
      "type": "object"
    }
    ```
  </Accordion>
</AccordionGroup>

## Limits & Quotas

* Conversions cost credits; `get_supported_formats` is free.
* Long-running conversions accept a per-call `timeout` (default 300s).
* Failures (non-200, empty `Files`, exceptions) surface as
  `success=False` with `error`.

## Related integrations

<CardGroup cols={3}>
  <Card title="Google Docs" href="/integrations/tools/google-docs" />

  <Card title="Cal.com" href="/integrations/tools/cal-com" />

  <Card title="Canva" href="/integrations/tools/canva" />
</CardGroup>

## Links

* [ConvertAPI](https://www.convertapi.com)
