Core Concepts

Understanding the fundamental building blocks of AI-Sats.

🏦

AI Wallets

An AI Wallet is a virtual account within AI-Sats. Each wallet has:

  • AI ID - Unique identifier (e.g., ai_7f3d2a1b)
  • API Key - Secret key for authentication
  • Balance - Current funds in satoshis
  • Daily Limit - Maximum daily spending (default: 1M sats)

Unlike traditional bank accounts, AI Wallets require no identity verification. An AI can have a wallet purely through cryptographic authentication.

⚑

Lightning Network

AI-Sats uses the Lightning Network, a layer-2 Bitcoin protocol that enables:

  • Instant payments - Settle in seconds, not minutes
  • Low fees - Typically 1-10 satoshis per transaction
  • Micropayments - Send as little as 1 satoshi
  • Scalability - Millions of transactions per second
🧾

Invoices (BOLT11)

A Lightning Invoice is a request for payment. When an AI creates an invoice, it generates a bolt11 string that encodes:

  • Amount to pay
  • Destination node
  • Expiry time
  • Payment hash (for verification)

Example invoice:

lnbc10u1pj3x5mxpp5qqqsyq...
(encodes: 1000 sats, expires in 1 hour)

Payment Flows

Receiving Payment (AI provides service)

User                     Your AI                   AI-Sats
  β”‚                         β”‚                         β”‚
  β”‚  "Translate this"       β”‚                         β”‚
  │────────────────────────▢│                         β”‚
  β”‚                         β”‚                         β”‚
  β”‚                         β”‚  create_invoice(1000)   β”‚
  β”‚                         │────────────────────────▢│
  β”‚                         β”‚                         β”‚
  β”‚                         β”‚  bolt11: "lnbc10u..."   β”‚
  β”‚                         │◀────────────────────────│
  β”‚                         β”‚                         β”‚
  β”‚  "Pay this: lnbc10u..." β”‚                         β”‚
  │◀────────────────────────│                         β”‚
  β”‚                         β”‚                         β”‚
  β”‚  (User pays invoice)    β”‚                         β”‚
  │─────────────────────────────────────────────────▢│
  β”‚                         β”‚                         β”‚
  β”‚                         β”‚  check_payment()        β”‚
  β”‚                         │────────────────────────▢│
  β”‚                         β”‚                         β”‚
  β”‚                         β”‚  status: "paid"         β”‚
  β”‚                         │◀────────────────────────│
  β”‚                         β”‚                         β”‚
  β”‚  "Here's your           β”‚                         β”‚
  β”‚   translation..."       β”‚                         β”‚
  │◀────────────────────────│                         β”‚

AI-to-AI Transfer (Internal)

AI-001                    AI-Sats                   AI-002
  β”‚                          β”‚                         β”‚
  β”‚  internal_transfer()     β”‚                         β”‚
  β”‚  to: ai_002, 500 sats    β”‚                         β”‚
  │─────────────────────────▢│                         β”‚
  β”‚                          β”‚                         β”‚
  β”‚                    β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”                   β”‚
  β”‚                    β”‚ DB Update β”‚                   β”‚
  β”‚                    β”‚ AI-001: -500                  β”‚
  β”‚                    β”‚ AI-002: +500                  β”‚
  β”‚                    β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜                   β”‚
  β”‚                          β”‚                         β”‚
  β”‚  tx_id: "tx_int_xxx"     β”‚                         β”‚
  │◀─────────────────────────│                         β”‚
  β”‚                          β”‚                         β”‚
  β”‚                          β”‚   (Balance updated)     β”‚
  β”‚                          │────────────────────────▢│

Internal transfers are instant and free because they don't use the Lightning Network - they're just database updates within AI-Sats.

Security Model

Authentication

Every API request must include a valid API key in the X-API-Key header. Keys are:

Spending Limits

Limit TypeDefault Value
Single transaction max100,000 sats
Daily spending limit1,000,000 sats
Max wallet balance10,000,000 sats

Rate Limiting

To prevent abuse, API calls are rate-limited per API key. Exceeding limits returns a 429 Too Many Requests response.

Satoshi Explained

A satoshi (sat) is the smallest unit of Bitcoin:

AI-Sats uses satoshis for all amounts because they're ideal for micropayments.

AmountSatoshis~USD
Micro tip100 sats$0.04
Small service1,000 sats$0.40
Medium service10,000 sats$4.00
Large service100,000 sats$40.00

Network: Signet vs Mainnet

AI-Sats currently operates on Bitcoin Signet, a testing network:

FeatureSignetMainnet
Real valueNoYes
Free test coinsYes (faucets)No
BehaviorIdentical to mainnet-
RiskNoneReal money

Development on Signet means you can experiment freely without risking real funds. When we launch on mainnet, your code will work the same way.