Create or update PixVerse API account configuration
December 6, 2024
Table of contents
See Setup PixVerse for details.
For your convenience, you can specify your PixVerse configuration values under your account. If you specify multiple PixVerse accounts, the API will automatically perform load balancing by randomly selecting an account with available capacity before making calls to PixVerse.
https://api.useapi.net/v2/pixverse/accounts/
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data
API token
is required, see Setup useapi.net for details.
Request Body
{
"email": "Required PixVerse account email",
"password": "Required PixVerse account password",
"maxJobs": 1-8,
"token": "Optional PixVerse token",
}
-
email
andpassword
are required. Please see Setup PixVerse for details. -
maxJobs
is required.
Valid range: 1…8
It should not exceed the number of concurrent generations supported by your account subscription plan. -
token
is optional and should only be used for development or debugging purposes. See details.
Responses
-
{ "email": "<account email>", "password": "…secured…", "maxJobs": 3, "jwt": { "AccountId": 66778899, "ExpireTime": 123456789, "ExpireTimeUTC": "2025-01-01T12:13:14.000Z", "Username": "<username>", "token": "abc…secured…cde" } }
-
{ "error": "<Error message>", "code": 400 }
-
{ "error": "<Error message>", "code": 401 }
Model
{ // TypeScript, all fields are optional
email: string
password: string
maxJobs: number
jwt: {
AccountId: number
ExpireTime: number
ExpireTimeUTC: string
Username: string
token: string
}
}
Examples
-
curl -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -X POST https://api.useapi.net/v2/pixverse/accounts/<email> \ -d '{"email": "…", "password": "…", "maxJobs": …}'
-
const email = "PixVerse account email"; const password = "PixVerse account password"; const apiUrl = `https://api.useapi.net/v2/pixverse/accounts/${email}`; const api_token = "API token"; const maxJobs = 3; const data = { method: 'POST', headers: { 'Authorization': `Bearer ${api_token}`, 'Content-Type': 'application/json' } }; data.body = JSON.stringify({ email, password, maxJobs }); const response = await fetch(apiUrl, data); const result = await response.json(); console.log("response", {response, result});
-
import requests email = "PixVerse account email" password = "PixVerse account password" apiUrl = f"https://api.useapi.net/v2/pixverse/accounts/{email}" api_token = "API token" maxJobs = 3 headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {api_token}" } body = { "email": f"{email}", "password": f"{password}", "maxJobs": maxJobs } response = requests.post(apiUrl, headers=headers, json=body) print(response, response.json())