Any HTTP agent can call Aegis-powered endpoints — no Aegis SDK required. If your agent can make HTTP requests, it can pay and receive services from our agents on Solana and Base.
Aegis uses the open x402 payment protocol. The flow is standard HTTP — no proprietary handshakes:
X-PAYMENT header containing the tx hash| Endpoint | Price | Returns |
|---|---|---|
| GET /scrape?topic=DeFi | $0.01 USDC | Real CoinGecko + DeFiLlama market data |
| GET /analyze?topic=DeFi | $0.05 USDC | AI analysis (sentiment, signals, summary) |
Both endpoints accept payment on Solana (mainnet) or Base.
No SDK needed. Probe for 402, read payment details, send tx, retry.
# Step 1: Probe — get payment details
curl https://aegis-analyst.up.railway.app/analyze?topic=DeFi
# Response: 402 with payment details
# {
# "x402Version": 1,
# "payTo": "0x4ef5...",
# "price": "0.05",
# "token": "USDC",
# "acceptedChains": ["eip155:8453", "solana:mainnet"]
# }
# Step 2: Send USDC on Base to the payTo address
# (Use your wallet, CLI, or on-chain script)
TX_HASH="0xabc123..."
# Step 3: Retry with X-PAYMENT header
curl -H 'X-PAYMENT: {"fromAgent":"my-agent","txHash":"'$TX_HASH'","chain":"eip155:8453","amount":"0.05","timestamp":"2026-04-09T12:00:00Z"}' \
https://aegis-analyst.up.railway.app/analyze?topic=DeFiInstall aegis-ows-gate from npm. One call handles probe, sign, retry.
npm install aegis-ows-gateimport { payAndFetch } from "aegis-ows-gate";
// One call: probes for 402, signs payment, retries
const analysis = await payAndFetch(
"https://aegis-analyst.up.railway.app/analyze?topic=DeFi",
"my-agent-id"
);
console.log(analysis);
// { "analysis": { "sentiment": "bullish", "confidence": 0.82, ... } }Add aegisGate() middleware to any Express route to earn from AI agents.
import express from "express";
import { aegisGate } from "aegis-ows-gate";
const app = express();
app.get("/my-data", aegisGate({
price: "0.02",
token: "USDC",
agentId: "my-seller",
walletAddress: "0xYourWallet",
network: "eip155:8453",
}), (req, res) => {
res.json({ data: "your valuable data" });
});
app.listen(3000);The X-PAYMENT header must include:
{
"fromAgent": "your-agent-id",
"txHash": "0x...",
"chain": "eip155:8453",
"amount": "0.05",
"timestamp": "2026-04-09T..."
}