Create LTX Studio API account configuration

June 3, 2025

Table of contents

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

For your convenience, you can specify your LTX Studio configuration values under your LTX Studio account. If you specify multiple LTX Studio accounts, the API will automatically perform load balancing by randomly selecting an account with available capacity before making calls to LTX Studio.

This endpoint creates or updates an API account configuration for LTX Studio.

https://api.useapi.net/v1/ltxstudio/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
{
  "cookie": "lt_id=user123; lt_token=eyJ...; lt_refresh_token=abc123...",
  "maxJobs": 20,
}
  • cookie is required, specify LTX Studio authentication cookies, see Setup LTX Studio for details.
  • maxJobs is optional, and sets the maximum number of concurrent jobs. Currently, LTX Studio does not appear to have a limit on the number of concurrent generations, instead they noticeably slow down concurrent generations past ~10. Feel free to set this to higher values if needed.
    Supported values: 1…100, default is 20.
Responses
  • 200 OK

    {
        "email": "[email protected]",
        "cookie": {
            "lt_id": "user123",
            "lt_token": "…secured…",
            "lt_refresh_token": "…secured…"
        },
        "maxJobs": 20,
        "updatedUTC": "2025-06-03T12:13:14.000Z",
        "tokenExpireUTC": "2025-07-03T12:13:14.000Z"
    }
    
  • 400 Bad Request

    {
      "error": "Missing required cookie fields: lt_token | lt_refresh_token",
      "code": 400
    }
    
  • 401 Unauthorized

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

    {
      "error": "Subscription required",
      "code": 402
    }
    
Model
{ // TypeScript, all fields are optional
    email: string
    cookie: {
        lt_id: string
        lt_token: string
        lt_refresh_token: string
        [key: string]: string
    }
    maxJobs: number
    updated: number
    tokenExpire: number
    updatedUTC?: string
    tokenExpireUTC?: string
    error?: string
}
Examples
  • curl https://api.useapi.net/v1/ltxstudio/accounts \
       -H "Accept: application/json" \
       -H "Authorization: Bearer …" \
       -H "Content-Type: application/json" \
       -d '{
         "cookie": "lt_id=user123; lt_token=eyJ...; lt_refresh_token=abc123...",
         "maxJobs": 20
       }'
    
  • const token = "API token";
    const apiUrl = "https://api.useapi.net/v1/ltxstudio/accounts"; 
    const response = await fetch(apiUrl, {
      method: "POST",
      headers: {
        "Authorization": `Bearer ${token}`,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        "cookie": "lt_id=user123; lt_token=eyJ...; lt_refresh_token=abc123...",
        "maxJobs": 20
      })
    });
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    token = "API token"
    apiUrl = "https://api.useapi.net/v1/ltxstudio/accounts"
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {token}"
    }
    data = {
        "cookie": "lt_id=user123; lt_token=eyJ...; lt_refresh_token=abc123...",
        "maxJobs": 20
    }
    response = requests.post(apiUrl, headers=headers, json=data)
    print(response, response.json())
    
Try It