Skip to main content
Tempo Machine Payment Protocol (Tempo MPP) is the simplest way to make paid API calls to Allium. The Client wrapper handles the entire 402 negotiation, signing, and retry flow — you just make requests as normal.

Quickstart with Agent

The fastest way to get started — let your AI agent handle setup and payments for you.
1

Install allium-cli

curl -sSL https://agents.allium.so/cli/install.sh | sh
allium-cli is still in early beta.
2

Install agent skills

npx skills add allium-labs/skills --yes
3

Open your agent

Start Claude Code, Codex, or any compatible AI agent.
4

Ask a question

Set up Allium and fetch the latest balances for vitalik.eth

How It Works

1

Send request

Make an API request using the Tempo Client.
2

Client handles 402

The client automatically receives the 402 Payment Required response, signs a USDC payment authorization, and retries the request.
3

Get data

You receive your data with a 200 response. The payment flow is invisible to your code.

Supported Tokens & Networks

Tempo MPP payments use USDC on the Tempo network:
NetworkUSDC Contract Address
Tempo (mainnet)0x20c000000000000000000000b9537d11c60e8b50

Implementation

Install

pip install "pympp[tempo]"

Set Up Your Account

Create a TempoAccount from your private key. This account will sign payments on your behalf.
export YOUR_PRIVATE_KEY="your-eth-private-key"

Make a Paid API Call

from mpp.client import Client
from mpp.methods.tempo import tempo, TempoAccount, ChargeIntent
from mpp.methods.tempo._defaults import TESTNET_RPC_URL, TESTNET_CHAIN_ID
import os

account = TempoAccount.from_key(os.getenv("YOUR_PRIVATE_KEY"))

async with Client(methods=[
    tempo(
        account=account,
        rpc_url=TESTNET_RPC_URL,
        intents={"charge": ChargeIntent()},
    )
]) as client:
    response = await client.post(
        "https://agents.allium.so/api/v1/developer/prices",
        json=[{"chain": "solana", "token_address": "So11111111111111111111111111111111111111112"}],
    )
    print(response.json())
The Client intercepts the 402 response, constructs and signs the payment using your TempoAccount, and retries the request automatically. You just see the final 200 response with your data.