Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to cloudlayer.io

Scalekit connector
Open markdown

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

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. 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>
  3. Create the cloudlayer.io connection

    In AgentKit > Connections, create a cloudlayer.io connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. 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.actions
    const connector = 'cloudlayer'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { 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 call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'cloudlayer_account_get',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each 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 to execute_tool
Try in PlaygroundRequest a tool
  • cloudlayer_account_getGet your cloudlayer.io account usage and limits.Read-only

    Get 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-only

    Get 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-only

    List 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-only

    Get 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-only

    List 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-only

    Get 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-only

    List 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.Write

    Convert 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.