Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Topaz Labs

Scalekit connector
Open markdown

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

Tools
21
What they doRead · write · destructive
14 · 4 · 314 read4 write3 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 Topaz Labs connection

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

    Each user opens the link once and enters their Topaz Labs 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
  • topazlabs_estimate_generative_image_jobEstimate the credits and processing time of a Topaz Labs image job on a generative model, without running it.Read-only

    Estimate Generative Image Job

    Estimate the credits and processing time of a Topaz Labs image job on a generative model, without running it. Returns credits and duration (seconds). Use this to price generative upscaling or restoration (for example Redefine, Wonder or Recovery V2) before submitting it. Use topazlabs_estimate_image_job for standard models such as Standard V2.

    Inputs

    input_heightintegerrequired
    Height of the input image in pixels, 1 to 32000. Example: 1080
    input_widthintegerrequired
    Width of the input image in pixels, 1 to 32000. Example: 1920
    categorystring
    Model category: Enhance (upscaling), Sharpen, Denoise, Restore, Lighting, Matting or Tool. Defaults to Enhance. Example: Enhanceone of EnhanceSharpenDenoiseRestoreLightingMattingTooldefault Enhance
    crop_to_fillboolean
    Set to true to crop the image to fill a different aspect ratio instead of letterboxing it. Defaults to false. Example: false
    modelstring
    Generative model name. Defaults to Redefine. Known values include Redefine, Wonder, Standard MAX, Recovery V2, Super Focus V2 and Dust-Scratch V2; newer generative models listed on developer.topazlabs.com may also be accepted. Example: Redefinedefault Redefine
    model_settingsobject
    Optional model-specific settings as string key-value pairs, sent alongside the other fields. Only settings the chosen model understands are used; see the model's page on developer.topazlabs.com. Example: {"faceEnhancement": "true"}
    output_formatstring
    Output image format: jpeg (default), jpg, png, tiff or tif. Example: pngone of jpegjpgpngtifftif
    output_heightinteger
    Target output height in pixels (Enhance models only). Set one of output_width or output_height and the other scales proportionally. Example: 2160
    output_widthinteger
    Target output width in pixels (Enhance models only). Set one of output_width or output_height and the other scales proportionally. Example: 3840
  • topazlabs_estimate_image_jobEstimate the credits and processing time of a Topaz Labs image job on a standard (non-generative) model, without running it.Read-only

    Estimate Image Job

    Estimate the credits and processing time of a Topaz Labs image job on a standard (non-generative) model, without running it. Returns credits and duration (seconds). Use this to price an image enhancement before submitting it. Use topazlabs_estimate_generative_image_job for generative models such as Redefine or Wonder.

    Inputs

    input_heightintegerrequired
    Height of the input image in pixels, 1 to 32000. Example: 1080
    input_widthintegerrequired
    Width of the input image in pixels, 1 to 32000. Example: 1920
    categorystring
    Model category: Enhance (upscaling), Sharpen, Denoise, Restore, Lighting, Matting or Tool. Defaults to Enhance. Example: Enhanceone of EnhanceSharpenDenoiseRestoreLightingMattingTooldefault Enhance
    crop_to_fillboolean
    Set to true to crop the image to fill a different aspect ratio instead of letterboxing it. Defaults to false. Example: false
    modelstring
    Standard (non-generative) model name. Defaults to Standard V2. Known values include Standard V2, Low Resolution V2, CGI, High Fidelity V2, Text Refine (Enhance); Standard, Strong, Lens Blur V2, Motion Blur, Natural, Refocus, Wildlife, Portrait (Sharpen); Normal, Strong, Extreme (Denoise); Adjust V2, White Balance, Colorize (Lighting); Object (Matting). Example: High Fidelity V2default Standard V2
    model_settingsobject
    Optional model-specific settings as string key-value pairs, sent alongside the other fields. Only settings the chosen model understands are used; see the model's page on developer.topazlabs.com. Example: {"faceEnhancement": "true"}
    output_formatstring
    Output image format: jpeg (default), jpg, png, tiff or tif. Example: pngone of jpegjpgpngtifftif
    output_heightinteger
    Target output height in pixels (Enhance models only). Set one of output_width or output_height and the other scales proportionally. Example: 2160
    output_widthinteger
    Target output width in pixels (Enhance models only). Set one of output_width or output_height and the other scales proportionally. Example: 3840
  • topazlabs_estimate_video_cancellationPreview what canceling a Topaz Labs video request would cost, without canceling it.Read-only

    Estimate Video Cancellation

    Preview what canceling a Topaz Labs video request would cost, without canceling it. Returns cancelable, status, progress, creditsReserved, creditsToCommit, creditsToRefund and a message. Use this before topazlabs_cancel_video_request. Completed or failed requests return an error.

    Inputs

    request_idstringrequired
    ID (UUID) of the video request, returned as requestId by topazlabs_create_video_request or topazlabs_create_express_video_request, or listed by topazlabs_list_video_requests. Example: 0193b36c-b37f-7997-ab75-c85f61b451e8
  • topazlabs_get_credit_balanceGet the Topaz Labs API credit balance of the account that owns the API key.Read-only

    Get Credit Balance

    Get the Topaz Labs API credit balance of the account that owns the API key. Returns available_credits, reserved_credits and total_credits. Use this to check there are enough credits before starting a job. Use topazlabs_get_credit_usage for consumption over time.

    Inputs

    This tool takes no inputs.

  • topazlabs_get_credit_usageGet the Topaz Labs API credits consumed over a time window, in time buckets.Read-only

    Get Credit Usage

    Get the Topaz Labs API credits consumed over a time window, in time buckets. Returns total_credits, total_requests and usage (period_start and credits per bucket, with a groups breakdown when group_by is set). Buckets with no activity are left out. Use this to report spending by day, model or API key. Use topazlabs_get_credit_balance for the current balance.

    Inputs

    api_key_idstring
    Only count requests made with this API key ID. Example: key_01J8Z3
    end_datestring
    Inclusive end date (UTC) in YYYY-MM-DD format, on or after start_date. Example: 2026-09-30
    granularitystring
    Bucket width for a start_date/end_date range: hour, day (default), 3day, week or month. Ignored with period. Example: weekone of hourday3dayweekmonth
    group_bystring
    Add a per-bucket breakdown by models or api_key_id. Example: modelsone of modelsapi_key_id
    modelsarray
    Only count usage of these models, by name. Example: ["Standard V2", "Wonder"]
    periodstring
    Relative window ending now: 1d (returns 48 hourly buckets), 7d or 30d (daily buckets). Defaults to 30d. Ignored when start_date and end_date are both set. Example: 7done of 1d7d30ddefault 30d
    start_datestring
    Inclusive start date (UTC) in YYYY-MM-DD format. Use together with end_date to query a custom range instead of period. Example: 2026-09-01
  • topazlabs_get_image_download_urlGet a presigned download link for the enhanced output of a completed Topaz Labs image job.Read-only

    Get Image Download URL

    Get a presigned download link for the enhanced output of a completed Topaz Labs image job. Returns download_url, head_url and expiry (Unix time). The links expire after 1 hour; outputs are kept for 7 days. Use this once the job is Completed; a job that is not ready returns a conflict error. Use topazlabs_get_image_input_download_url for the original image.

    Inputs

    process_idstringrequired
    ID (UUID) of the image processing job: the process_id returned when the job was submitted to the Topaz Image API, or listed by topazlabs_list_image_jobs. Example: d7b3b3b3-7b3b-4b3b-8b3b-3b3b3b3b3b3b
  • topazlabs_get_image_input_download_urlGet a presigned download link for the original input image of a Topaz Labs image job.Read-only

    Get Image Input Download URL

    Get a presigned download link for the original input image of a Topaz Labs image job. Returns download_url, head_url and expiry (Unix time). The links expire after 1 hour; inputs are kept for 7 days. Use this to retrieve the source image. Use topazlabs_get_image_download_url for the enhanced result.

    Inputs

    process_idstringrequired
    ID (UUID) of the image processing job: the process_id returned when the job was submitted to the Topaz Image API, or listed by topazlabs_list_image_jobs. Example: d7b3b3b3-7b3b-4b3b-8b3b-3b3b3b3b3b3b
  • topazlabs_get_image_job_statusGet the status of one Topaz Labs image processing job.Read-only

    Get Image Job Status

    Get the status of one Topaz Labs image processing job. Returns status (Pending, Processing, Completed, Cancelled or Failed), progress, eta, model, credits, and input and output format and size. Use this to poll an image job. Once it is Completed, call topazlabs_get_image_download_url for the result.

    Inputs

    process_idstringrequired
    ID (UUID) of the image processing job: the process_id returned when the job was submitted to the Topaz Image API, or listed by topazlabs_list_image_jobs. Example: d7b3b3b3-7b3b-4b3b-8b3b-3b3b3b3b3b3b