Pay Per Use. Not Per Month.

Finally, a way to pay for AI that actually makes sense. Built on Solana, powered by X402.

Live Demo

Chat with our AI agent - $0.0001 per message

Auto402 AI

Auto402

Online
Total Cost: $0.0000

👋 Hello! I'm your AI assistant. Each message costs $0.0001. Ask me anything!

Messages Sent: 0
Rate: $0.0001/msg

Built for Mass Adoption

Real businesses, real use cases, real impact

Only Pay For What You Use

Subscriptions are broken. You pay $20/month whether you use the service once or a thousand times. That's why most people have subscriptions they never touch.

Auto402 flips the model. Your customers pay exactly for what they consume nothing more, nothing less. One question? One cent. Ten questions? Ten cents. Used the service once this month? You paid for once.

No monthly fees. No unused credits expiring. No guilt about wasted money. Just honest, transparent pricing where everyone wins.

$0.0001
Cost per interaction
$0
Monthly subscription
100%
Pay for what you use

Drop It Into Anything

Customer Support

Let AI handle the first line. Customers get instant answers. You save on support costs. Everyone wins.

Chatbots That Don't Suck

Add Auto402 to your website. Visitors get real AI help without signing up. Simple.

API Services

Building an AI API? Stop worrying about rate limits and pricing tiers. Charge per request, automatically.

Gaming & Interactive Apps

NPCs that talk back. AI companions. Dynamic storylines. Charge players micro-amounts for premium AI interactions.

Mobile Apps

No app store fees on micropayments. Users pay directly through their Solana wallet. You keep more of what you earn.

Education Platforms

Tutoring bots, homework help, practice questions. Students pay pennies per session instead of expensive monthly plans.

Fair Pricing That Makes Sense

Why should someone pay for a whole month if they only need your AI once? With Auto402, they pay for exactly what they use. Fair for them. Efficient for you. Simple.

Why Auto402?

Instant Micropayments

Pay only for what you use, down to fractions of a cent

Top AI Agents

Access cutting edge AI models with transparent pricing

Secure & Autonomous

Built on Solana blockchain for fast, secure transactions

Real Time Tracking

Monitor usage and costs in real-time

Easy Integration

Simple SDK to integrate into any application

HTTP 402 Protocol

Native implementation of payment required status code

Documentation

Everything you need to integrate Auto402 into your application

Quick Start Guide

1. Install Dependencies

npm install @solana/web3.js @solana/wallet-adapter-react
npm install @auto402/sdk

2. Initialize Auto402

import { Auto402 } from '@auto402/sdk';

const auto402 = new Auto402({
  network: 'devnet', // or 'mainnet-beta'
  apiKey: 'your-api-key',
});

3. Create a Streaming Session

const session = await auto402.createSession({
  contentType: 'chat',
  pricePerMessage: 0.0001,
  wallet: walletPublicKey,
});

// Start session
await session.start();

// Send message
await session.sendMessage('Hello AI!');

// Stop session
await session.stop();

HTTP 402 Protocol

What is HTTP 402?

The HTTP 402 Payment Required status code is reserved for future use in digital payment systems. Auto402 implements this protocol for micropayment-based content access.

How It Works

  1. Client requests a resource
  2. Server responds with 402 status if payment required
  3. Response includes payment details and price
  4. Client authorizes micropayment
  5. Server provides access upon payment confirmation

Example Response

HTTP/1.1 402 Payment Required
Content-Type: application/json

{
  "price": 0.0001,
  "currency": "USD",
  "paymentAddress": "SoLaNa...",
  "resource": "/api/chat/message"
}

Integration Guide

Wallet Setup

import { useWallet } from '@solana/wallet-adapter-react';

function App() {
  const { publicKey, connected } = useWallet();
  
  if (!connected) {
    return <WalletConnectButton />;
  }
  
  return <Auto402Provider wallet={publicKey}>
    <YourApp />
  </Auto402Provider>;
}

Creating Payment Sessions

const session = await auto402.createSession({
  contentType: 'chat',        // 'chat', 'video', 'api'
  pricePerMessage: 0.0001,    // Price in USD
  wallet: walletPublicKey,    // User's wallet
  metadata: {                 // Optional
    sessionName: 'AI Chat',
    tags: ['demo', 'test']
  }
});

Handling Payments

// Listen for payment events
session.on('payment', (payment) => {
  console.log('Payment processed:', payment);
});

// Listen for insufficient funds
session.on('error', (error) => {
  if (error.code === 'INSUFFICIENT_FUNDS') {
    // Prompt user to add funds
  }
});

API Reference

Auto402 Class

class Auto402 {
  constructor(config: Auto402Config)
  
  createSession(options: SessionOptions): Promise<Session>
  
  getBalance(wallet: PublicKey): Promise<number>
  
  getTransactionHistory(wallet: PublicKey): Promise<Transaction[]>
}

Session Class

class Session {
  start(): Promise<void>
  
  stop(): Promise<void>
  
  sendMessage(message: string): Promise<Response>
  
  getCurrentCost(): number
  
  on(event: string, callback: Function): void
}

Configuration Types

interface Auto402Config {
  network: 'devnet' | 'mainnet-beta';
  apiKey: string;
  endpoint?: string;
}

interface SessionOptions {
  contentType: 'chat' | 'video' | 'api';
  pricePerMessage?: number;
  pricePerSecond?: number;
  wallet: PublicKey;
  metadata?: Record<string, any>;
}

Connect Wallet

Choose your Solana wallet to connect. Make sure your wallet extension is installed and unlocked.

Phantom

Connect with Phantom wallet

Solflare

Connect with Solflare wallet

Slope

Connect with Slope wallet