Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to All-Images AI

Scalekit connector
Open markdown

The All-Images AI connector lets your AI agent act in each user's All-Images AI account. Each user connects their own All-Images AI 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 · 5 · 27 read5 write2 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 All-Images AI connection

    In AgentKit > Connections, create an All-Images AI 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 = 'allimagesai'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize All-Images AI:', 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: 'allimagesai_api_key_check',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their All-Images AI 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
  • allimagesai_api_key_checkCheck that the All-Images.ai API key is valid.Read-only

    Check API Key

    Check that the All-Images.ai API key is valid. Returns the email and name of the account the key belongs to. Use this to confirm the connection works.

    Inputs

    This tool takes no inputs.

  • allimagesai_credits_getGet the All-Images.ai account's credit balance.Read-only

    Get Credits

    Get the All-Images.ai account's credit balance. Returns the remaining credits for image purchases and generations. Use this before buying images or creating generations.

    Inputs

    This tool takes no inputs.

  • allimagesai_generation_getGet one image generation.Read-only

    Get Image Generation

    Get one image generation. Returns its id, name, prompt, params, status (0 created, 1 pending, 2 processing, 3 done, 4 error), progress and the generated images with their IDs and URLs. Use this to poll a generation until status is 3 (done), then buy an image with allimagesai_image_buy.

    Inputs

    generation_idstringrequired
    ID of the image generation, from allimagesai_generations_list or the create response. Example: 65921cb1-111d-4cca-a554-809b61f842b4.
  • allimagesai_generations_listList the account's image generations, optionally filtered by name or tag.Read-only

    List Image Generations

    List the account's image generations, optionally filtered by name or tag. Returns filteredResults and prints, each with id, name, prompt, status (0 created, 1 pending, 2 processing, 3 done, 4 error), images, tags and metadata. Use this to find a generation ID. Use allimagesai_generation_get for one generation.

    Inputs

    limitinteger
    Number of results to return. Example: 20.
    namestring
    Only generations whose name matches this text. Example: Dog in the park.
    offsetinteger
    Number of results to skip, for paging. Example: 0.
    sortstring
    Sort order, as accepted by the All-Images API (for example createdAt). Example: createdAt.
    tagstring
    Only generations with this tag. Example: blog.
  • allimagesai_images_downloaded_listList the images the account has already bought or downloaded, optionally within a date range.Read-only

    List Downloaded Images

    List the images the account has already bought or downloaded, optionally within a date range. Returns filteredResults and the images with id and URLs. Use this to find images you own. Use allimagesai_images_search to find new ones.

    Inputs

    after_created_atstring
    Only images downloaded after this ISO 8601 date-time. Example: 2026-01-01T00:00:00Z.
    before_created_atstring
    Only images downloaded before this ISO 8601 date-time. Example: 2026-02-01T00:00:00Z.
    limitinteger
    Number of results to return. Example: 20.
    offsetinteger
    Number of results to skip, for paging. Example: 0.
    sortstring
    Sort order, as accepted by the All-Images API (for example createdAt). Example: createdAt.
  • allimagesai_webhook_getGet a webhook registered on the API key.Read-only

    Get Webhook

    Get a webhook registered on the API key. Returns its id, URL and events. The ID comes from allimagesai_webhook_subscribe.

    Inputs

    webhook_idstringrequired
    Webhook ID returned by allimagesai_webhook_subscribe. Example: 6592a0b1-2c3d-4e5f-8a9b-0c1d2e3f4a5b.
  • allimagesai_generation_createStart an AI image generation that proposes 4 images from a description.Write

    Create Image Generation

    Start an AI image generation that proposes 4 images from a description. Uses credits. Runs in the background. Returns the new generation with its id and status. Poll allimagesai_generation_get until status is 3 (done), or subscribe a webhook with allimagesai_webhook_subscribe.

    Inputs

    modestringrequired
    simple: a plain description, optionally tuned with params and optimize_prompt. advanced: a raw Midjourney imagine prompt, parameters included (for example --aspect 3:2). Example: simple.one of simpleadvanced
    namestringrequired
    Name for the generation, used to find it later. Example: Dog in the park.
    promptstringrequired
    Image description (simple mode, no Midjourney parameters) or full Midjourney prompt (advanced mode), up to 4096 characters. Example: a dog playing in a park.
    additional_promptstring
    Extra text added at the start of the prompt and left untouched by prompt optimization, up to 1024 characters. Example: watercolor style.
    metadataobject
    Custom key-value data stored with the generation and sent back in webhooks. Example: {"post_id": "123"}
    optimize_promptboolean
    Simple mode: let All-Images rewrite the description into a richer prompt. Example: true.
    paramsarray
    Simple-mode options as name/value pairs. Names: templatePrompt (realisticQuality or realisticManuel), format (1:1, 3:2, 2:3, 4:7, 7:4, 5:4, 4:5, 16:9, 9:16), weather (sunny, cloudy, foggy, rainy, thunderstorm, snowy), time (sunrise, morning, afternoon, sunset, evening, golden hour, night, midnight), camera (a camera name), chaos (0 to 100), stylize (0 to 1000), interdiction (comma-separated things to keep out of the image), plus angle, photographe, sujetMode, version and fromImageUrl. Values are strings. Example: [{"name": "format", "value": "16:9"}, {"name": "weather", "value": "sunny"}]
    process_modestring
    fast or relax generation; only for Dedicated plan users. Defaults to fast. Example: fast.one of fastrelax
    tagsarray
    Tags to find the generation by later. Example: ["blog", "pets"]