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

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

  1. Fetch Data - Queries Hiro API for wallet information
  2. Build Prompt - Transforms wallet data into an AI image prompt
  3. Generate Image - Sends prompt to stx402 AI endpoint
  4. 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


This site uses Just the Docs, a documentation theme for Jekyll.