Create/update Kling API account
April 18, 2025 (September 22, 2026)
Table of contents
This endpoint adds or updates a Kling account in your configuration. For an account added with email and password, the API logs in to verify your credentials. For an account connected with passToken (see below), the API refreshes the session with the passToken instead. Kling usually asks these accounts to solve the slider on a password login, so their password cannot be checked and is stored as given.
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
API tokenis required, see Setup useapi.net for details.
Request Body
{
"email": "user@example.com",
"password": "your-password",
"maxJobs": 50
}
-
emailandpasswordare required.
Please see Setup Kling for details. -
maxJobsis required, specify maximum number of concurrent jobs (1-50) -
passToken,did, anduserIdare 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 plainemail+passwordreturnsUnable 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 inpassTokenmode and refreshes captcha-free using thepassToken, with no password login while thepassTokenis valid. The connect tool captures them for you — see Setup Kling.
To update a connected account later, for example to changemaxJobs, postemail,passwordandmaxJobsalone. The account stays inpassTokenmode and refreshes with its storedpassToken. The password is stored as given without being verified, so make sure it is correct. If the storedpassTokenno longer works, the API tries a password login instead, which usually fails withUnable to login (400002). Reconnect the account with a freshpassToken,didanduserId.
Responses
-
{ "email": "user@example.com", "authMode": "password", "session": { "userId": "user12345", "ExpireTime": 123456789, "ExpireTimeUTC": "2025-01-01T12:13:14.000Z" }, "maxJobs": 50, "password": "…secured…" }authModeispasswordfor accounts added with email + password, orpassTokenfor accounts connected withpassToken+did+userId. A connected account keepspassTokenmode when you update it later without those three values. -
{ "error": "Account does not exist or password is incorrect (100110004)" } -
{ "error": "Unauthorized", "code": 401 } -
{ "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": "user@example.com", "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: "user@example.com", 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": "user@example.com", "password": "your-password", "maxJobs": 50 } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json())