CodexAccount
🛈 DocStrings¶
Source code in src/codexed/client/account.py
rate_limits
instance-attribute
¶
rate_limits: RateLimitSnapshot | None = None
Latest rate limits: from :meth:rate_limits_read and from the
account/rateLimits/updated notifications the server sends during turns.
login_cancel
async
¶
Cancel an in-progress account login.
Source code in src/codexed/client/account.py
login_start
async
¶
login_start(
login_type: AuthMode,
*,
api_key: str | None = None,
access_token: str | None = None,
chatgpt_account_id: str | None = None,
) -> LoginAccountResponse
Start account login.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
login_type
|
AuthMode
|
Login type (apiKey, chatgpt, chatgptAuthTokens) |
required |
api_key
|
str | None
|
API key (for apiKey type) |
None
|
access_token
|
str | None
|
Access token (for chatgptAuthTokens type) |
None
|
chatgpt_account_id
|
str | None
|
ChatGPT account ID (for chatgptAuthTokens type) |
None
|
Returns:
| Type | Description |
|---|---|
LoginAccountResponse
|
LoginAccountResponse with login details |
Source code in src/codexed/client/account.py
logout
async
¶
rate_limits_read
async
¶
rate_limits_read() -> GetAccountRateLimitsResponse
Read account rate limits (also updates :attr:rate_limits).
Source code in src/codexed/client/account.py
read
async
¶
read(*, refresh_token: bool = False) -> GetAccountResponse
Read account information.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
refresh_token
|
bool
|
When true, trigger a proactive token refresh |
False
|
Returns:
| Type | Description |
|---|---|
GetAccountResponse
|
GetAccountResponse with account info |
Source code in src/codexed/client/account.py
send_add_credits_nudge_email
async
¶
Send an add credits nudge email.