Cloudlayer connects to a Nagent workspace with an API key. Once it is connected, agents can call 16 Cloudlayer actions, such as "Add Storage", "Get Account Info" and "Get Asset". Nothing is enabled on connect: each action is allowed one at a time, and an action with side effects runs or waits for a person according to the agent's level.
Every operation an agent can call against Cloudlayer, with input parameters and output schema.
CLOUDLAYER_ADD_STORAGEAdd 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
A unique, human-readable title to identify this storage configuration in your account. Must be unique across all storage credentials.
Custom endpoint URL for S3-compatible storage providers like DigitalOcean Spaces or MinIO. Not required for AWS S3.
Storage region code (e.g., 'us-east-1' for AWS, 'nyc3' for DigitalOcean). Required for all providers.
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).
The access key ID from your storage provider (e.g., AWS Access Key ID).
Name of the bucket (AWS S3, GCP) or container (Azure) where assets will be stored.
The secret access key from your storage provider. This is encrypted before storage.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CLOUDLAYER_CONVERT_HTML_TO_IMAGEConvert 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
The HTML content to convert. Will be automatically base64-encoded before sending to the API.
Automatically trim whitespace around the rendered content.
Override default async behavior. Set to true for async processing, false for synchronous.
Milliseconds to wait before conversion after page load.
Webpage rendering scale factor (0.1-2.0).
Width of the output image in pixels.
Height of the output image in pixels. If omitted, auto-calculated based on content.
If true, Content-Disposition is 'inline'; if false, 'attachment'.
Storage configuration. Use boolean to enable/disable, or object for advanced configuration.
Maximum time in milliseconds to wait for rendering.
HTTPS URL to receive notification when the job completes (for async jobs).
Custom filename for the generated image (used in Content-Disposition header).
IANA timezone identifier (e.g., 'America/New_York', 'Europe/London').
Viewport dimensions for rendering the HTML content.
Output image format. Options: 'png', 'jpg', or 'webp'. Default is 'png'.
Set page orientation to landscape.
Project ID for organizing the generated assets.
Wait condition before capturing: 'load', 'domcontentloaded', 'networkidle0', or 'networkidle2'.
Auto-scroll the page to load lazy content before capturing.
Enable transparent background for PNG images. Only applicable for PNG format.
Configuration for generating a thumbnail preview.
Configuration for waiting for a specific selector before conversion.
Use CSS-defined page size instead of viewport dimensions.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CLOUDLAYER_CONVERT_HTML_TO_PDF_V2Tool 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
Raw HTML string to convert to PDF. Will be automatically Base64 encoded.
Override default async behavior (v2 default: true)
Additional delay in ms after page load before PDF generation
Scale of webpage rendering between 0.1 and 2.0
Custom paper width with units (overrides format)
Predefined paper format (lowercase)
Custom paper height with units (overrides format)
If true, returns inline content instead of attachment
Page margin sizes. Can be specified as number (pixels) or string with units.
Storage configuration. True for default storage, false to disable, or object with storage ID.
Maximum time in ms to wait for page load
HTTPS URL to receive job completion notification
Custom filename for the generated PDF
Time zone for rendering (IANA time zone identifier)
Browser viewport dimensions for rendering HTML content.
Paper orientation; true for landscape, false for portrait
Project ID for organizing jobs
When to consider navigation complete. 'networkidle2' waits until 2 or fewer network connections for 500ms
Auto-scroll page to trigger lazy-loading content
Paper ranges to print, e.g., '1-5' or '1,3,5'
HTML template for header or footer with class tokens.
HTML template for header or footer with class tokens.
Generate thumbnail preview of first page. Can be boolean or config object.
Include background graphics/colors in the PDF
Configuration to wait for a specific CSS selector before rendering.
Use CSS @page size over width/height settings
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CLOUDLAYER_CONVERT_URL_TO_PDF_GETTool to convert a URL to PDF using GET request. Use when you need quick PDF conversion with minimal parameters and immediate result.
Input parameters
The URL to convert to PDF. Must be a publicly accessible web page.
Timeout in milliseconds for the conversion request. Default is 30000ms (30 seconds).
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CLOUDLAYER_DELETE_STORAGETool 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
Unique identifier of the storage configuration to delete.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CLOUDLAYER_GET_ACCOUNT_INFOTool to retrieve Cloudlayer account usage, credits, and document counts. Use when monitoring account limits and subscription status.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CLOUDLAYER_GET_ASSETTool 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
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
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CLOUDLAYER_GET_JOB_BY_IDRetrieve 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
The unique identifier (UUID) of the job to retrieve. Obtain this from job creation responses or list_jobs.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CLOUDLAYER_GET_STATUSTool to test API reachability. Use when checking if the Cloudlayer API is available.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CLOUDLAYER_GET_STORAGE_BY_IDTool 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
Unique identifier of the storage configuration to retrieve
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CLOUDLAYER_LIST_ASSETSList assets in your CloudLayer account with cursor-based pagination. Returns PDFs and images generated via HTML/URL conversion jobs. Use this to find asset IDs for further operations like downloading or deleting assets.
Input parameters
Maximum number of assets to return per page (1-100, default 10).
Asset ID to use as a cursor for pagination. Returns assets created after this asset.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CLOUDLAYER_LIST_JOBSList jobs in your CloudLayer account with cursor-based pagination. Use when you need to view your recent jobs and their statuses.
Input parameters
Maximum number of jobs to return per page (1-100, default 10).
Job ID to use as a cursor for pagination. Returns jobs created after this job.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CLOUDLAYER_LIST_STORAGERetrieves 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
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CLOUDLAYER_TEMPLATE_TO_PDFGenerate 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
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"\]}'.
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 before conversion in milliseconds.
Paper format (letter, legal, tabloid, ledger, a0–a6).
If true, returns the PDF inline rather than as attachment.
Page margin sizes.
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 for the generated PDF when inline=false.
Base64-encoded HTML or Nunjucks template content (required if `templateId` is omitted).
Use landscape orientation.
Auto-scroll to force lazy-loaded content.
Page ranges to print, e.g., '1-3,5'.
ID of a predefined template (required if `template` is omitted).
HTML template for footer with tokens '{{pageNumber}}' and '{{totalPages}}'.
HTML template for header with tokens '{{pageNumber}}' and '{{totalPages}}'.
Generate a preview image; use object for settings or true for defaults.
Print background graphics.
Prefer @page CSS size over width/height/format.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CLOUDLAYER_URL_TO_IMAGE_POSTConverts 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
URL of the webpage to capture as an image.
Rectangular region to capture instead of the full page.
Trim whitespace from the edges of the image.
Milliseconds to wait before capture after page loads.
Rendering scale factor (0.1 to 2.0).
If true, Content-Disposition is 'inline'; if false, 'attachment'.
Cookies to set before loading the page.
Custom HTTP headers to send with the request.
Image quality (1-100) for jpg/webp formats. Ignored for png.
Maximum time in ms to wait for page load (default: 30000).
Custom filename for the generated image (without extension).
ICU timezone identifier (e.g., 'America/New_York', 'Europe/London').
Viewport size and device scale settings for the screenshot.
Output image format: png, jpg, or webp.
Custom User-Agent header string.
Navigation wait condition: load, domcontentloaded, networkidle0 (0 connections), or networkidle2 (2 or fewer connections).
Auto-scroll the page to the bottom before capturing.
Remove default white background for transparent PNG/WebP output.
Basic authentication credentials for accessing the webpage.
Configuration for generating a thumbnail preview of the image.
Configuration to wait for a specific DOM element before capturing.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CLOUDLAYER_URL_TO_PDF_POSTTool 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
Publicly accessible web page URL to convert to PDF
Additional delay in ms after page load before PDF generation
Scale of webpage rendering between 0.1 and 2.0
Custom paper width with units (overrides format)
Predefined paper format (lowercase)
Custom paper height with units (overrides format)
If true, returns inline content instead of attachment
Page margin sizes. Can be specified as number (pixels) or string with units (e.g., '0.4in').
List of cookies to set before rendering the page
Maximum time in ms to wait for page load
Custom filename for the generated PDF
Browser viewport settings before PDF generation.
Paper orientation; true for landscape, false for portrait
Project ID for organizing jobs
When to consider navigation complete. 'networkidle2' waits until 2 or fewer network connections for 500ms
Auto-scroll page to trigger lazy-loading content
Paper ranges to print, e.g., '1-5' or '1,3,5'
HTTP Basic authentication credentials for accessing the URL.
HTML template for footer. Supports class tokens: .date, .title, .url, .pageNumber, .totalPages
HTML template for header. Supports class tokens: .date, .title, .url, .pageNumber, .totalPages
Include background graphics/colors in the PDF
Use CSS @page size over width/height settings
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
Agents can call 16 Cloudlayer actions on Nagent, including "Add Storage", "Get Account Info" and "Get Asset". Add Storage: Add a user-owned S3-compatible storage configuration for storing generated assets. Each action is listed on this page with its input parameters and its output.
Cloudlayer connects with an API key, under your workspace's own connection. Nothing is enabled on connect: each action is allowed one at a time and can be scoped to the agents that need it.
Add Storage takes 6 required inputs: name, region, provider, accessKey, container and secretAccessKey. It also takes 1 optional input: path. It returns data, error and successful.