DocsGetting Started

Getting Started

Get your AI agent making stablecoin payments on-chain in under two minutes. Modexia abstracts away private key management, gas tokens, and RPC nodes.

1

Install the SDK

Modexia provides a lightweight, synchronous Python client designed specifically for AI agents and LLM tool loops.

bash
pip install modexiaagentpay
2

Initialize the client

Grab your API key from the API Keys tab in the dashboard. Keys start with mx_test_ (sandbox) or mx_live_ (production).

python
from modexia import ModexiaClient

# The client automatically validates your key on initialization
client = ModexiaClient(api_key="mx_test_...")
3

Make your first payment

Once initialized, your agent can instantly send USDC to any compatible blockchain address.

python
# 1. Check your balance
balance = client.retrieve_balance()
print(f"Balance: {balance} USDC")

# 2. Send an on-chain payment
receipt = client.transfer(
    recipient="0xabc...",
    amount=5.0,
    wait=True        # polls until confirmed on-chain
)

print(receipt)
# {"success": True, "status": "COMPLETE", "txHash": "0x..."}

Activating your wallet

Use the Agent Account tab to activate your wallet first. You can fund sandbox wallets with the built-in testnet USDC faucet directly from the dashboard.