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
7 · 10 · 27 read10 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_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
  • minimax_create_chat_completionSend a conversation to a MiniMax M3 language model and get the assistant's reply (OpenAI-compatible Chat Completions, non-streaming).Write

    Create Chat Completion

    Send a conversation to a MiniMax M3 language model and get the assistant's reply (OpenAI-compatible Chat Completions, non-streaming). Returns choices[0].message with content, reasoning_content (the model's thinking) and any tool_calls, plus finish_reason and token usage. Use this for text generation, analysis, coding and function calling with MiniMax models. Use minimax_list_models to see the model IDs your key can call.

    Inputs

    messagesarrayrequired
    Conversation so far, oldest first. Each message has a role (system, user, assistant or tool) and content. Content is a string, or an array of OpenAI-style content parts for images and video. A tool result needs tool_call_id set to the id of the assistant's tool call. Example: [{"role": "system", "content": "You are a concise assistant."}, {"role": "user", "content": "Summarise the plot of Hamlet in two sentences."}]
    modelstringrequired
    MiniMax language model to use. MiniMax-M3.1-Flash always thinks and supports reasoning_effort; MiniMax-M3 thinks adaptively and can turn thinking off.one of MiniMax-M3.1-FlashMiniMax-M3
    max_completion_tokensinteger
    Maximum number of tokens to generate, including thinking. MiniMax recommends 131072 and allows up to 524288 for M3 models. Example: 4096
    reasoning_effortstring
    Thinking depth for MiniMax-M3.1-Flash (server default max). Other models ignore it.one of lowmediumhighxhighmax
    reasoning_splitboolean
    true returns thinking separately in reasoning_content; false keeps it inside content wrapped in <think> tags. MiniMax-M3.1-Flash does not accept false.
    service_tierstring
    Admission tier. standard (server default) or priority, which costs 1.5 times standard and is admitted first under load.one of standardpriority
    thinking_typestring
    Thinking mode. adaptive (server default) lets the model decide when to think. disabled skips thinking on MiniMax-M3; MiniMax-M3.1-Flash rejects disabled with HTTP 400.one of adaptivedisabled
    toolsarray
    Function tools the model may call, in OpenAI format. Example: [{"type": "function", "function": {"name": "get_weather", "description": "Get the weather for a city", "parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}}]