Retrieve PixVerse API accounts configuration

December 6, 2024

Table of contents

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

For your convenience, you can specify your PixVerse configuration values under your PixVerse 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.

This endpoint retrieves the complete list of configured API accounts for PixVerse.

https://api.useapi.net/v2/pixverse/accounts

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

    {
        "<email #1>": {
            "email": "<email #1>",
            "jwt": {
                "AccountId": 1122334455,
                "ExpireTime": 123456789,
                "ExpireTimeUTC": "2025-01-01T12:13:14.000Z"
                "Username": "<username>",
                "token": "abc…secured…cde",
            },
            "maxJobs": 8,
            "password": "…secured…"
        },
        "<email #2>": {
            "email": "<email #2>",
            "jwt": {
                "AccountId": 66778899,
                "ExpireTime": 123456789,
                "ExpireTime": 123456789,
                "ExpireTimeUTC": "2025-01-01T12:13:14.000Z"
                "Username": "<username>",
                "token": "abc…secured…cde",
            },
            "maxJobs": 3,
            "password": "…secured…"
        }
    }
    
  • 401 Unauthorized

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

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

Model
{ // TypeScript, all fields are optional
  [email: string]: {
        email: string
        jwt: {
            AccountId: number
            ExpireTime: number
            ExpireTimeUTC: string
            Username: string
            token: string
        }
        maxJobs: number
        password: string
    }
}
Examples
  • curl https://api.useapi.net/v2/pixverse/accounts \
       -H "Accept: application/json" \
       -H "Authorization: Bearer …" 
    
  • const token = "API token";
    const apiUrl = "https://api.useapi.net/v2/pixverse/accounts"; 
    const response = await fetch(apiUrl, {
      headers: {
        "Authorization": `Bearer ${token}`,
      },
    });
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    token = "API token"
    apiUrl = "https://api.useapi.net/v2/pixverse/accounts"
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {token}"
    }
    response = requests.get(apiUrl, headers=headers)
    print(response, response.json())
    
Try It