Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to MiniMax

Scalekit connector
Open markdown

The MiniMax connector lets your AI agent act in each user's MiniMax account. Each user connects their own MiniMax access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 19 tools.

Tools
19
What they doRead · write · destructive
8 · 9 · 28 read9 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 MiniMax connection

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

    Each user opens the link once and enters their MiniMax 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
  • minimax_get_h3_video_taskGet the status and result of a MiniMax H3 video task from the last 7 days.Read-only

    Get H3 Video Task

    Get the status and result of a MiniMax H3 video task from the last 7 days. Returns task with status (queued, running, succeeded, failed or cancelled), error, resolution, duration, ratio, usage and, on success, content.url: a time-limited download URL for the video. Use this to poll a task from minimax_create_h3_video_task; query again for a fresh URL after it expires. Use minimax_list_h3_video_tasks to find task IDs, and minimax_get_video_task for Hailuo tasks.

    Inputs

    task_idstringrequired
    Task ID returned by minimax_create_h3_video_task or minimax_list_h3_video_tasks. Example: 424010985738629
  • minimax_get_speech_taskGet the status of a long text-to-speech task.Read-only

    Get Long Speech Task

    Get the status of a long text-to-speech task. Returns status (Processing, Success, Failed or Expired) and file_id. MiniMax reports most errors inside a 200 response: check base_resp.status_code (0 is success; 1004 bad API key, 1008 insufficient balance, 2013 invalid parameters). Use this to poll tasks from minimax_create_speech_task. On Success, pass file_id to minimax_retrieve_file for the download URL.

    Inputs

    task_idstringrequired
    Task ID returned by minimax_create_speech_task. Example: 95157322514444
  • minimax_get_video_taskGet the status of a Hailuo video generation task.Read-only

    Get Hailuo Video Task

    Get the status of a Hailuo video generation task. Returns status (Preparing, Queueing, Processing, Success or Fail) and, on Success, the file_id and video width and height. MiniMax reports most errors inside a 200 response: check base_resp.status_code (0 is success; 1004 bad API key, 1008 insufficient balance, 2013 invalid parameters). Use this to poll tasks from minimax_create_video_task. Use minimax_get_h3_video_task for MiniMax H3 tasks. On Success, pass file_id to minimax_retrieve_file to get the download URL.

    Inputs

    task_idstringrequired
    Task ID returned by minimax_create_video_task. Example: 106916112212032
  • minimax_list_filesList files uploaded to the MiniMax account for one purpose.Read-only

    List Files

    List files uploaded to the MiniMax account for one purpose. Returns files with file_id, filename, bytes, created_at and purpose. MiniMax reports most errors inside a 200 response: check base_resp.status_code (0 is success; 1004 bad API key, 1008 insufficient balance, 2013 invalid parameters). Use this to find the ID of an uploaded file, for example to reference it as mm_file://<file_id> in minimax_create_h3_video_task. Use minimax_retrieve_file for one file's download URL.

    Inputs

    purposestringrequired
    Which files to list: voice_clone (voice cloning source audio), prompt_audio (voice cloning sample audio), t2a_async_input (long-speech text files) or video_generation_input (video input media).one of voice_cloneprompt_audiot2a_async_inputvideo_generation_input
  • minimax_list_h3_video_tasksList MiniMax H3 video tasks from the last 7 days, newest first, with optional filters.Read-only

    List H3 Video Tasks

    List MiniMax H3 video tasks from the last 7 days, newest first, with optional filters. Returns items (each with id, model, status, error, content.url when succeeded, resolution, duration and task_type) and total. Use this to find recent H3 tasks or check several at once. Use minimax_get_h3_video_task for one task by ID.

    Inputs

    modelstring
    Only tasks for this model. Example: MiniMax-H3
    page_numinteger
    Page number, starting at 1. Example: 1
    page_sizeinteger
    Number of tasks per page. Example: 20
    statusstring
    Only tasks with this status.one of queuedrunningsucceededfailedcancelled
    task_idsarray
    Only these task IDs. Example: ["424010985738629"]
    task_typestring
    Only tasks of this type: generation (video generation), h3_context_ir or regeneration.one of generationh3_context_irregeneration
  • minimax_list_modelsList the MiniMax language models available through the OpenAI-compatible API.Read-only

    List Models

    List the MiniMax language models available through the OpenAI-compatible API. Returns data, an array of models with id, created and owned_by. Use this to check valid model IDs for minimax_create_chat_completion.

    Inputs

    This tool takes no inputs.

  • minimax_list_voicesList the voices available to the account: MiniMax system voices, voices you cloned and voices you designed.Read-only

    List Voices

    List the voices available to the account: MiniMax system voices, voices you cloned and voices you designed. Returns system_voice, voice_cloning and voice_generation arrays with voice_id, name or description, and creation date. MiniMax reports most errors inside a 200 response: check base_resp.status_code (0 is success; 1004 bad API key, 1008 insufficient balance, 2013 invalid parameters). Use this to find a voice_id for minimax_text_to_speech or minimax_create_speech_task, or to check which custom voices exist before minimax_delete_voice.

    Inputs

    voice_typestring
    Which voices to list: system (MiniMax voices), voice_cloning (your cloned voices), voice_generation (voices from minimax_design_voice) or all. Cloned and designed voices appear only after they have been used once for synthesis.one of systemvoice_cloningvoice_generationalldefault all
  • minimax_retrieve_fileGet a file's metadata and a temporary download URL by file ID.Read-only

    Retrieve File

    Get a file's metadata and a temporary download URL by file ID. Returns file with file_id, filename, bytes, created_at, purpose and download_url. MiniMax reports most errors inside a 200 response: check base_resp.status_code (0 is success; 1004 bad API key, 1008 insufficient balance, 2013 invalid parameters). Use this to download the result of a Hailuo video task (minimax_get_video_task) or a long speech task (minimax_get_speech_task). Use minimax_list_files to browse uploaded files.

    Inputs

    file_idstringrequired
    ID of the file. Comes from the file_id field of minimax_get_video_task, minimax_get_speech_task or minimax_list_files. Example: 205258526306433