Developer Guide
Selun for Developers
Selun is a machine-payable AI allocation service. Every capability is a payment-gated HTTP endpoint on the x402 protocol — callable from agents, scripts, and automated pipelines. No API key, no account, no subscription. Pay per call in USDC on Base.
x402 integration posture
x402 is a machine-payment protocol built on HTTP 402. When your client calls a Selun endpoint without payment, the server responds 402 Payment Required with a PAYMENT-REQUIRED header describing the amount, asset, and network. Your x402-compatible client sends a USDC payment on Base and retries. Selun verifies via the Coinbase CDP facilitator and returns the result.
There is no API key, no OAuth flow, no account setup. The payment IS the authentication. Any caller with USDC on Base can call any endpoint.
Endpoint discovery
Selun publishes an x402 well-known discovery document and a capabilities endpoint. An x402-compatible agent can scan the origin and auto-discover all available resources, prices, and input schemas without manual configuration.
https://selun.sagitta.systems/.well-known/x402https://selun.sagitta.systems/agent/x402/capabilitieshttps://selun.sagitta.systems/agent/x402/discoveryCapability summary
Six endpoints. Two are async (allocation). Four are sync (tools).
$19.00 USDC · POST · Async
Allocation
/agent/x402/allocate
Returns target weights. Poll statusPath for result.
$34.00 USDC · POST · Async
Allocation with Report
/agent/x402/allocate-with-report
Same as allocation + certified PDF. Poll statusPath.
$0.25 USDC · POST · Sync
Market Regime
/agent/x402/market-regime
Volatility, liquidity, sentiment signals. Immediate.
$0.25 USDC · POST · Sync
Policy Envelope
/agent/x402/policy-envelope
Exposure caps, stablecoin floor, risk budget. Immediate.
$0.50 USDC · POST · Sync
Asset Scorecard
/agent/x402/asset-scorecard
Per-asset quality scores. Immediate.
$1.00 USDC · POST · Sync
Rebalance
/agent/x402/rebalance
Drift analysis + trade instructions. Immediate.
Typical agent integration pattern
Discover capabilities
Fetch /agent/x402/capabilities to get the full resource list with endpoints, prices, and input schemas. Cache the result — it changes infrequently.
Call a tool endpoint (optional)
Call Market Regime or Policy Envelope with a USDC payment if your workflow needs explicit regime or policy context before allocating. Both return immediately.
Submit allocation request
POST to /agent/x402/allocate with your decisionId, riskTolerance, and timeframe. Include the USDC payment ($19). Receive a jobId and statusPath.
Poll for completion
Poll the statusPath until the job completes. The response will include the allocation result or an error state.
Rebalance as needed
On a monitoring schedule or after significant market moves, POST to/agent/x402/rebalance with current holdings to get drift analysis and trade instructions. Costs $1.00 USDC, returns immediately.
Agent referral program
AI agents and developers can participate in the Selun referral program. Include a referral code in allocation requests and earn 50% of confirmed allocation revenue — paid in USDC on Base. Human users share a referral link; agents use the machine-readable agent spec available at /earn.
Human referrals
Referral link
Share https://selun.sagitta.systems/?ref=YOUR_WALLET. When the referred user completes an allocation, you earn 50% of the $19 allocation fee ($9.50) — or 50% of the $34 report fee when applicable.
Agent referrals
Agent program spec
Agents integrate via the agent spec JSON (copy it from /earn). Include your referral code in allocation API calls. Earnings accrue per confirmed payment and are paid to your Base wallet on the 1st and 15th.
x402 catalog vs explainer pages
Machine-facing
x402 Endpoint Catalog
Full technical detail: discovery root, payment transport headers, facilitator URL, input schemas, required and optional fields, product IDs, async vs sync classification. This is what an x402 scanner reads.
View catalog →Human-facing
Capabilities Page
Explanation of what each capability does, when to use it, and what it returns. Use this to understand the service before building the integration.
View capabilities →