The cloudlayer.io connector lets your AI agent act in each user's cloudlayer.io account. Each user connects their own cloudlayer.io API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 14 tools.
- Tools
- 14
- What they doRead · write · destructive
- 7 · 6 · 17 read6 write1 destructive
- Users sign in with
- API key
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the cloudlayer.io connection
In AgentKit > Connections, create a cloudlayer.io connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'cloudlayer'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize cloudlayer.io:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'cloudlayer_account_get',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "cloudlayer"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize cloudlayer.io:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="cloudlayer_account_get",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their cloudlayer.io credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolcloudlayer_account_getGet your cloudlayer.io account usage and limits.Read-onlyGet Account
Get your cloudlayer.io account usage and limits. Returns the subscription, calls used and limit, remaining credit, bytes, compute time, storage and job counts. Use it to check quota before large batches.
Inputs
This tool takes no inputs.
cloudlayer_asset_getGet one stored generated file.Read-onlyGet Asset
Get one stored generated file. Returns its job id, extension, MIME type, size and pre-authenticated download URL. Use assets_list to find asset IDs.
Inputs
asset_idstringrequired- ID of the asset, from assets_list. Example: aBcDeFgHiJk123.
cloudlayer_assets_listList your stored generated files, newest first, with cursor paging.Read-onlyList Assets
List your stored generated files, newest first, with cursor paging. Returns each asset's id, job id, extension, MIME type, size, download URL and timestamp. Match jobId to find the file a job produced.
Inputs
limitinteger- Number of assets to return, 1 to 100. Defaults to 10. Example: 20.
start_after_idstring- Asset ID to continue after, for the next page. Example: aBcDeFgHiJk123.
cloudlayer_job_getGet one generation job.Read-onlyGet Job
Get one generation job. Returns its type, status (pending, success or error), parameters, size, processing time and credit cost. Poll it after a generation tool until status is success.
Inputs
job_idstringrequired- ID of the job, from a generation tool's response or jobs_list. Example: 1705312200000.
cloudlayer_jobs_listList your most recent generation jobs, newest first, with cursor paging.Read-onlyList Jobs
List your most recent generation jobs, newest first, with cursor paging. Returns each job's id, type, status, parameters, size, processing time, credit cost and timestamp. Use job_get to check one job.
Inputs
limitinteger- Number of jobs to return, 1 to 100. Defaults to 10. Example: 20.
start_after_idstring- Job ID to continue after, for the next page. Example: 1705312200000.
cloudlayer_storage_getGet one S3-compatible storage configuration.Read-onlyGet Storage Configuration
Get one S3-compatible storage configuration. Returns its title, bucket, region and endpoint (not the secret key). Use storage_list to find configuration IDs.
Inputs
storage_idstringrequired- ID of the storage configuration, from storage_list. Example: st_3k9d2m.
cloudlayer_storage_listList your S3-compatible storage configurations used to save generated files in your own bucket.Read-onlyList Storage Configurations
List your S3-compatible storage configurations used to save generated files in your own bucket. Returns each configuration's id, title, bucket, region and endpoint. Storage is configured in the cloudlayer.io dashboard.
Inputs
This tool takes no inputs.
cloudlayer_html_to_imageRender Base64-encoded HTML to a PNG, JPEG, WebP or SVG image.WriteConvert HTML to Image
Render Base64-encoded HTML to a PNG, JPEG, WebP or SVG image. Returns the job id and status at once (processing is asynchronous); the file is stored as an asset. Poll job_get until status is success, then assets_list (match jobId) or asset_get gives the download URL. Uses API credits.
Inputs
htmlstringrequired- The HTML to render, Base64-encoded. It can include inline CSS, style tags and links to external stylesheets. Example: PGgxPkhlbGxvIFdvcmxkPC9oMT4=.
auto_scrollboolean- Scroll to the bottom of the page before rendering, to trigger lazy-loaded images. Defaults to false. Example: true.
delayinteger- Milliseconds to wait after the page loads before rendering, for animations or late content. Defaults to 0. Example: 500.
filenamestring- File name for the generated file, with extension. Example: invoice-2026-001.pdf.
heightstring- Page or image height in CSS units, overriding the format height. Example: 11in.
image_typestring- Output image format. Defaults to png. Example: png.one of
pngjpgjpegwebpsvg landscapeboolean- Render in landscape orientation. Defaults to false. Example: true.
project_idstring- cloudlayer.io project ID to file this job under in the dashboard. Example: proj_8f2k1m.
qualityinteger- Image quality from 1 to 100, for jpg, jpeg and webp only. Example: 85.
scalenumber- Rendering scale from 0.1 to 2. Defaults to 1. Example: 1.
time_zonestring- IANA time zone for the browser while rendering. Example: America/New_York.
timeoutinteger- Maximum milliseconds to wait for the page to load. Defaults to 30000; the maximum depends on your plan. Example: 30000.
transparentboolean- Render with a transparent background (png and webp only; the page must not set a background color). Defaults to false. Example: false.
trimboolean- Trim whitespace from all edges of the image. Defaults to false. Example: false.
view_portobject- Browser viewport: width and height in pixels, plus optional deviceScaleFactor, isMobile, hasTouch and isLandscape. Example: {"width": 1440, "height": 900, "deviceScaleFactor": 2}
wait_for_selectorobject- Wait until a CSS selector appears before rendering: selector, plus optional options with visible, hidden and timeout. Example: {"selector": "#charts-loaded", "options": {"visible": true, "timeout": 10000}}
wait_untilstring- When the page counts as loaded. Example: networkidle2.one of
loaddomcontentloadednetworkidle0networkidle2 webhookstring- HTTPS URL that cloudlayer.io calls with the job result when it finishes. Example: https://hooks.example.com/cloudlayer.
widthstring- Page or image width in CSS units, overriding the format width. Example: 8.5in.
cloudlayer_html_to_pdfRender Base64-encoded HTML to a PDF.WriteConvert HTML to PDF
Render Base64-encoded HTML to a PDF. Returns the job id and status at once (processing is asynchronous); the file is stored as an asset. Poll job_get until status is success, then assets_list (match jobId) or asset_get gives the download URL. Uses API credits.
Inputs
htmlstringrequired- The HTML to render, Base64-encoded. It can include inline CSS, style tags and links to external stylesheets. Example: PGgxPkhlbGxvIFdvcmxkPC9oMT4=.
auto_scrollboolean- Scroll to the bottom of the page before rendering, to trigger lazy-loaded images. Defaults to false. Example: true.
delayinteger- Milliseconds to wait after the page loads before rendering, for animations or late content. Defaults to 0. Example: 500.
filenamestring- File name for the generated file, with extension. Example: invoice-2026-001.pdf.
footer_templateobject- Page footer: selector of an element in your HTML to use as the footer, plus optional method, style and imageStyle. Elements with class pageNumber or totalPages are filled in. Example: {"selector": "#page-footer", "method": "template"}
formatstring- Paper size. Defaults to letter. Example: a4.one of
letterlegaltabloidledgera0a1a2a3a4a5a6 generate_previewobject- Also generate a thumbnail of the first page: width, height, type (png, jpg or webp), quality and maintainAspectRatio. Example: {"width": 300, "height": 400, "type": "png"}
header_templateobject- Page header: selector of an element in your HTML to use as the header, plus optional method (template or extract), style and imageStyle. Leave room with margin.top. Example: {"selector": "#page-header", "method": "extract", "style": "font-size: 10px;"}
heightstring- Page or image height in CSS units, overriding the format height. Example: 11in.
landscapeboolean- Render in landscape orientation. Defaults to false. Example: true.
marginobject- Page margins in CSS units: top, bottom, left and right. Example: {"top": "1in", "bottom": "1in", "left": "0.75in", "right": "0.75in"}
page_rangesstring- Pages to include, such as 1-5 or 1-3, 5. Empty means all pages. Example: 1-3.
prefer_css_page_sizeboolean- Use the page size from the CSS @page rule instead of format. Defaults to false. Example: false.
print_backgroundboolean- Print background colors and images. Defaults to false. Example: true.
project_idstring- cloudlayer.io project ID to file this job under in the dashboard. Example: proj_8f2k1m.
scalenumber- Rendering scale from 0.1 to 2. Defaults to 1. Example: 1.
time_zonestring- IANA time zone for the browser while rendering. Example: America/New_York.
timeoutinteger- Maximum milliseconds to wait for the page to load. Defaults to 30000; the maximum depends on your plan. Example: 30000.
view_portobject- Browser viewport: width and height in pixels, plus optional deviceScaleFactor, isMobile, hasTouch and isLandscape. Example: {"width": 1440, "height": 900, "deviceScaleFactor": 2}
wait_for_selectorobject- Wait until a CSS selector appears before rendering: selector, plus optional options with visible, hidden and timeout. Example: {"selector": "#charts-loaded", "options": {"visible": true, "timeout": 10000}}
wait_untilstring- When the page counts as loaded. Example: networkidle2.one of
loaddomcontentloadednetworkidle0networkidle2 webhookstring- HTTPS URL that cloudlayer.io calls with the job result when it finishes. Example: https://hooks.example.com/cloudlayer.
widthstring- Page or image width in CSS units, overriding the format width. Example: 8.5in.
cloudlayer_template_to_imageGenerate an image from a gallery template or your own Nunjucks template, filled with data.WriteGenerate Image from Template
Generate an image from a gallery template or your own Nunjucks template, filled with data. Returns the job id and status at once (processing is asynchronous); the file is stored as an asset. Poll job_get until status is success, then assets_list (match jobId) or asset_get gives the download URL. Uses API credits.
Inputs
auto_scrollboolean- Scroll to the bottom of the page before rendering, to trigger lazy-loaded images. Defaults to false. Example: true.
dataobject- Values for the template's placeholders, keyed by name (for example name fills {{ name }}). Example: {"name": "Jane Doe", "total": "$1,200.00"}
delayinteger- Milliseconds to wait after the page loads before rendering, for animations or late content. Defaults to 0. Example: 500.
filenamestring- File name for the generated file, with extension. Example: invoice-2026-001.pdf.
heightstring- Page or image height in CSS units, overriding the format height. Example: 11in.
image_typestring- Output image format. Defaults to png. Example: png.one of
pngjpgjpegwebpsvg landscapeboolean- Render in landscape orientation. Defaults to false. Example: true.
project_idstring- cloudlayer.io project ID to file this job under in the dashboard. Example: proj_8f2k1m.
qualityinteger- Image quality from 1 to 100, for jpg, jpeg and webp only. Example: 85.
scalenumber- Rendering scale from 0.1 to 2. Defaults to 1. Example: 1.
templatestring- Your own Nunjucks HTML template, Base64-encoded. Pass this or templateId. Example: PGgxPnt7IG5hbWUgfX08L2gxPg==.
template_idstring- ID of a template from the cloudlayer.io template gallery. Pass this or template. Example: professional-invoice.
time_zonestring- IANA time zone for the browser while rendering. Example: America/New_York.
timeoutinteger- Maximum milliseconds to wait for the page to load. Defaults to 30000; the maximum depends on your plan. Example: 30000.
transparentboolean- Render with a transparent background (png and webp only; the page must not set a background color). Defaults to false. Example: false.
trimboolean- Trim whitespace from all edges of the image. Defaults to false. Example: false.
view_portobject- Browser viewport: width and height in pixels, plus optional deviceScaleFactor, isMobile, hasTouch and isLandscape. Example: {"width": 1440, "height": 900, "deviceScaleFactor": 2}
wait_for_selectorobject- Wait until a CSS selector appears before rendering: selector, plus optional options with visible, hidden and timeout. Example: {"selector": "#charts-loaded", "options": {"visible": true, "timeout": 10000}}
wait_untilstring- When the page counts as loaded. Example: networkidle2.one of
loaddomcontentloadednetworkidle0networkidle2 webhookstring- HTTPS URL that cloudlayer.io calls with the job result when it finishes. Example: https://hooks.example.com/cloudlayer.
widthstring- Page or image width in CSS units, overriding the format width. Example: 8.5in.
cloudlayer_template_to_pdfGenerate a PDF from a gallery template or your own Nunjucks template, filled with data.WriteGenerate PDF from Template
Generate a PDF from a gallery template or your own Nunjucks template, filled with data. Returns the job id and status at once (processing is asynchronous); the file is stored as an asset. Poll job_get until status is success, then assets_list (match jobId) or asset_get gives the download URL. Uses API credits.
Inputs
auto_scrollboolean- Scroll to the bottom of the page before rendering, to trigger lazy-loaded images. Defaults to false. Example: true.
dataobject- Values for the template's placeholders, keyed by name (for example name fills {{ name }}). Example: {"name": "Jane Doe", "total": "$1,200.00"}
delayinteger- Milliseconds to wait after the page loads before rendering, for animations or late content. Defaults to 0. Example: 500.
filenamestring- File name for the generated file, with extension. Example: invoice-2026-001.pdf.
footer_templateobject- Page footer: selector of an element in your HTML to use as the footer, plus optional method, style and imageStyle. Elements with class pageNumber or totalPages are filled in. Example: {"selector": "#page-footer", "method": "template"}
formatstring- Paper size. Defaults to letter. Example: a4.one of
letterlegaltabloidledgera0a1a2a3a4a5a6 generate_previewobject- Also generate a thumbnail of the first page: width, height, type (png, jpg or webp), quality and maintainAspectRatio. Example: {"width": 300, "height": 400, "type": "png"}
header_templateobject- Page header: selector of an element in your HTML to use as the header, plus optional method (template or extract), style and imageStyle. Leave room with margin.top. Example: {"selector": "#page-header", "method": "extract", "style": "font-size: 10px;"}
heightstring- Page or image height in CSS units, overriding the format height. Example: 11in.
landscapeboolean- Render in landscape orientation. Defaults to false. Example: true.
marginobject- Page margins in CSS units: top, bottom, left and right. Example: {"top": "1in", "bottom": "1in", "left": "0.75in", "right": "0.75in"}
page_rangesstring- Pages to include, such as 1-5 or 1-3, 5. Empty means all pages. Example: 1-3.
prefer_css_page_sizeboolean- Use the page size from the CSS @page rule instead of format. Defaults to false. Example: false.
print_backgroundboolean- Print background colors and images. Defaults to false. Example: true.
project_idstring- cloudlayer.io project ID to file this job under in the dashboard. Example: proj_8f2k1m.
scalenumber- Rendering scale from 0.1 to 2. Defaults to 1. Example: 1.
templatestring- Your own Nunjucks HTML template, Base64-encoded. Pass this or templateId. Example: PGgxPnt7IG5hbWUgfX08L2gxPg==.
template_idstring- ID of a template from the cloudlayer.io template gallery. Pass this or template. Example: professional-invoice.
time_zonestring- IANA time zone for the browser while rendering. Example: America/New_York.
timeoutinteger- Maximum milliseconds to wait for the page to load. Defaults to 30000; the maximum depends on your plan. Example: 30000.
view_portobject- Browser viewport: width and height in pixels, plus optional deviceScaleFactor, isMobile, hasTouch and isLandscape. Example: {"width": 1440, "height": 900, "deviceScaleFactor": 2}
wait_for_selectorobject- Wait until a CSS selector appears before rendering: selector, plus optional options with visible, hidden and timeout. Example: {"selector": "#charts-loaded", "options": {"visible": true, "timeout": 10000}}
wait_untilstring- When the page counts as loaded. Example: networkidle2.one of
loaddomcontentloadednetworkidle0networkidle2 webhookstring- HTTPS URL that cloudlayer.io calls with the job result when it finishes. Example: https://hooks.example.com/cloudlayer.
widthstring- Page or image width in CSS units, overriding the format width. Example: 8.5in.
cloudlayer_url_to_imageTake a screenshot of a web page at a URL as a PNG, JPEG, WebP or SVG image.WriteCapture URL as Image
Take a screenshot of a web page at a URL as a PNG, JPEG, WebP or SVG image. Returns the job id and status at once (processing is asynchronous); the file is stored as an asset. Poll job_get until status is success, then assets_list (match jobId) or asset_get gives the download URL. Uses API credits.
Inputs
urlstringrequired- The URL of the web page to capture. Example: https://example.com/report.
authenticationobject- HTTP Basic Authentication credentials for the page: username and password. Example: {"username": "viewer", "password": "s3cret"}
auto_scrollboolean- Scroll to the bottom of the page before rendering, to trigger lazy-loaded images. Defaults to false. Example: true.
cookiesarray- Cookies to set before loading the page. Each has name and value, plus optional domain, path, expires, httpOnly, secure and sameSite. Example: [{"name": "session", "value": "abc123", "domain": "example.com"}]
delayinteger- Milliseconds to wait after the page loads before rendering, for animations or late content. Defaults to 0. Example: 500.
filenamestring- File name for the generated file, with extension. Example: invoice-2026-001.pdf.
heightstring- Page or image height in CSS units, overriding the format height. Example: 11in.
image_typestring- Output image format. Defaults to png. Example: png.one of
pngjpgjpegwebpsvg landscapeboolean- Render in landscape orientation. Defaults to false. Example: true.
project_idstring- cloudlayer.io project ID to file this job under in the dashboard. Example: proj_8f2k1m.
qualityinteger- Image quality from 1 to 100, for jpg, jpeg and webp only. Example: 85.
scalenumber- Rendering scale from 0.1 to 2. Defaults to 1. Example: 1.
time_zonestring- IANA time zone for the browser while rendering. Example: America/New_York.
timeoutinteger- Maximum milliseconds to wait for the page to load. Defaults to 30000; the maximum depends on your plan. Example: 30000.
transparentboolean- Render with a transparent background (png and webp only; the page must not set a background color). Defaults to false. Example: false.
trimboolean- Trim whitespace from all edges of the image. Defaults to false. Example: false.
view_portobject- Browser viewport: width and height in pixels, plus optional deviceScaleFactor, isMobile, hasTouch and isLandscape. Example: {"width": 1440, "height": 900, "deviceScaleFactor": 2}
wait_for_selectorobject- Wait until a CSS selector appears before rendering: selector, plus optional options with visible, hidden and timeout. Example: {"selector": "#charts-loaded", "options": {"visible": true, "timeout": 10000}}
wait_untilstring- When the page counts as loaded. Example: networkidle2.one of
loaddomcontentloadednetworkidle0networkidle2 webhookstring- HTTPS URL that cloudlayer.io calls with the job result when it finishes. Example: https://hooks.example.com/cloudlayer.
widthstring- Page or image width in CSS units, overriding the format width. Example: 8.5in.
cloudlayer_url_to_pdfCapture a web page at a URL as a PDF, with optional cookies and Basic auth.WriteConvert URL to PDF
Capture a web page at a URL as a PDF, with optional cookies and Basic auth. Returns the job id and status at once (processing is asynchronous); the file is stored as an asset. Poll job_get until status is success, then assets_list (match jobId) or asset_get gives the download URL. Uses API credits.
Inputs
urlstringrequired- The URL of the web page to capture. Example: https://example.com/report.
authenticationobject- HTTP Basic Authentication credentials for the page: username and password. Example: {"username": "viewer", "password": "s3cret"}
auto_scrollboolean- Scroll to the bottom of the page before rendering, to trigger lazy-loaded images. Defaults to false. Example: true.
cookiesarray- Cookies to set before loading the page. Each has name and value, plus optional domain, path, expires, httpOnly, secure and sameSite. Example: [{"name": "session", "value": "abc123", "domain": "example.com"}]
delayinteger- Milliseconds to wait after the page loads before rendering, for animations or late content. Defaults to 0. Example: 500.
filenamestring- File name for the generated file, with extension. Example: invoice-2026-001.pdf.
footer_templateobject- Page footer: selector of an element in your HTML to use as the footer, plus optional method, style and imageStyle. Elements with class pageNumber or totalPages are filled in. Example: {"selector": "#page-footer", "method": "template"}
formatstring- Paper size. Defaults to letter. Example: a4.one of
letterlegaltabloidledgera0a1a2a3a4a5a6 generate_previewobject- Also generate a thumbnail of the first page: width, height, type (png, jpg or webp), quality and maintainAspectRatio. Example: {"width": 300, "height": 400, "type": "png"}
header_templateobject- Page header: selector of an element in your HTML to use as the header, plus optional method (template or extract), style and imageStyle. Leave room with margin.top. Example: {"selector": "#page-header", "method": "extract", "style": "font-size: 10px;"}
heightstring- Page or image height in CSS units, overriding the format height. Example: 11in.
landscapeboolean- Render in landscape orientation. Defaults to false. Example: true.
marginobject- Page margins in CSS units: top, bottom, left and right. Example: {"top": "1in", "bottom": "1in", "left": "0.75in", "right": "0.75in"}
page_rangesstring- Pages to include, such as 1-5 or 1-3, 5. Empty means all pages. Example: 1-3.
prefer_css_page_sizeboolean- Use the page size from the CSS @page rule instead of format. Defaults to false. Example: false.
print_backgroundboolean- Print background colors and images. Defaults to false. Example: true.
project_idstring- cloudlayer.io project ID to file this job under in the dashboard. Example: proj_8f2k1m.
scalenumber- Rendering scale from 0.1 to 2. Defaults to 1. Example: 1.
time_zonestring- IANA time zone for the browser while rendering. Example: America/New_York.
timeoutinteger- Maximum milliseconds to wait for the page to load. Defaults to 30000; the maximum depends on your plan. Example: 30000.
view_portobject- Browser viewport: width and height in pixels, plus optional deviceScaleFactor, isMobile, hasTouch and isLandscape. Example: {"width": 1440, "height": 900, "deviceScaleFactor": 2}
wait_for_selectorobject- Wait until a CSS selector appears before rendering: selector, plus optional options with visible, hidden and timeout. Example: {"selector": "#charts-loaded", "options": {"visible": true, "timeout": 10000}}
wait_untilstring- When the page counts as loaded. Example: networkidle2.one of
loaddomcontentloadednetworkidle0networkidle2 webhookstring- HTTPS URL that cloudlayer.io calls with the job result when it finishes. Example: https://hooks.example.com/cloudlayer.
widthstring- Page or image width in CSS units, overriding the format width. Example: 8.5in.
cloudlayer_storage_deleteDelete an S3-compatible storage configuration.DestructiveDelete Storage Configuration
Delete an S3-compatible storage configuration. Returns the result. Files already in your bucket are not deleted.
- Idempotent
Inputs
storage_idstringrequired- ID of the storage configuration, from storage_list. Example: st_3k9d2m.
No tools match.