Developer Guide
Official documentation and resources for building on baseFM
|What is baseFM?
baseFM is an onchain radio platform built on Base (Coinbase L2). DJs stream live music, listeners tune in, and everything is powered by crypto wallets.
Base L2
Chain ID 8453
Live Streaming
HLS via Mux
Wallet Auth
Base Wallet
|Access Tokens
baseFM has grown โ live encoding, edge delivery, recording storage, agent compute, and the AI Cloud all run on paid infrastructure. Access is gated by tokens so the network can cover its own costs.
We accept two equivalent paths to the same USD value: hold RAVE on Base, or hold AGENTBOT on Solana. Each path targets a ~$25 USD floor per DJ session โ the cost of a 2-hour Mux stream (encoding, delivery, storage) plus a small margin to keep the lights on.
Token amounts auto-adjust to track the $25 USD floor โ if RAVE or AGENTBOT moves on the open market, the gate scales the required token count so listeners and DJs always pay the same effective cost. Both paths grant identical DJ rights.
|Choose Your Access
Pick the payment rail that fits you. All four options unlock the same DJ rights โ we equalise on the underlying USD cost so nobody overpays for picking a different rail.
Hold RAVE
50,000 RAVE
Hold the equivalent of ~$25 USD in RAVE. Gate is read-only โ no transaction needed once you hold.
- โข Uniswap v4 pool on Base
- โข Wallet check, gas-free verification
- โข Tradeable any time
Hold AGENTBOT
โ $25 USD equiv.
Same value as RAVE, on the Solana side. Useful if your wallet lives there or youyou're alreadyapos;re already in the Agentbot ecosystem.
- โข Solana SPL token
- โข Equivalent perks to RAVE path
- โข agentbot.sh/token
USDC on Base
$2 + $5/hr metered
$2 session fee, then $5 USDC/hr while live. Settles automatically against the platform wallet at stream end.
- โข No commitment
- โข Pay only when you stream
- โข Best for occasional DJs
DJ Subscription
$40 / month
Waives session fees, drops metered to $3/hr. Pay with credit card via Stripe or USDC on Base โ same $40 either way.
- โข Stripe checkout (Visa, Mastercard, Apple Pay)
- โข Or USDC self-custody on Base
- โข Best for regular DJs
When to pick what
- RAVE / AGENTBOT โ youyou're crypto-nativeapos;re crypto-native and want one-time access tied to a holding (no recurring charge).
- USDC pay-as-you-go โ you DJ a few times a month and don't want to lock up tokens.
- $40 subscription (Stripe or USDC) โ you DJ regularly; cheapest per hour after ~5 hours/month.
All four rails route into the same gate. The DJ dashboard and `/api/billing/*` endpoints accept any combination โ hold the token orpay the session fee or have an active subscription.
|Headliner Invite Codes
Selected headliners get free DJ access via single-use invite codes. baseFM covers the underlying infra cost as a marketing expense โ the headliner brings the audience, we host the stream.
Codes are issued by admin only. If youyou've been sentapos;ve been sent one, redeem it from the access modal on the DJ dashboard. Default grants 30 days of free streaming on the same gate everyone else uses.
How it works
Admin issues a code via POST /api/admin/headliner-codes (signed by an admin wallet).
Admin shares the code with the headliner directly (DM, email, in person).
Headliner opens the DJ dashboard, picks "Have an invite code?"quot;Have an invite code?"Have an invite code?"quot;, and redeems with a wallet signature.
Their wallet gets a 30-day free-access window. The gate treats it identically to a paid plan.
Code anatomy
Format: HEADLINER-XXXX
Default uses: 1
Default duration: 30 days
Expiry: optional
Revocable: yes
Admin endpoints
POST /api/admin/headliner-codes
issue or revoke
GET /api/admin/headliner-codes
list all codes
POST /api/headliner-codes/redeem
public redeem flow
// Admin: issue a single-use 30-day code
const nonce = crypto.randomUUID();
const timestamp = new Date().toISOString();
const message = `Issue baseFM headliner code\nNonce: ${nonce}\nTimestamp: ${timestamp}`;
const signature = await wallet.signMessage({ message });
const res = await fetch('/api/admin/headliner-codes', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
adminWallet: ADMIN_WALLET,
signature, message, nonce, timestamp,
notes: '@djsuperstar โ Coachella afterparty',
maxRedemptions: 1,
durationDays: 30,
}),
});
const { code } = await res.json();
// โ { code: 'HEADLINER-K7QX', ... }Cost coverage: every redemption is an entry in platform_fee_recordswith status accrued + sourceType headliner_promo, so the marketing spend stays visible in the admin accounting view.
|Supported Payment Tokens
Ethereum
Used for: Tips, Gas
USD Coin
Used for: Tickets, Tips
RaveCulture (Base)
Used for: DJ Access, Tips
Agentbot (Solana)
Used for: DJ Access (equiv.)
Coinbase BTC
Used for: Tips
