docs/getting-started/blockrun-sol-wallet.md
This guide explains how to use a Solana wallet to pay for AI usage through BlockRun — no API key required.
BlockRun is a decentralized AI inference gateway that lets you access top AI models (Claude, GPT, Gemini, Grok, DeepSeek, etc.) by paying per request with USDC — no monthly subscriptions, no API key signups.
NOFX integrates BlockRun via the x402 micropayment protocol on Solana: each AI inference request automatically pays a small USDC fee directly from your wallet.
Tip: A few dollars of USDC is plenty to start.
⚠️ Security Warning: Use a dedicated wallet for NOFX — not your main holdings wallet.
From Phantom Wallet:
5J... — a long string of ~88 characters)From Solflare:
From CLI (solana-keygen):
# View existing keypair
cat ~/.config/solana/id.json
# This is a JSON array — convert to base58 using:
solana-keygen pubkey ~/.config/solana/id.json
Note: NOFX accepts the base58-encoded 64-byte keypair (as exported by Phantom/Solflare). This is the standard format for Solana private keys.
Send USDC to your Solana wallet:
EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1vCheck your balance at solscan.io or in your wallet app.
http://localhost:3000When NOFX sends an AI request:
https://sol.blockrun.ai/api/v1/chat/completions402 Payment Required + payment details (nonce, recipient, amount)blockrun-payment:{nonce}:{recipient}:{amount} with your Ed25519 private keyPrivacy: Your private key never leaves your NOFX instance. Only the cryptographic signature is sent.
| Model ID | Provider | Use Case |
|---|---|---|
gpt-5.4 | OpenAI | Flagship (default) |
claude-opus-4.6 | Anthropic | Flagship |
gemini-3.1-pro | Flagship | |
grok-3 | xAI | Flagship |
deepseek-chat | DeepSeek | Flagship |
minimax-m2.5 | MiniMax | Flagship |
| Issue | Solution |
|---|---|
unexpected key length | Ensure you exported the full 64-byte keypair (not just the 32-byte seed) |
failed to decode base58 | Key must be base58 encoded (standard Phantom/Solflare export format) |
payment retry failed | Ensure you have USDC on Solana mainnet (not devnet) |
| No response from server | Check sol.blockrun.ai is reachable from your server |
| Slow responses | Try selecting a specific model instead of "Auto" |
Check your USDC balance and transaction history at: