Retrieve MiniMax API account configuration for account

September 25, 2024 (October 11, 2024)

Table of contents

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

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

The account value should correspond to an account configured previously via a POST /accounts/account request.

Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
Responses
  • 200 OK

    {
        "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,
        "supportMusic": false,
        "supportVideo": true    
    }
    
  • 401 Unauthorized

    {
      "error": "Unauthorized",
      "code": 401
    }
    
  • 404 Not Found

    Configuration not found. To create configuration use POST /accounts/account.

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 
}
Examples
  • curl https://api.useapi.net/v1/minimax/accounts/<account> \
       -H "Accept: application/json" \
       -H "Authorization: Bearer …" 
    
  • const token = "API token";
    const account = "Previously configured account"; 
    const apiUrl = `https://api.useapi.net/v1/minimax/accounts/${account}`; 
    const response = await fetch(apiUrl, {
      headers: {
        "Authorization": `Bearer ${token}`,
      },
    });
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    token = "API token"
    account = "Previously configured account"
    apiUrl = f"https://api.useapi.net/v1/minimax/accounts/{account}"
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {token}"
    }
    response = requests.get(apiUrl, headers=headers)
    print(response, response.json())
    
Try It