Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to AltTextLab

Scalekit connector
Open markdown

The AltTextLab connector lets your AI agent act in each user's AltTextLab account. Each user connects their own AltTextLab API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 1 tool.

Tools
1
What they doRead · write · destructive
0 · 1 · 00 read1 write0 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 AltTextLab connection

    In AgentKit > Connections, create an AltTextLab 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 = 'alttextlab'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize AltTextLab:', 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: 'alttextlab_alt_text_generate',
    toolInput: { image_url: 'https://example.com/images/mug.jpg' },
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their AltTextLab 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
  • alttextlab_alt_text_generateGenerate alt text for a public image URL, in a chosen language and writing style, optionally steered by keywords, product details (e-commerce mode) or page context.Write

    Generate Alt Text

    Generate alt text for a public image URL, in a chosen language and writing style, optionally steered by keywords, product details (e-commerce mode) or page context. Returns id, result (the alt text, null on failure), status (generated or failed), lang, style, keywords, ecommerce and customFields. Each generated result uses one credit; failed results do not.

    Inputs

    image_urlstringrequired
    Public URL of the image, reachable without login or redirects. Example: https://example.com/images/mug.jpg.
    brandstring
    E-commerce mode: brand name. Example: Nike.
    colorstring
    E-commerce mode: dominant color. Example: black.
    context_descriptionstring
    Context: editorial description or explanation of the image. Example: Keynote at the 2025 product launch.
    custom_fieldsobject
    Up to 30 string key-value pairs echoed back unchanged, to match results to your assets. Example: {"sku": "TSHIRT-001"}.
    keywordsarray
    Keywords to include when they fit what the image shows (not guaranteed). Example: ["eco-friendly", "minimalist"].
    langstring
    Language code for the alt text (130+ supported); defaults to your account setting. Example: de.
    materialstring
    E-commerce mode: product material. Example: leather.
    page_titlestring
    Context: title of the page where the image appears. Example: Our team.
    person_namestring
    Context: name of the main person in the image. Example: Ada Lovelace.
    productstring
    E-commerce mode: product name or type. Any product field turns on e-commerce mode. Example: sneakers.
    section_headingstring
    Context: heading of the section containing the image. Example: Leadership.
    stylestring
    Writing style: descriptive, neutral (default), matter-of-fact or minimal; defaults to your account setting. Example: minimal.one of descriptiveneutralmatter-of-factminimal
    surrounding_textstring
    Context: caption or text near the image. Example: Our CEO opens the event.