Account
Your account: its plan, balance, month's spend, counts, limits and defaults (Account.get), changing its
defaults (update), the account at a glance with what waits and what failed (status), the public endpoints a
publishable key may call, what an id or key prefix names (resolve), and a one-tap payment link for its owner.
class AccountThe account at a glance (GET /v1/account): its plan's plan_tier, balance (remaining_usd,
None when it can't be read, never 0), this month's spend, how many of each thing it has (counts), its
limits and features, its default_region and the default a paused user is told (spending_paused),
and what the platform offers (scopes, explicit_scopes). The signed-in owner also reads email,
spend_cap and console_key_id; one of the account's own secret keys reads the rest.
| id | str | |
| str | None | ||
| owner | dict[str, str] | None | Who owns it, as NoClick knows them ( |
| plan_tier | str | None | |
| balance | dict[str, Any] | |
| month | dict[str, Any] | |
| spend_cap | dict[str, Any] | None | |
| counts | dict[str, int] | |
| limits | dict[str, int] | |
| features | dict[str, bool] | |
| default_region | str | None | |
| spending_paused | PausedSpendingDefault | None | |
| console_key_id | str | None | |
| scopes | list[str] | What a key with every scope ( |
| explicit_scopes | list[str] | The scopes a key holds only when it names them. |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
getclassmethodasync
noclick.Account.get(*, client=None) -> AccountRead the account: the signed-in owner, or one of the account's own secret keys acting for it (a key acting
for one of its users gets noclick.PermissionDenied).
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)The account.
account = noclick.Account.get()
print(account.plan_tier, account.balance["remaining_usd"])updateclassmethodasync
noclick.Account.update(
*, default_region=..., spending_paused=..., spend_cap_usd=..., client=None
) -> AccountChange the account's defaults: only the fields given; None clears one. default_region is the region
new resources take when a call names none; spending_paused what a paused user is told without a message
(a PausedSpendingDefault); spend_cap_usd the monthly spending cap in whole dollars. The signed-in
owner's alone.
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)The account as it is now.
noclick.Account.update(default_region="eu", spend_cap_usd=200)statusstaticasync
noclick.Account.status(*, client=None) -> AccountStatusThe account at a glance, as the key calling sees it: which account (or which of its users the key acts for), its plan, balance, this month's spend against its caps, approvals waiting on a person, what failed in the last day and what ran last. A user's session is refused.
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)The status.
status = noclick.Account.status()
print(status.account.get("name") or status.account["id"], status.balance.get("remaining_usd"))public_endpointsstaticasync
noclick.Account.public_endpoints(*, client=None) -> list[PublicEndpoint]What a publishable key may list: the account's public endpoints (a shared agent's page, a published
workflow), each by kind and id. The signed-in owner's alone.
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)Each PublicEndpoint.
for endpoint in noclick.Account.public_endpoints():
print(endpoint.kind, endpoint.name, endpoint.url)resolvestaticasync
noclick.Account.resolve(ref, *, client=None) -> ObjectRefWhat ref names in the account: an object's id, a key's prefix (nk_live_ab12…) or one of your users'
ids. Nothing it names raises noclick.NotFound. The signed-in owner's alone.
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)Its type and id, and the user it belongs to.
found = noclick.Account.resolve("nk_live_ab12")
print(found.type, found.id)payment_linkstaticasync
noclick.Account.payment_link(
*, kind='funds', amount_usd=None, plan=None, billing_period=None,
credits_per_month=None, client=None
) -> PaymentLinkA one-tap link that pays for the account, made for its owner to open: funds for its balance
(amount_usd, whole dollars; the plan's fee is paid with them), or a plan to move to. Opening it needs
no sign-in, so only the signed-in owner and the account's assistant make one. Its operation
(operation_id) succeeds once they've paid; the same purchase asked for again while its link is open
answers that link.
'funds'NoneNoneNoneNoneThe client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)The link.
link = noclick.Account.payment_link(amount_usd=20)
print(link.price_usd, link.url)AccountStatus
class AccountStatusThe account at a glance (Account.status): account (its id, name, email, or acting_for:
the user a key acts for), user_id, its plan, balance, month, caps with what each spent, the
approvals waiting on a person (approvals_pending), what failed in the last day (failing) and what ran
last (operations).
| account | dict[str, Any] | |
| user_id | str | None | |
| plan | dict[str, Any] | None | |
| balance | dict[str, Any] | |
| month | dict[str, Any] | |
| caps | list[dict[str, Any]] | |
| approvals_pending | list[dict[str, Any]] | |
| failing | list[dict[str, Any]] | |
| operations | dict[str, Any] | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
ObjectRef
class ObjectRefWhat Account.resolve found: the object's type and id, and the user it belongs to (None: the
account).
| type | str | |
| id | str | |
| user_id | str | None | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
PausedSpendingDefault
class PausedSpendingDefaultWhat a paused user is told when a pause names no message (message), and the button with it (action:
{"label", "url"}).
| message | str | None | |
| action | dict[str, str] | None |
PaymentLink
class PaymentLinkA payment link (Account.payment_link): what it buys (label), what checkout charges (price_usd), its
url, when it lapses, and its operation.
| kind | str | |
| label | str | |
| price_usd | float | |
| url | str | |
| expires_at | datetime | None | |
| operation_id | str | None | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
PublicEndpoint
class PublicEndpointSomething the owner made public that a publishable key may call; name and url are None once it
stopped being public.
| kind | str | |
| id | str | |
| name | str | None | |
| url | str | None | |
| user_id | str | None | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |