Skip to content

Add BlockRun.AI as LLM Provider (x402 Micropayments)#1

Open
1bcMax wants to merge 1 commit intostormulv:mainfrom
1bcMax:add-blockrun-provider
Open

Add BlockRun.AI as LLM Provider (x402 Micropayments)#1
1bcMax wants to merge 1 commit intostormulv:mainfrom
1bcMax:add-blockrun-provider

Conversation

@1bcMax
Copy link
Copy Markdown

@1bcMax 1bcMax commented Jan 10, 2026

Summary

BlockRun.AI is a pay-per-request AI gateway using x402 micropayments on Base chain. This PR adds BlockRun as an alternative payment method alongside traditional OpenAI API keys.

Benefits:

  • Pay-per-request in USDC - no monthly subscriptions or API key management
  • Access GPT-4o, Claude, Gemini, DeepSeek via single integration
  • Private key never leaves machine - only EIP-712 signatures transmitted

Changes

  • agents/blockrun_chat.py: LangChain-compatible BlockRunChat class
  • agents/application/executor.py: Support for blockrun/ prefixed models
  • .env.example: Added BLOCKRUN_WALLET_KEY configuration
  • requirements.txt: Added blockrun-llm>=0.1.0 dependency
  • README.md: Documented BlockRun payment option with usage examples

Usage

# Use BlockRun with GPT-4o
python -m scripts.python.cli ask-llm "What markets look interesting?" --model blockrun/openai/gpt-4o

# Use BlockRun with Claude
python -m scripts.python.cli ask-llm "Analyze this market" --model blockrun/anthropic/claude-sonnet-4

Testing

  • ✅ Syntax validation passed
  • ✅ Import tests passed
  • ✅ End-to-end API call with openai/gpt-4o-mini

Links

BlockRun.AI is a pay-per-request AI gateway using x402 micropayments
on Base chain. This PR adds support for BlockRun as an alternative
payment method alongside traditional OpenAI API keys.

Changes:
- Add agents/blockrun_chat.py: LangChain-compatible ChatModel wrapper
- Update executor.py: Support blockrun/ prefixed models
- Update .env.example: Add BLOCKRUN_WALLET_KEY config
- Update requirements.txt: Add blockrun-llm dependency
- Update README.md: Document BlockRun payment option

Usage:
Use blockrun/ prefix in model name, e.g., "blockrun/openai/gpt-4o"
and configure BLOCKRUN_WALLET_KEY in .env

Benefits:
- Pay-per-request in USDC (no monthly subscriptions)
- Access GPT-4o, Claude, Gemini, DeepSeek via single integration
- Private key never leaves machine (EIP-712 signing only)
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to Polymarket Agents. Thank you for creating your first PR. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant