Configure Luma Account

April 6, 2026

Table of contents

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

Configure your Luma account for API access using a session cookie. See Setup Luma for details.

https://api.useapi.net/v1/luma/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

{
  "session": "mK8jP2xZc9AfQw3LnT7vYbE1R"
}
  • session is required. The session cookie value extracted from your browser during login. See Setup Luma for instructions.

    Responses

  • 200 OK

    Account configured successfully.

    {
      "account": "[email protected]",
      "user_id": "9ecac364-4b63-5b61-9241-297345710d63",
      "concurrency": 4,
      "luma_session_expires": "2026-05-27 00:28:17 UTC",
      "credits": { "usage": 20, "limit": 10000 },
      "created": true
    }
    
  • 400 Bad Request

    Validation error (missing/invalid parameters).

    {
      "error": "Parameter session is required"
    }
    
  • 401 Unauthorized

    Invalid API token.

    {
      "error": "Unauthorized"
    }
    
  • 402 Payment Required

    Subscription expired or insufficient credits.

    {
      "error": "Account has no subscription or subscription expired"
    }
    
  • 500 Internal Server Error

    Session refreshed but upstream validation failed, or project creation failed.

    {
      "error": "Session refreshed but validation failed. Please try again."
    }
    

Model

  • account - Luma account email
  • user_id - Luma user UUID
  • concurrency - Account concurrency limit
  • luma_session_expires - Session expiry (UTC datetime)
  • credits - Credit usage (null if unavailable)
  • created - true if new account, false if updated
{ // TypeScript, all fields are optional
  account: string                // "[email protected]"
  user_id: string                // Luma user UUID
  concurrency: number            // Account concurrency limit
  luma_session_expires: string   // "2026-05-27 00:28:17 UTC"
  credits: {                     // Credit usage, null if unavailable
    usage: number
    limit: number
  } | null
  created: boolean               // true if new account, false if updated
  error?: string                 // Error message if any
}

Examples

  • curl -H "Accept: application/json" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer YOUR_API_TOKEN" \
         -X POST "https://api.useapi.net/v1/luma/accounts" \
         -d '{
           "session": "mK8jP2xZc9AfQw3LnT7vYbE1R"
         }'
    
  • const apiUrl = 'https://api.useapi.net/v1/luma/accounts';
    const token = 'YOUR_API_TOKEN';
    
    const response = await fetch(apiUrl, {
      method: 'POST',
      headers: {
        'Authorization': `Bearer ${token}`,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        session: 'mK8jP2xZc9AfQw3LnT7vYbE1R'
      })
    });
    
    const result = await response.json();
    console.log('Account configured:', result);
    
  • import requests
    
    apiUrl = 'https://api.useapi.net/v1/luma/accounts'
    token = 'YOUR_API_TOKEN'
    
    headers = {
        'Content-Type': 'application/json',
        'Authorization': f'Bearer {token}'
    }
    
    body = {
        'session': 'mK8jP2xZc9AfQw3LnT7vYbE1R'
    }
    
    response = requests.post(apiUrl, headers=headers, json=body)
    print(response.status_code, response.json())
    

Try It