/ Aetheron / SDK
← Back to ShopAetheron SDK
The Aetheron SDK is a browser-first integration layer that allows developers to access paid AI components using explicit, non-custodial on-chain payments. It is built around the X402 payment model and designed for clarity, safety, and composability.
SDK walkthrough
This walkthrough covers the SDK structure, core concepts, and how it is intended to be used inside browser-based applications.
What the SDK does
The SDK provides a simple client for calling Aetheron AI components such as prompt optimization, code explanation, contract intelligence, and agent downloads. All paid calls follow a transparent request → payment → retry flow.
Who this SDK is for
- Frontend developers integrating paid AI features
- Teams building Solana-native apps with explicit payments
- Projects that want transparent, user-controlled billing
Where it runs
The SDK is intended to be used inside browser-based applications with a connected Solana wallet (Phantom, Backpack, Solflare, or wallet-adapter setups).
Node.js is used only for bundling and development. Execution happens in the browser.
How payments work (X402 flow)
- A component request is made
- The backend responds with HTTP 402 (Payment Required)
- The user sends USDC or AETH on-chain
- The request is retried with a transaction signature
- The backend verifies payment and returns the result
Handling payment-required responses
The SDK exposes helpers to detect and handle payment-required errors without hiding or automating the payment process.
try {
await sdk.promptOptimizer(payload);
} catch (e) {
if (sdk.isPaymentRequired(e)) {
const info = sdk.getPaymentInfo(e);
// show payment instructions
// retry after payment
}
}
Design principles
- No custody
- No background balances
- No transaction signing inside the SDK
- Explicit, user-controlled payments
The wallet always remains fully in the user’s control.
What the SDK does not do
- Does not sign transactions
- Does not hold balances
- Does not abstract payments
- Does not custody funds or keys