Create or update MiniMax API account configuration

September 25, 2024 (March 17, 2025)

Table of contents

  1. Request Headers
  2. Request Body
  3. Responses
  4. Model
  5. Examples
  6. Try It

See Setup MiniMax for details.

For your convenience, you can specify your MiniMax configuration values under your account. If you specify multiple MiniMax accounts, the API will automatically perform load balancing by randomly selecting an account with available capacity before making calls to MiniMax.

https://api.useapi.net/v1/minimax/accounts

Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
Request Body
{
    "url": "MiniMax url",
    "token": "MiniMax token",
    "maxJobs": 1-10,
}
  • url and token are required. Please see Setup MiniMax for details.

  • maxJobs is required. Currently, it should be between 1 and 10.
    For video accounts, please set this number according to your subscription plan. We recommend setting it to 2 (3 maximum) for Free, and 3 (4 maximum) for Standard and Unlimited plans. Although you can set it to higher values (3 for Free and 5 for Standard and Unlimited respectively), it won’t make any difference since only one video can be processed at a time for Free accounts, and no more than two for Standard and Unlimited accounts. It’s helpful to have a spare empty slot for cases where the MiniMax website is too busy and responds with 502 or 504 while still accepting jobs into the internal queue.

Responses
  • 201 Created

    {
        "account": "123456",
        "jwt": {
            "token": "abc…secured…xyz",
            "user": {
                "deviceID": "123456789",
                "id": "123456",
                "isAnonymous": true,
                "name": "<name>",
                "avatar": "<url>"
            },
            "exp": 1734858598.864,
            "iat": 1732266598.864,
            "host": "hailuoai.video",
            "searchParams": "device_platform=web&app_id=3001&version_code=22201&uuid=b5df53d1-4c0d-4c77-8422-87e3f3b1a1d6&device_id=123456789&os_name=Windows&browser_name=chrome&device_memory=8&cpu_core_num=4&browser_language=en-US&browser_platform=Win32&screen_width=1920&screen_height=1080&unix=1732266598000",
            "iat_Issued": "2024-01-01T00:00:00.000Z",
            "exp_Expire": "2024-12-01T00:00:00.000Z"
        },
        "maxJobs": 1,
        "supportVideo": true,
        "supportChat": true,
        "supportAudio": true
    }
    
  • 400 Bad Request

    {
      "error": "<Error message>",
      "code": 400
    }
    
  • 401 Unauthorized

    {
      "error": 
        "Unauthorized",
        "Wrong username/password combination.",
        "This account has been suspended."
      "code": 401
    }
    
Model
{ // TypeScript, all fields are optional
  account: string
  jwt: {
    token: string
    user: {
      deviceID: string
      id: string
      isAnonymous: boolean
      name: string
      avatar: string
    },
    exp: number
    iat: number
    host: string
    searchParams: string
    iat_Issued: string
    exp_Expire: string
  }
  maxJobs: number
  supportMusic: boolean
  supportVideo: boolean
  supportAudio: boolean
  supportChat: boolean
}
Examples
  • curl -H "Accept: application/json" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer …" \
         -X POST https://api.useapi.net/v1/minimax/accounts \
         -d '{"url": "…", "token": "…", "maxJobs": …}'
    
  • const url = "MiniMax url";      
    const token = "MiniMax token";      
    const apiUrl = `https://api.useapi.net/v1/minimax/accounts`; 
    const api_token = "API token";
    const maxJobs = 1;
    const data = { 
      method: 'POST',
      headers: {
        'Authorization': `Bearer ${api_token}`,
        'Content-Type': 'application/json' }
    };
    data.body = JSON.stringify({ 
      url, token, maxJobs
    });
    const response = await fetch(apiUrl, data);
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    url = "MiniMax url"
    token = "MiniMax token"
    apiUrl = f"https://api.useapi.net/v1/minimax/accounts" 
    api_token = "API token"
    maxJobs = 1
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {api_token}"
    }
    body = {
        "url": f"{url}", 
        "token": f"{token}", 
        "maxJobs": maxJobs
    }
    response = requests.post(apiUrl, headers=headers, json=body)
    print(response, response.json())
    
Try It