Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.httpayer.com/llms.txt

Use this file to discover all available pages before exploring further.

Get account balance for proxy mode. Retrieves the current balance and usage information for the API key account. Only available in proxy mode.

Signature

client.get_balance(api_key: Optional = None)

Parameters

  • api_key: Override the default API key. Uses instance api_key if not provided.

Returns

Dict containing balance information (USDC amount, usage stats, etc.).

Raises

  • RuntimeError: If called in relay mode (balance endpoint is proxy-only).

Examples

>>> client = HTTPayerClient(api_key="your-key")
>>> balance = client.get_balance()
>>> print(f"Balance: {balance['balance']} Credits")