Skip to main content

Overview

The Account Management API allows you to manage ChatGPT accounts used by Codex-LB for load balancing. You can import accounts, list them with usage statistics, pause/reactivate accounts, and view usage trends.
All Account Management endpoints require dashboard authentication via session cookie.

List Accounts

endpoint
Returns all accounts with their status, usage statistics, and reset times.

Response

array
Array of account objects

Example Request

Example Response

Import Account

endpoint
Import a ChatGPT account using an auth.json file from the official OpenAI CLI.

Request

file
required
The auth.json file containing ChatGPT session tokens. Must be uploaded as multipart/form-data.

Response

string
required
The imported account ID
string
required
Account email address
string
required
ChatGPT plan type
string
required
Initial account status (typically “active”)

Example Request

Example Response

Error Responses

error
invalid_auth_json: The auth.json file is malformed or missing required fields
error
duplicate_identity_conflict: An account with this identity already exists
Retrieve historical usage trends for a specific account.

Path Parameters

string
required
The account ID to fetch trends for

Response

string
required
The account ID
array
required
Array of usage trend points for primary window
array
required
Array of usage trend points for secondary window

Example Request

Example Response

Error Responses

error
account_not_found: No account exists with the specified ID

Pause Account

endpoint
Temporarily pause an account, preventing it from being used for requests.

Path Parameters

string
required
The account ID to pause

Response

string
required
Always returns “paused” on success

Example Request

Example Response

Error Responses

error
account_not_found: No account exists with the specified ID

Reactivate Account

endpoint
Reactivate a paused account, making it available for load balancing again.

Path Parameters

string
required
The account ID to reactivate

Response

string
required
Always returns “reactivated” on success

Example Request

Example Response

Error Responses

error
account_not_found: No account exists with the specified ID

Delete Account

endpoint
Permanently delete an account from the system.

Path Parameters

string
required
The account ID to delete

Response

string
required
Always returns “deleted” on success

Example Request

Example Response

Error Responses

error
account_not_found: No account exists with the specified ID
Account deletion is permanent and cannot be undone. The account will immediately stop being used for load balancing.

Authentication

All account management endpoints require dashboard authentication. You must be logged in to the dashboard and include your session cookie in requests.

Common Error Codes