# Cloudlayer — how to use (mcp.ai)

Connect your Cloudlayer account and use 16 tools for documents straight from your AI agent. Connect with your own API key. 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.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_cloudlayer?ms=1787295660000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `cloudlayer_add_storage`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/cloudlayer`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/cloudlayer/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/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, W
  - body: { name: string, path?: string, region: string, provider: string, accessKey: string, container: string, secretAccessKey: string }
- `POST https://api.mcp.ai/api/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. Suppor
  - body: { html: string, trim?: boolean, async?: boolean, delay?: integer, scale?: number, width?: integer, height?: integer, inline?: boolean, storage?: boolean|object, timeout?: integer, webhook?: string, filename?: string, timeZone?: string, viewPort?: object, imageType?: string, landscape?: boolean, projectId?: string, waitUntil?: string, autoScroll?: boolean, transparent?: boolean, generatePreview?: object, waitForSelector?: object, preferCSSPageSize?: boolean }
- `POST https://api.mcp.ai/api/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 sett
  - body: { html: string, async?: boolean, delay?: integer, scale?: number, width?: string, format?: string, height?: string, inline?: boolean, margin?: object, storage?: boolean|object, timeout?: integer, webhook?: string, filename?: string, timeZone?: string, viewPort?: object, landscape?: boolean, projectId?: string, waitUntil?: string, autoScroll?: boolean, pageRanges?: string, footerTemplate?: object, headerTemplate?: object, generatePreview?: boolean|object, printBackground?: boolean, waitForSelector?: object, preferCSSPageSize?: boolean }
- `POST https://api.mcp.ai/api/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.
  - body: { url: string, timeout?: integer }
- `POST https://api.mcp.ai/api/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.
  - body: { id: string }
- `POST https://api.mcp.ai/api/cloudlayer/get/account/info` — Tool to retrieve Cloudlayer account usage, credits, and document counts. Use when monitoring account limits and subscription status.
- `POST https://api.mcp.ai/api/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.
  - body: { id: string }
- `POST https://api.mcp.ai/api/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 do
  - body: { id: string }
- `POST https://api.mcp.ai/api/cloudlayer/get/status` — Tool to test API reachability. Use when checking if the Cloudlayer API is available.
- `POST https://api.mcp.ai/api/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.
  - body: { id: string }
- `POST https://api.mcp.ai/api/cloudlayer/list/assets` — List 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 
  - body: { limit?: integer, start_after_id?: string }
- `POST https://api.mcp.ai/api/cloudlayer/list/jobs` — List jobs in your CloudLayer account with cursor-based pagination. Use when you need to view your recent jobs and their statuses.
  - body: { limit?: integer, start_after_id?: string }
- `POST https://api.mcp.ai/api/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 s
- `POST https://api.mcp.ai/api/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`
  - body: { data: string, async?: boolean, delay?: integer, format?: string, inline?: boolean, margin?: object, storage?: boolean|object, filename?: string, template?: string, landscape?: boolean, autoScroll?: boolean, pageRanges?: string, templateId?: string, footerTemplate?: string, headerTemplate?: string, generatePreview?: object|boolean, printBackground?: boolean, preferCSSPageSize?: boolean }
- `POST https://api.mcp.ai/api/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 t
  - body: { url: string, clip?: object, trim?: boolean, delay?: integer, scale?: number, inline?: boolean, cookies?: object[], headers?: object, quality?: integer, timeout?: integer, filename?: string, timeZone?: string, viewPort?: object, imageType?: string, userAgent?: string, waitUntil?: string, autoScroll?: boolean, transparent?: boolean, authentication?: object, generatePreview?: object, waitForSelector?: object }
- `POST https://api.mcp.ai/api/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.
  - body: { url: string, delay?: integer, scale?: number, width?: string, format?: string, height?: string, inline?: boolean, margin?: object, cookies?: object[], timeout?: integer, filename?: string, viewPort?: object, landscape?: boolean, projectId?: string, waitUntil?: string, autoScroll?: boolean, pageRanges?: string, authentication?: object, footerTemplate?: string, headerTemplate?: string, printBackground?: boolean, preferCSSPageSize?: boolean }

## Example prompts
- "What can I do in Cloudlayer?"
- "Show me a summary of my Cloudlayer account"

## More
- Page: https://mcp.ai/cloudlayer
- Agent spec (llms.txt): https://mcp.ai/cloudlayer/llms.txt
- Postman collection: https://mcp.ai/cloudlayer/postman.json
