Work in Progress — This feature is not live yet. Everything on this page describes our planned implementation. APIs, pricing, and SDK interfaces are subject to change. Join our Discordfor updates.
What is this?
Milo will use the x402 protocol to let you pay for smarter AI models on-the-fly. Instead of fixed subscription tiers, you pay per request — upgrade the brain behind any API call by attaching a stablecoin micropayment.
No signup. No billing portal. Just an HTTP header.
How it will work
Every Milo API endpoint that involves AI reasoning (conversations, position analysis, auto-trade decisions) will accept an optional x402 payment. When you pay, Milo routes your request to a more capable model with deeper analysis, more tool calls, and longer context.
If you want the premium model, include the X-PAYMENT header with your x402 payment payload
Milo verifies the payment via the x402 facilitator on Solana
Your request is routed to the upgraded model
If you don't pay, you still get the standard model — nothing breaks
Model Tiers (Planned)
Tier
Cost per request
What you get
Standard
Free (with API key)
Default model. Fast responses, good for routine tasks
Pro
~$0.01 USDC
Smarter model. Deeper analysis, more tool calls, better trade reasoning
Ultra
~$0.05 USDC
Best available model. Maximum context, multi-step research, institutional-grade analysis
Pricing is per-request and settled instantly on Solana in USDC. Final pricing will be announced closer to launch.
Which endpoints will support it?
Endpoint
Standard (free)
Pro
Ultra
Create conversation (market-analyst)
yes
yes
yes
Create conversation (auto-trader)
yes
yes
yes
Send message
yes
yes
yes
List positions (with PnL analysis)
yes
yes
—
Auto-trade rebalance decisions
automatic
—
—
The auto-trader agent will benefit the most from upgrades — Pro and Ultra models evaluate more signals, consider longer price history, and produce more detailed theses before entering or exiting positions.
Quick Example (Planned)
Once live, upgrading a request will look like this:
Standard request (free):
Pro request (with x402 payment):
Same endpoint. Same request body. The only difference is the X-PAYMENT header. None of this works yet — we'll announce when it's ready.
SDK Integration (Coming Soon)
We're building SDK wrappers that handle payment construction automatically. You'll set a budget and the SDK handles the rest.
JavaScript / TypeScript
Status: Coming soon. The SDK will wrap @x402/svm for Solana payment construction and handle retry logic when the facilitator returns settlement confirmation.
Python
Status: Coming soon.
Raw HTTP (via x402 libraries)
Once Milo endpoints support x402, you'll also be able to use any x402 client library (@x402/fetch, @x402/axios) directly without the Milo SDK:
The x402 fetch wrapper handles the 402 → payment → retry flow automatically.
Status: Coming soon. The x402 client libraries exist today, but Milo does not accept x402 payments yet.
Spending Controls (Coming Soon)
The SDK will include safety rails so autonomous agents don't overspend:
Setting
Description
maxSpendPerRequest
Max USDC per single API call
maxSpendPerHour
Hourly budget cap
maxSpendPerDay
Daily budget cap
modelTier
Default tier (standard, pro, ultra)
autoUpgrade
Auto-upgrade to Pro if Standard response quality is low
Why x402?
No subscriptions — Pay only for what you use
Instant settlement — Payments settle on Solana in ~400ms
Agent-native — Your trading bot can decide when to pay for better analysis
Transparent pricing — Cost is per-request, visible before you pay
Backward compatible — Standard tier always works without payment
Roadmap
Feature
Status
x402 payment verification on API
Coming soon
Pro tier (conversations, analysis)
Coming soon
Ultra tier (deep research, portfolio review)
Coming soon
TypeScript SDK (@milo/sdk)
Coming soon
Python SDK
Coming soon
Spending controls & budget caps
Coming soon
Auto-upgrade (smart tier selection)
Coming soon
Pay-per-trade execution priority
Planned
Get Notified
Want early access? Join our Discord and ask about the x402 beta.
import { MiloClient } from '@milo/sdk';
const milo = new MiloClient({
apiKey: 'mk_live_...',
wallet: yourSolanaKeypair, // signs x402 payments
modelTier: 'pro', // default tier for all requests
maxSpendPerRequest: 0.05, // safety cap in USDC
});
// Automatically attaches x402 payment at the "pro" tier
const conversation = await milo.conversations.create({
userId: 'uuid',
message: 'Deep dive on RENDER — fundamentals, technicals, and risk',
agentType: 'market-analyst',
});
// Override tier for a single request
const analysis = await milo.conversations.create({
userId: 'uuid',
message: 'Full portfolio risk assessment with correlation analysis',
agentType: 'auto-trader',
}, { tier: 'ultra' });
// Poll for response (same as before)
const messages = await milo.conversations.getMessages({
userId: 'uuid',
conversationId: conversation.conversationId,
});
from milo import MiloClient
milo = MiloClient(
api_key="mk_live_...",
wallet=solana_keypair,
model_tier="pro",
max_spend_per_request=0.05,
)
conversation = milo.conversations.create(
user_id="uuid",
message="What's the best DePIN play right now?",
agent_type="market-analyst",
)
# Override tier for this call
conversation = milo.conversations.create(
user_id="uuid",
message="Rebalance my portfolio for a risk-off environment",
agent_type="auto-trader",
tier="ultra",
)