# Cloudlayer

cloudlayer.io is a document and asset generation service that enables users to dynamically create PDFs and images through a REST-based API, SDKs, or no-code integrations.

- **Category:** documents
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 17
- **Triggers:** 0
- **Slug:** `CLOUDLAYER`
- **Version:** 20260312_00

## Tools

### Add Storage

**Slug:** `CLOUDLAYER_ADD_STORAGE`

Add a user-owned S3-compatible storage configuration for storing generated assets. This action allows Enterprise plan users to configure their own S3-compatible storage (AWS S3, DigitalOcean Spaces, Wasabi, MinIO, etc.) instead of using the built-in cloud storage included with Cloudlayer accounts. Note: User storage is only available on Enterprise plans. Standard plans will receive an 'allowed: false' response indicating the feature requires a plan upgrade.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | A unique, human-readable title to identify this storage configuration in your account. Must be unique across all storage credentials. |
| `path` | string | No | Custom endpoint URL for S3-compatible storage providers like DigitalOcean Spaces or MinIO. Not required for AWS S3. |
| `region` | string | Yes | Storage region code (e.g., 'us-east-1' for AWS, 'nyc3' for DigitalOcean). Required for all providers. |
| `provider` | string ("aws" | "azure" | "gcp" | "s3") | Yes | Storage provider type. Use 'aws' for Amazon S3, 'azure' for Azure Blob, 'gcp' for Google Cloud Storage, or 's3' for any S3-compatible storage (e.g., DigitalOcean Spaces, Wasabi, MinIO). |
| `accessKey` | string | Yes | The access key ID from your storage provider (e.g., AWS Access Key ID). |
| `container` | string | Yes | Name of the bucket (AWS S3, GCP) or container (Azure) where assets will be stored. |
| `secretAccessKey` | string | Yes | The secret access key from your storage provider. This is encrypted before storage. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert HTML to Image (V2)

**Slug:** `CLOUDLAYER_CONVERT_HTML_TO_IMAGE`

Convert HTML content to an image (PNG, JPG, or WebP) using the v2 API endpoint. Renders the provided HTML string using a headless browser and returns job details with the generated image asset. Supports various rendering options including viewport configuration, transparency, auto-scroll, and custom wait conditions.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `html` | string | Yes | The HTML content to convert. Will be automatically base64-encoded before sending to the API. |
| `trim` | boolean | No | Automatically trim whitespace around the rendered content. |
| `async` | boolean | No | Override default async behavior. Set to true for async processing, false for synchronous. |
| `delay` | integer | No | Milliseconds to wait before conversion after page load. |
| `scale` | number | No | Webpage rendering scale factor (0.1-2.0). |
| `width` | integer | No | Width of the output image in pixels. |
| `height` | integer | No | Height of the output image in pixels. If omitted, auto-calculated based on content. |
| `inline` | boolean | No | If true, Content-Disposition is 'inline'; if false, 'attachment'. |
| `storage` | string | No | Storage configuration. Use boolean to enable/disable, or object for advanced configuration. |
| `timeout` | integer | No | Maximum time in milliseconds to wait for rendering. |
| `webhook` | string | No | HTTPS URL to receive notification when the job completes (for async jobs). |
| `filename` | string | No | Custom filename for the generated image (used in Content-Disposition header). |
| `timeZone` | string | No | IANA timezone identifier (e.g., 'America/New_York', 'Europe/London'). |
| `viewPort` | object | No | Viewport dimensions for rendering the HTML content. |
| `imageType` | string ("png" | "jpg" | "webp") | No | Output image format. Options: 'png', 'jpg', or 'webp'. Default is 'png'. |
| `landscape` | boolean | No | Set page orientation to landscape. |
| `projectId` | string | No | Project ID for organizing the generated assets. |
| `waitUntil` | string ("load" | "domcontentloaded" | "networkidle0" | "networkidle2") | No | Wait condition before capturing: 'load', 'domcontentloaded', 'networkidle0', or 'networkidle2'. |
| `autoScroll` | boolean | No | Auto-scroll the page to load lazy content before capturing. |
| `transparent` | boolean | No | Enable transparent background for PNG images. Only applicable for PNG format. |
| `generatePreview` | object | No | Configuration for generating a thumbnail preview. |
| `waitForSelector` | object | No | Configuration for waiting for a specific selector before conversion. |
| `preferCSSPageSize` | boolean | No | Use CSS-defined page size instead of viewport dimensions. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert HTML to PDF (v2)

**Slug:** `CLOUDLAYER_CONVERT_HTML_TO_PDF_V2`

Tool to convert HTML content to PDF using CloudLayer v2 API. Use when you need to generate a PDF from raw HTML with advanced options like custom paper size, margins, headers/footers, and viewport settings. The HTML is automatically Base64 encoded before sending to the API.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `html` | string | Yes | Raw HTML string to convert to PDF. Will be automatically Base64 encoded. |
| `async` | boolean | No | Override default async behavior (v2 default: true) |
| `delay` | integer | No | Additional delay in ms after page load before PDF generation |
| `scale` | number | No | Scale of webpage rendering between 0.1 and 2.0 |
| `width` | string | No | Custom paper width with units (overrides format) |
| `format` | string ("letter" | "legal" | "tabloid" | "ledger" | "a0" | "a1" | "a2" | "a3" | "a4" | "a5" | "a6") | No | Predefined paper format (lowercase) |
| `height` | string | No | Custom paper height with units (overrides format) |
| `inline` | boolean | No | If true, returns inline content instead of attachment |
| `margin` | object | No | Page margin sizes. Can be specified as number (pixels) or string with units. |
| `storage` | string | No | Storage configuration. True for default storage, false to disable, or object with storage ID. |
| `timeout` | integer | No | Maximum time in ms to wait for page load |
| `webhook` | string | No | HTTPS URL to receive job completion notification |
| `filename` | string | No | Custom filename for the generated PDF |
| `timeZone` | string | No | Time zone for rendering (IANA time zone identifier) |
| `viewPort` | object | No | Browser viewport dimensions for rendering HTML content. |
| `landscape` | boolean | No | Paper orientation; true for landscape, false for portrait |
| `projectId` | string | No | Project ID for organizing jobs |
| `waitUntil` | string ("load" | "domcontentloaded" | "networkidle0" | "networkidle2") | No | When to consider navigation complete. 'networkidle2' waits until 2 or fewer network connections for 500ms |
| `autoScroll` | boolean | No | Auto-scroll page to trigger lazy-loading content |
| `pageRanges` | string | No | Paper ranges to print, e.g., '1-5' or '1,3,5' |
| `footerTemplate` | object | No | HTML template for header or footer with class tokens. |
| `headerTemplate` | object | No | HTML template for header or footer with class tokens. |
| `generatePreview` | string | No | Generate thumbnail preview of first page. Can be boolean or config object. |
| `printBackground` | boolean | No | Include background graphics/colors in the PDF |
| `waitForSelector` | object | No | Configuration to wait for a specific CSS selector before rendering. |
| `preferCSSPageSize` | boolean | No | Use CSS @page size over width/height settings |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert URL to PDF (Simple)

**Slug:** `CLOUDLAYER_CONVERT_URL_TO_PDF_GET`

Tool to convert a URL to PDF using GET request. Use when you need quick PDF conversion with minimal parameters and immediate result.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | The URL to convert to PDF. Must be a publicly accessible web page. |
| `timeout` | integer | No | Timeout in milliseconds for the conversion request. Default is 30000ms (30 seconds). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Storage Configuration

**Slug:** `CLOUDLAYER_DELETE_STORAGE`

Tool to delete a specific user storage configuration. Use when you need to remove an external bucket configuration by its ID after confirming the ID is correct.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the storage configuration to delete. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Account Info

**Slug:** `CLOUDLAYER_GET_ACCOUNT_INFO`

Tool to retrieve Cloudlayer account usage, credits, and document counts. Use when monitoring account limits and subscription status.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Asset

**Slug:** `CLOUDLAYER_GET_ASSET`

Tool to retrieve a specific asset by its ID. Use when you need to fetch metadata or download URL of an existing asset after its generation.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The unique identifier (UUID) of the asset to retrieve. Can be obtained from the list_assets action or from the response of an asset generation action. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Job By ID

**Slug:** `CLOUDLAYER_GET_JOB_BY_ID`

Retrieve details of a specific Cloudlayer job by its ID. Use this to check the status of an async job, get the asset download URL after completion, or view job parameters. Returns 401 if the job ID doesn't exist or doesn't belong to your account.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The unique identifier (UUID) of the job to retrieve. Obtain this from job creation responses or list_jobs. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get API Status

**Slug:** `CLOUDLAYER_GET_STATUS`

Tool to test API reachability. Use when checking if the Cloudlayer API is available.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Storage Configuration by ID

**Slug:** `CLOUDLAYER_GET_STORAGE_BY_ID`

Tool to retrieve a specific storage configuration by its ID. Use when you need to inspect or validate details of a user storage configuration.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the storage configuration to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Assets

**Slug:** `CLOUDLAYER_LIST_ASSETS`

List all assets in your CloudLayer account. Returns up to 10 most recent assets including PDFs and images generated via HTML/URL conversion jobs. Use this to find asset IDs for further operations like downloading or deleting assets.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Jobs

**Slug:** `CLOUDLAYER_LIST_JOBS`

Tool to list the ten most recent jobs. Use when you need to view your recent jobs and their statuses.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Storage Configurations

**Slug:** `CLOUDLAYER_LIST_STORAGE`

Retrieves all user storage configurations (S3-compatible buckets) for the authenticated Cloudlayer account. Use this to view configured external storage destinations where generated documents can be saved. Note: User Storage is an Enterprise plan feature. Non-Enterprise accounts will receive an empty list.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Template to PDF

**Slug:** `CLOUDLAYER_TEMPLATE_TO_PDF`

Generate a PDF document from an HTML/Nunjucks template with dynamic data. Provide either: - A `templateId` for predefined templates from CloudLayer's template library, OR - A base64-encoded `template` string containing custom HTML/Nunjucks markup. The `data` parameter populates template variables (e.g., {{name}}, {{items}}) with your JSON data. By default, jobs run asynchronously and return a job ID to poll for completion via get_job_by_id.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | JSON string containing key-value pairs to populate template variables. For example, if your template has {{name}} and {{items}}, provide '{"name": "John", "items": ["A", "B"]}'. |
| `async` | boolean | No | If true (default), returns immediately with a job ID for status polling. Set to false to wait for PDF generation to complete before returning. |
| `delay` | integer | No | Delay before conversion in milliseconds. |
| `format` | string ("letter" | "legal" | "tabloid" | "ledger" | "a0" | "a1" | "a2" | "a3" | "a4" | "a5" | "a6") | No | Paper format (letter, legal, tabloid, ledger, a0–a6). |
| `inline` | boolean | No | If true, returns the PDF inline rather than as attachment. |
| `margin` | object | No | Page margin sizes. |
| `storage` | string | No | If true (default), saves the PDF to CloudLayer storage and returns an asset URL. Set to false to return the PDF directly in the response (requires async_=false). Can also provide a StorageOption object with a custom storage ID. |
| `filename` | string | No | Filename for the generated PDF when inline=false. |
| `template` | string | No | Base64-encoded HTML or Nunjucks template content (required if `templateId` is omitted). |
| `landscape` | boolean | No | Use landscape orientation. |
| `autoScroll` | boolean | No | Auto-scroll to force lazy-loaded content. |
| `pageRanges` | string | No | Page ranges to print, e.g., '1-3,5'. |
| `templateId` | string | No | ID of a predefined template (required if `template` is omitted). |
| `footerTemplate` | string | No | HTML template for footer with tokens '{{pageNumber}}' and '{{totalPages}}'. |
| `headerTemplate` | string | No | HTML template for header with tokens '{{pageNumber}}' and '{{totalPages}}'. |
| `generatePreview` | string | No | Generate a preview image; use object for settings or true for defaults. |
| `printBackground` | boolean | No | Print background graphics. |
| `preferCSSPageSize` | boolean | No | Prefer @page CSS size over width/height/format. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert URL to Image

**Slug:** `CLOUDLAYER_URL_TO_IMAGE_POST`

Converts a webpage URL to an image (PNG, JPG, or WebP). Supports custom viewport settings, wait conditions, transparency, auto-scroll, and thumbnail preview generation. The API is asynchronous - use the returned job ID to poll for results.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | URL of the webpage to capture as an image. |
| `clip` | object | No | Rectangular region to capture instead of the full page. |
| `trim` | boolean | No | Trim whitespace from the edges of the image. |
| `delay` | integer | No | Milliseconds to wait before capture after page loads. |
| `scale` | number | No | Rendering scale factor (0.1 to 2.0). |
| `inline` | boolean | No | If true, Content-Disposition is 'inline'; if false, 'attachment'. |
| `cookies` | array | No | Cookies to set before loading the page. |
| `headers` | object | No | Custom HTTP headers to send with the request. |
| `quality` | integer | No | Image quality (1-100) for jpg/webp formats. Ignored for png. |
| `timeout` | integer | No | Maximum time in ms to wait for page load (default: 30000). |
| `filename` | string | No | Custom filename for the generated image (without extension). |
| `timeZone` | string | No | ICU timezone identifier (e.g., 'America/New_York', 'Europe/London'). |
| `viewPort` | object | No | Viewport size and device scale settings for the screenshot. |
| `imageType` | string ("png" | "jpg" | "webp") | No | Output image format: png, jpg, or webp. |
| `userAgent` | string | No | Custom User-Agent header string. |
| `waitUntil` | string ("load" | "domcontentloaded" | "networkidle0" | "networkidle2") | No | Navigation wait condition: load, domcontentloaded, networkidle0 (0 connections), or networkidle2 (2 or fewer connections). |
| `autoScroll` | boolean | No | Auto-scroll the page to the bottom before capturing. |
| `transparent` | boolean | No | Remove default white background for transparent PNG/WebP output. |
| `authentication` | object | No | Basic authentication credentials for accessing the webpage. |
| `generatePreview` | object | No | Configuration for generating a thumbnail preview of the image. |
| `waitForSelector` | object | No | Configuration to wait for a specific DOM element before capturing. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert URL to PDF

**Slug:** `CLOUDLAYER_URL_TO_PDF_POST`

Tool to convert a URL to PDF with full parameter support. Use when you need advanced control over paper size, margins, headers/footers, or webhook callbacks.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Publicly accessible web page URL to convert to PDF |
| `delay` | integer | No | Additional delay in ms after page load before PDF generation |
| `scale` | number | No | Scale of webpage rendering between 0.1 and 2.0 |
| `width` | string | No | Custom paper width with units (overrides format) |
| `format` | string ("letter" | "legal" | "tabloid" | "ledger" | "a0" | "a1" | "a2" | "a3" | "a4" | "a5" | "a6") | No | Predefined paper format (lowercase) |
| `height` | string | No | Custom paper height with units (overrides format) |
| `inline` | boolean | No | If true, returns inline content instead of attachment |
| `margin` | object | No | Page margin sizes. Can be specified as number (pixels) or string with units (e.g., '0.4in'). |
| `cookies` | array | No | List of cookies to set before rendering the page |
| `timeout` | integer | No | Maximum time in ms to wait for page load |
| `filename` | string | No | Custom filename for the generated PDF |
| `viewPort` | object | No | Browser viewport settings before PDF generation. |
| `landscape` | boolean | No | Paper orientation; true for landscape, false for portrait |
| `projectId` | string | No | Project ID for organizing jobs |
| `waitUntil` | string ("load" | "domcontentloaded" | "networkidle0" | "networkidle2") | No | When to consider navigation complete. 'networkidle2' waits until 2 or fewer network connections for 500ms |
| `autoScroll` | boolean | No | Auto-scroll page to trigger lazy-loading content |
| `pageRanges` | string | No | Paper ranges to print, e.g., '1-5' or '1,3,5' |
| `authentication` | object | No | HTTP Basic authentication credentials for accessing the URL. |
| `footerTemplate` | string | No | HTML template for footer. Supports class tokens: .date, .title, .url, .pageNumber, .totalPages |
| `headerTemplate` | string | No | HTML template for header. Supports class tokens: .date, .title, .url, .pageNumber, .totalPages |
| `printBackground` | boolean | No | Include background graphics/colors in the PDF |
| `preferCSSPageSize` | boolean | No | Use CSS @page size over width/height settings |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
