feat: Add BlockRun as AI provider with x402 micropayments#24
Merged
arbitrageprophet merged 1 commit intoPredictionXBT:mainfrom Jan 15, 2026
Merged
Conversation
Adds BlockRun integration for wallet-based pay-per-request AI access. No API keys required - users bring their own Base chain wallet. Key benefits: - No API key management - Cost transparency with on-chain micropayments - Privacy/self-custody (keys never leave user's machine) - Access to 20+ models (OpenAI, Anthropic, xAI, Google, DeepSeek) Usage: - Set BLOCKRUN_WALLET_KEY (Base chain private key) - Use models like "blockrun/gpt-4o", "blockrun/claude-sonnet-4" Files changed: - New: _shared/ai/callBlockRun.ts - BlockRun provider module - Modified: _shared/ai/types.ts - BlockRun type definitions - Modified: event-analysis-agent/index.ts - BlockRun provider support - Modified: event-analysis-agent/types.ts - paymentCost metadata - Modified: .env.example - BLOCKRUN_WALLET_KEY documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds BlockRun as a new AI provider option alongside OpenAI and Grok. BlockRun enables wallet-based pay-per-request AI access via x402 micropayments — no API keys required.
Key Benefits:
Changes
_shared/ai/callBlockRun.ts_shared/ai/types.tsevent-analysis-agent/index.tsevent-analysis-agent/types.tspaymentCostmetadata field.env.exampleBLOCKRUN_WALLET_KEYdocumentationUsage
BLOCKRUN_WALLET_KEYenvironment variable (Base chain private key, 0x-prefixed)blockrun/gpt-4o,blockrun/claude-sonnet-4,blockrun/grok-3Available BlockRun Models
blockrun/gpt-4o,blockrun/gpt-4o-miniblockrun/claude-sonnet-4,blockrun/claude-opus-4blockrun/grok-3,blockrun/grok-3-miniblockrun/gemini-2.5-pro,blockrun/gemini-2.5-flashblockrun/deepseek-chat,blockrun/deepseek-reasonerTest Plan
deno check)Links