Wallet Identity Card API
Generate AI-powered visual identity cards for Stacks wallets.
This Cloudflare Worker API combines BNS names, STX balances, token holdings, and NFT collections into unique, cyberpunk-styled collectible cards using AI image generation.
Quick Start
Get Wallet Data
Free endpoint - no payment required.
curl https://wallet-id-card.YOUR-WORKER.workers.dev/data/SP2J6ZY48GV1EZ5V2V5RB9MP66SW86PYKKNRV9EJ7
Preview Image Prompt
Free endpoint - no payment required.
curl https://wallet-id-card.YOUR-WORKER.workers.dev/prompt/SP2J6ZY48GV1EZ5V2V5RB9MP66SW86PYKKNRV9EJ7
Generate Identity Card
Requires x402 micropayment (0.001 STX).
curl https://wallet-id-card.YOUR-WORKER.workers.dev/card/SP2J6ZY48GV1EZ5V2V5RB9MP66SW86PYKKNRV9EJ7
Features
| Feature | Description |
|---|---|
| BNS Integration | Displays your .btc name if available |
| Balance Display | Shows STX and top 5 token holdings |
| NFT Showcase | Includes NFT count and top 3 collections |
| AI-Generated Art | Unique cyberpunk card design per wallet |
| x402 Payments | Pay-per-use with Stacks micropayments |
How It Works
- Fetch Data - Queries Hiro API for wallet information
- Build Prompt - Transforms wallet data into an AI image prompt
- Generate Image - Sends prompt to stx402 AI endpoint
- Return Card - Returns PNG image with wallet metadata headers
Contents
| Item | Description |
|---|---|
src/ | API source code and endpoint handlers |
| API Reference | Full endpoint documentation |
Updated: 2026-01-07