@suedeai/plugin-suede
v1.0.0
Published
ElizaOS plugin: rights-aware music and video generation, payable by AI agents over x402 on Base.
Downloads
76
Maintainers
Readme
@suedeai/plugin-suede
ElizaOS plugin: rights-aware music and video generation, payable by autonomous agents over x402 on Base. No API keys. Wallet signature only.
This is the only x402-paying creative-generation plugin in the ElizaOS ecosystem. The existing @elizaos/plugin-suno and @elizaos/plugin-udio plugins wrap traditional API-key services. @suedeai/plugin-suede wraps Suede AI's x402 endpoints — your agent pays USDC on Base per call and receives a rights-aware, fingerprinted media asset.
Why use Suede inside ElizaOS
- No signup, no API key. Your agent has a wallet; that's the auth.
- One HTTP call. ElizaOS Action → 402 challenge → EIP-3009 signed authorization → settle → asset. ~30 seconds end-to-end for music.
- Per-call pricing.
$0.20 USDCmusic,$1.50 USDCshort video. - Provenance built-in. Every output is fingerprinted and eligible for on-chain attestation via the Suede Registry on Base.
Install
pnpm add @suedeai/plugin-suede
# or: npm install @suedeai/plugin-suedeConfigure
Set in your agent's environment (.env or character JSON settings):
SUEDE_WALLET_PRIVATE_KEY=0x... # required; the wallet the agent pays from
SUEDE_SERVICE_URL=https://app.suedeai.ai # optional; default
SUEDE_NETWORK=base-mainnet # optional; or base-sepolia for testingFund the wallet with USDC on Base before use.
Use
Register in your ElizaOS character JSON:
{
"name": "Mira",
"plugins": ["@suedeai/plugin-suede"],
"settings": {
"SUEDE_WALLET_PRIVATE_KEY": "0x..."
}
}The plugin exposes two actions: GENERATE_MUSIC_SUEDE and GENERATE_VIDEO_SUEDE. The agent picks them automatically when the user asks for music or short video.
Programmatic use
import { SuedeClient } from "@suedeai/plugin-suede";
const client = new SuedeClient({
privateKey: process.env.SUEDE_WALLET_PRIVATE_KEY as `0x${string}`,
});
const track = await client.generateMusic({
prompt: "ambient lofi beat with vinyl crackle",
durationSeconds: 30,
});
console.log(track.assetUrl);How payment works
- Plugin POSTs to
https://app.suedeai.ai/create-music(or/agent/video). - Suede returns
402 Payment Requiredwith an x402 challenge — networkeip155:8453, USDC on Base, recipient0xb5a0…032d. - Plugin signs an EIP-3009
TransferWithAuthorizationfor the exact amount. - Plugin retries with
X-PAYMENT: <base64 signed authorization>. - Coinbase x402 facilitator verifies + settles on-chain.
- Suede returns the asset (URL + provenance metadata).
No facilitator key needed on the agent side — Suede operates the facilitator path.
Settings reference
| Key | Required | Default | Notes |
|---|---|---|---|
| SUEDE_WALLET_PRIVATE_KEY | yes | — | 0x-prefixed hex. Use a dedicated agent wallet, not a treasury wallet. |
| SUEDE_SERVICE_URL | no | https://app.suedeai.ai | Override for staging/preview deployments. |
| SUEDE_NETWORK | no | base-mainnet | Set to base-sepolia for testing without spending real USDC. |
Production checklist
- [ ] Wallet has USDC on the configured network
- [ ] Wallet is dedicated to the agent (limit blast radius)
- [ ] Daily spending caps enforced in ElizaOS character config
- [ ] Telemetry on tx hashes from
X-PAYMENT-RESPONSEfor audit
License
MIT © Suede Labs · https://suedeai.ai
Links
- Service: https://app.suedeai.ai
- x402 discovery: https://app.suedeai.ai/.well-known/x402.json
- Agent card: https://app.suedeai.ai/.well-known/agent-card.json
- IP Registry: https://ip.suedeai.ai
- X: https://x.com/AISUEDE
