pai
    Preparing search index...

    Run agents and choose how you pay

    pai login
    pai workspace fund --amount 10 --card
    pai workspace status
    pai claude
    pai codex
    pai pi

    Install the agent separately. Login uses device approval for an account or guest workspace and saves a key privately. Card funding opens checkout; verify funds with workspace status before running. pai login --paste saves an existing key.

    Pai runs a local authenticated proxy and gives the agent temporary configuration. The real API key stays out of agent arguments. Existing agent configuration is not edited. Put pai flags first; everything after -- goes to the agent.

    pai codex --key coding -- exec "review this change"
    

    Key runs report the balance's change in spending. If other processes use that key concurrently, their spending can appear in the same summary.

    pai keys create --save coding --limit 5
    pai keys list
    pai keys set --id <key-id> --budget 20 --period 30 --rate 1
    pai claude --key coding
    pai keys revoke --id <key-id>

    Keys share workspace funds. The server enforces key limits, periodic budgets and spending rates; the rate is dollars per minute. Get the full key ID from pai keys list. none clears a control. Revocation preserves shared funds.

    pai keys saved lists local copies, pai keys save validates and saves an existing key, and pai keys rm forgets a local copy without revoking it. pai key list|save|show|rm remains available for existing scripts.

    pai codex --mpp --limit 10
    

    This explicitly selects wallet payments even when a saved API key exists. Without --network, pai uses the network Phantom's payment challenge names. --network tempo-testnet selects the test network; --no-browser prints approval instructions instead of opening them. --key cannot be combined with --mpp.

    --limit defaults to 10 dollars and sets the maximum session deposit. When a Tempo Wallet access key must be created, its allowance uses that amount for 7 days; an existing approval may be reused. This is not a cumulative per-run spending cap. A server wallet supplied with TEMPO_PRIVATE_KEY uses session deposit limits without the wallet access-key approval step.

    --limit and --network require --mpp; key runs refuse them instead of silently ignoring them. For key spending caps, use pai keys set.

    The run prints payments tracked by its MPP client on stderr.

    Install pay.sh with npm install -g @solana/pay and run pay setup first.

    pai workspace fund --amount 10 --pay --x402
    pai workspace payment --id <payment-id>

    The native pay.sh wallet pays Solana USDC into shared workspace credit. Use --mpp instead of --x402 to choose the other Solana payment protocol. This is workspace funding, separate from Tempo MPP agent sessions. --sandbox is for servers configured to accept sandbox payments.

    Pai saves the purchase ID before invoking the wallet. Credit becomes available when verified settlement completes. If pending, check that purchase rather than paying again. These flows require Phantom's optional payment endpoint to be enabled.

    Card and direct Solana funding remain available through pai workspace fund. Direct-key purchases describes older pai buy flows.

    pai workspace export --file <private-path>
    pai workspace import --file <private-path>

    Recovery files grant management access. Keep them private and out of model context. Export refuses to overwrite an existing file. Logout forgets local workspace access and the default key; it does not revoke remote inference keys.