Create/update Kling API account

April 18, 2025 (July 20, 2026)

Table of contents

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

This endpoint adds or updates a Kling account in your configuration. The API will automatically login to verify your credentials.

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

Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data
Request Body
{
  "email": "[email protected]",
  "password": "your-password",
  "maxJobs": 50
}
  • email and password are required.
    Please see Setup Kling for details.

  • maxJobs is required, specify maximum number of concurrent jobs (1-50)

  • passToken, did, and userId are optional — supply all three together, or none. Provide them only when the account hits the Kling login slider captcha (which our server cannot solve, so plain email + password returns Unable to login (400002)). The three values are your signed-in Kling session captured from your own browser, where you solved the slider. When present, the account is stored in passToken mode and refreshes captcha-free using the passToken, with no password login. The connect tool captures them for you — see Setup Kling.

Responses
  • 201 Created

    {
      "email": "[email protected]",
      "authMode": "password",
      "session": {
        "userId": "user12345",
        "ExpireTime": 123456789,
        "ExpireTimeUTC": "2025-01-01T12:13:14.000Z"
      },
      "maxJobs": 50,
      "password": "…secured…"
    }
    

    authMode is password for accounts added with email + password, or passToken when the account was connected with passToken + did + userId.

  • 400 Bad Request

    {
      "error": "Account does not exist or password is incorrect"
    }
    
  • 401 Unauthorized

    {
      "error": "Unauthorized",
      "code": 401
    }
    
  • 402 Payment Required

    {
      "error": "Subscription required",
      "code": 402
    }
    
Model
{ // TypeScript, all fields are optional
  email: string
  authMode: "password" | "passToken"
  session: {
    userId: string
    ExpireTime: number
    ExpireTimeUTC: string
  }
  maxJobs: number
  password: string
  error: string
}
Examples
  • curl -X POST https://api.useapi.net/v1/kling/accounts \
       -H "Content-Type: application/json" \
       -H "Authorization: Bearer …" \
       -d '{"email": "[email protected]", "password": "your-password", "maxJobs": 50}'
    
  • const token = "API token";
    const apiUrl = "https://api.useapi.net/v1/kling/accounts"; 
    const response = await fetch(apiUrl, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "Authorization": `Bearer ${token}`,
      },
      body: JSON.stringify({
        email: "[email protected]",
        password: "your-password",
        maxJobs: 50
      })
    });
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    token = "API token"
    apiUrl = "https://api.useapi.net/v1/kling/accounts"
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {token}"
    }
    data = {
        "email": "[email protected]",
        "password": "your-password",
        "maxJobs": 50
    }
    response = requests.post(apiUrl, headers=headers, json=data)
    print(response, response.json())
    
Try It