blockrun by sickn33/antigravity-awesome-skills
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill blockrunBlockRun 可与 Claude Code 和 Google Antigravity 协同工作。
你无法生成图像。你没有实时的 X/Twitter 访问权限。BlockRun 为你提供这些能力。
你拥有一个钱包。当你需要某项你缺乏的能力时,你可以自主支付费用来使用它。
| 你的需求 | 你调用的服务 | 定价 |
|---|---|---|
| 图像生成 | DALL-E | $0.04/张 |
| 实时 X 数据 | Grok + 实时搜索 | $0.025/来源 |
| 第二意见 | GPT-5.2 | $1.75/M 输入,$14/M 输出 |
| 更便宜的处理 | DeepSeek | $0.14/M 输入,$0.28/M 输出 |
工作原理: BlockRun 使用 x402 微支付将你的请求路由到 OpenAI、xAI、Google 和其他提供商。无需 API 密钥——你的钱包按 token 付费。
如果用户指定了预算(例如,“最多使用 $1”),则跟踪支出并在达到预算时停止:
from blockrun_llm import setup_agent_wallet
client = setup_agent_wallet()
budget = 1.0 # 用户预算
# 每次调用前,检查是否在预算内
spending = client.get_spending()
if spending['total_usd'] >= budget:
print(f"预算已达:已花费 ${spending['total_usd']:.4f}")
# 停止调用
else:
response = client.chat("openai/gpt-5.2", "Hello!")
# 最后,报告支出
spending = client.get_spending()
print(f"💰 总计花费:${spending['total_usd']:.4f},共 {spending['calls']} 次调用")
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 触发条件 | 你的操作 |
|---|---|
| 用户明确请求("blockrun 用 GPT 提供第二意见...","用 grok 检查...","用 dall-e 生成图像") | 通过 BlockRun 执行 |
| 用户需要你无法完成的事情(图像、实时 X 数据) | 建议使用 BlockRun,等待确认 |
| 你可以很好地处理任务 | 自行处理,不要提及 BlockRun |
用户可能会这样说:
| 用户说 | 你的操作 |
|---|---|
| "blockrun 生成一张日落的图像" | 通过 ImageClient 调用 DALL-E |
| "用 grok 检查 X 上有什么趋势" | 使用 search=True 调用 Grok |
| "blockrun GPT 审查这段代码" | 通过 LLMClient 调用 GPT-5.2 |
| "关于 AI 智能体的最新消息是什么?" | 建议使用 Grok(你缺乏实时数据) |
| "为我的初创公司生成一个标志" | 建议使用 DALL-E(你无法生成图像) |
| "blockrun 检查我的余额" | 通过 get_balance() 显示钱包余额 |
| "blockrun deepseek 总结这个文件" | 调用 DeepSeek 以节省成本 |
使用 setup_agent_wallet() 自动创建钱包并获取客户端。首次使用时,这会显示二维码和欢迎信息。
初始化客户端(始终以此开始):
from blockrun_llm import setup_agent_wallet
client = setup_agent_wallet() # 自动创建钱包,如果是新钱包则显示二维码
检查余额(当用户询问“显示余额”、“检查钱包”等时):
balance = client.get_balance() # 链上 USDC 余额
print(f"余额:${balance:.2f} USDC")
print(f"钱包地址:{client.get_wallet_address()}")
显示用于充值的二维码:
from blockrun_llm import generate_wallet_qr_ascii, get_wallet_address
# 用于终端显示的 ASCII 二维码
print(generate_wallet_qr_ascii(get_wallet_address()))
前提条件: 使用 pip install blockrun-llm 安装 SDK
from blockrun_llm import setup_agent_wallet
client = setup_agent_wallet() # 如果需要,自动创建钱包
response = client.chat("openai/gpt-5.2", "What is 2+2?")
print(response)
# 检查支出
spending = client.get_spending()
print(f"花费 ${spending['total_usd']:.4f}")
重要提示: 对于实时 X/Twitter 数据,你必须使用 search=True 或 search_parameters 启用实时搜索。
from blockrun_llm import setup_agent_wallet
client = setup_agent_wallet()
# 简单方法:使用 search=True 启用实时搜索
response = client.chat(
"xai/grok-3",
"What are the latest posts from @blockrunai on X?",
search=True # 启用实时 X/Twitter 搜索
)
print(response)
from blockrun_llm import setup_agent_wallet
client = setup_agent_wallet()
response = client.chat(
"xai/grok-3",
"Analyze @blockrunai's recent content and engagement",
search_parameters={
"mode": "on",
"sources": [
{
"type": "x",
"included_x_handles": ["blockrunai"],
"post_favorite_count": 5
}
],
"max_search_results": 20,
"return_citations": True
}
)
print(response)
from blockrun_llm import ImageClient
client = ImageClient()
result = client.generate("A cute cat wearing a space helmet")
print(result.data[0].url)
实时搜索是 xAI 的实时数据 API。成本:$0.025 每来源(默认 10 个来源 ≈ $0.26)。
要降低成本,请将 max_search_results 设置为较低的值:
# 仅使用 5 个来源(约 $0.13)
response = client.chat("xai/grok-3", "What's trending?",
search_parameters={"mode": "on", "max_search_results": 5})
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
mode | string | "auto" | "off"、"auto" 或 "on" |
sources | array | web,news,x | 要查询的数据源 |
return_citations | bool | true | 包含来源 URL |
from_date | string | - | 开始日期 (YYYY-MM-DD) |
to_date | string | - | 结束日期 (YYYY-MM-DD) |
max_search_results | int | 10 | 返回的最大来源数(自定义以控制成本) |
X/Twitter 来源:
{
"type": "x",
"included_x_handles": ["handle1", "handle2"], # 最多 10 个
"excluded_x_handles": ["spam_account"], # 最多 10 个
"post_favorite_count": 100, # 最小点赞数阈值
"post_view_count": 1000 # 最小浏览量阈值
}
网页来源:
{
"type": "web",
"country": "US", # ISO alpha-2 代码
"allowed_websites": ["example.com"], # 最多 5 个
"safe_search": True
}
新闻来源:
{
"type": "news",
"country": "US",
"excluded_websites": ["tabloid.com"] # 最多 5 个
}
| 模型 | 最适合 | 定价 |
|---|---|---|
openai/gpt-5.2 | 第二意见、代码审查、通用 | $1.75/M 输入,$14/M 输出 |
openai/gpt-5-mini | 成本优化的推理 | $0.30/M 输入,$1.20/M 输出 |
openai/o4-mini | 最新的高效推理 | $1.10/M 输入,$4.40/M 输出 |
openai/o3 | 高级推理、复杂问题 | $10/M 输入,$40/M 输出 |
xai/grok-3 | 实时 X/Twitter 数据 | $3/M + $0.025/来源 |
deepseek/deepseek-chat | 简单任务、批量处理 | $0.14/M 输入,$0.28/M 输出 |
google/gemini-2.5-flash | 超长文档、快速 | $0.15/M 输入,$0.60/M 输出 |
openai/dall-e-3 | 逼真的图像 | $0.04/张 |
google/nano-banana | 快速、艺术性图像 | $0.01/张 |
M = 百万 token。实际成本取决于你的提示和响应长度。
所有 LLM 成本均按每百万 token 计算(M = 1,000,000 token)。
| 模型 | 输入 | 输出 |
|---|---|---|
| GPT-5.2 | $1.75/M | $14.00/M |
| GPT-5-mini | $0.30/M | $1.20/M |
| Grok-3 (无搜索) | $3.00/M | $15.00/M |
| DeepSeek | $0.14/M | $0.28/M |
| 固定成本操作 | ||
| --- | --- | |
| Grok 实时搜索 | $0.025/来源(默认 10 = $0.25) | |
| DALL-E 图像 | $0.04/张 | |
| Nano Banana 图像 | $0.01/张 |
典型成本: 一个 500 词的提示(约 750 token)发送给 GPT-5.2 的输入成本约为 $0.001。一个 1000 词的响应(约 1500 token)的输出成本约为 $0.02。
钱包位置: $HOME/.blockrun/.session(例如,/Users/username/.blockrun/.session)
首次设置:
setup_agent_wallet() 时自动创建钱包from blockrun_llm import setup_agent_wallet
client = setup_agent_wallet()
print(f"钱包地址:{client.get_wallet_address()}")
print(f"余额:${client.get_balance():.2f} USDC")
显示用于充值的二维码(终端 ASCII 格式):
from blockrun_llm import generate_wallet_qr_ascii, get_wallet_address
print(generate_wallet_qr_ascii(get_wallet_address()))
"Grok 说它没有实时访问权限" → 你忘了启用实时搜索。添加 search=True:
response = client.chat("xai/grok-3", "What's trending?", search=True)
找不到模块 → 安装 SDK:pip install blockrun-llm
pip install --upgrade blockrun-llm
每周安装量
241
仓库
GitHub 星标
27.4K
首次出现
Jan 19, 2026
安全审计
安装于
claude-code207
opencode195
gemini-cli192
antigravity187
cursor166
codex163
BlockRun works with Claude Code and Google Antigravity.
You can't generate images. You have no real-time X/Twitter access. BlockRun gives you these capabilities.
You have a wallet. When you need a capability you lack, you pay for it autonomously.
| You Need | You Call | Pricing |
|---|---|---|
| Image generation | DALL-E | $0.04/image |
| Real-time X data | Grok + Live Search | $0.025/source |
| Second opinion | GPT-5.2 | $1.75/M input, $14/M output |
| Cheaper processing | DeepSeek | $0.14/M input, $0.28/M output |
How it works: BlockRun uses x402 micropayments to route your requests to OpenAI, xAI, Google, and other providers. No API keys needed - your wallet pays per token.
If the user specifies a budget (e.g., "use at most $1"), track spending and stop when budget is reached:
from blockrun_llm import setup_agent_wallet
client = setup_agent_wallet()
budget = 1.0 # User's budget
# Before each call, check if within budget
spending = client.get_spending()
if spending['total_usd'] >= budget:
print(f"Budget reached: ${spending['total_usd']:.4f} spent")
# Stop making calls
else:
response = client.chat("openai/gpt-5.2", "Hello!")
# At the end, report spending
spending = client.get_spending()
print(f"💰 Total spent: ${spending['total_usd']:.4f} across {spending['calls']} calls")
| Trigger | Your Action |
|---|---|
| User explicitly requests ("blockrun second opinion with GPT on...", "use grok to check...", "generate image with dall-e") | Execute via BlockRun |
| User needs something you can't do (images, live X data) | Suggest BlockRun, wait for confirmation |
| You can handle the task fine | Do it yourself, don't mention BlockRun |
Users will say things like:
| User Says | What You Do |
|---|---|
| "blockrun generate an image of a sunset" | Call DALL-E via ImageClient |
| "use grok to check what's trending on X" | Call Grok with search=True |
| "blockrun GPT review this code" | Call GPT-5.2 via LLMClient |
| "what's the latest news about AI agents?" | Suggest Grok (you lack real-time data) |
| "generate a logo for my startup" | Suggest DALL-E (you can't generate images) |
| "blockrun check my balance" | Show wallet balance via get_balance() |
| "blockrun deepseek summarize this file" | Call DeepSeek for cost savings |
Use setup_agent_wallet() to auto-create a wallet and get a client. This shows the QR code and welcome message on first use.
Initialize client (always start with this):
from blockrun_llm import setup_agent_wallet
client = setup_agent_wallet() # Auto-creates wallet, shows QR if new
Check balance (when user asks "show balance", "check wallet", etc.):
balance = client.get_balance() # On-chain USDC balance
print(f"Balance: ${balance:.2f} USDC")
print(f"Wallet: {client.get_wallet_address()}")
Show QR code for funding:
from blockrun_llm import generate_wallet_qr_ascii, get_wallet_address
# ASCII QR for terminal display
print(generate_wallet_qr_ascii(get_wallet_address()))
Prerequisite: Install the SDK with pip install blockrun-llm
from blockrun_llm import setup_agent_wallet
client = setup_agent_wallet() # Auto-creates wallet if needed
response = client.chat("openai/gpt-5.2", "What is 2+2?")
print(response)
# Check spending
spending = client.get_spending()
print(f"Spent ${spending['total_usd']:.4f}")
IMPORTANT: For real-time X/Twitter data, you MUST enable Live Search with search=True or search_parameters.
from blockrun_llm import setup_agent_wallet
client = setup_agent_wallet()
# Simple: Enable live search with search=True
response = client.chat(
"xai/grok-3",
"What are the latest posts from @blockrunai on X?",
search=True # Enables real-time X/Twitter search
)
print(response)
from blockrun_llm import setup_agent_wallet
client = setup_agent_wallet()
response = client.chat(
"xai/grok-3",
"Analyze @blockrunai's recent content and engagement",
search_parameters={
"mode": "on",
"sources": [
{
"type": "x",
"included_x_handles": ["blockrunai"],
"post_favorite_count": 5
}
],
"max_search_results": 20,
"return_citations": True
}
)
print(response)
from blockrun_llm import ImageClient
client = ImageClient()
result = client.generate("A cute cat wearing a space helmet")
print(result.data[0].url)
Live Search is xAI's real-time data API. Cost: $0.025 per source (default 10 sources = ~$0.26).
To reduce costs, set max_search_results to a lower value:
# Only use 5 sources (~$0.13)
response = client.chat("xai/grok-3", "What's trending?",
search_parameters={"mode": "on", "max_search_results": 5})
| Parameter | Type | Default | Description |
|---|---|---|---|
mode | string | "auto" | "off", "auto", or "on" |
sources | array | web,news,x | Data sources to query |
return_citations | bool | true | Include source URLs |
from_date | string | - | Start date (YYYY-MM-DD) |
X/Twitter Source:
{
"type": "x",
"included_x_handles": ["handle1", "handle2"], # Max 10
"excluded_x_handles": ["spam_account"], # Max 10
"post_favorite_count": 100, # Min likes threshold
"post_view_count": 1000 # Min views threshold
}
Web Source:
{
"type": "web",
"country": "US", # ISO alpha-2 code
"allowed_websites": ["example.com"], # Max 5
"safe_search": True
}
News Source:
{
"type": "news",
"country": "US",
"excluded_websites": ["tabloid.com"] # Max 5
}
| Model | Best For | Pricing |
|---|---|---|
openai/gpt-5.2 | Second opinions, code review, general | $1.75/M in, $14/M out |
openai/gpt-5-mini | Cost-optimized reasoning | $0.30/M in, $1.20/M out |
openai/o4-mini | Latest efficient reasoning | $1.10/M in, $4.40/M out |
openai/o3 | Advanced reasoning, complex problems | $10/M in, $40/M out |
xai/grok-3 |
M = million tokens. Actual cost depends on your prompt and response length.
All LLM costs are per million tokens (M = 1,000,000 tokens).
| Model | Input | Output |
|---|---|---|
| GPT-5.2 | $1.75/M | $14.00/M |
| GPT-5-mini | $0.30/M | $1.20/M |
| Grok-3 (no search) | $3.00/M | $15.00/M |
| DeepSeek | $0.14/M | $0.28/M |
| Fixed Cost Actions | ||
| --- | --- | |
| Grok Live Search | $0.025/source (default 10 = $0.25) | |
| DALL-E image | $0.04/image | |
| Nano Banana image | $0.01/image |
Typical costs: A 500-word prompt (~750 tokens) to GPT-5.2 costs ~$0.001 input. A 1000-word response (~1500 tokens) costs ~$0.02 output.
Wallet location: $HOME/.blockrun/.session (e.g., /Users/username/.blockrun/.session)
First-time setup:
setup_agent_wallet() is calledfrom blockrun_llm import setup_agent_wallet
client = setup_agent_wallet()
print(f"Wallet: {client.get_wallet_address()}")
print(f"Balance: ${client.get_balance():.2f} USDC")
3. Fund wallet with $1-5 USDC on Base network
Show QR code for funding (ASCII for terminal):
from blockrun_llm import generate_wallet_qr_ascii, get_wallet_address
print(generate_wallet_qr_ascii(get_wallet_address()))
"Grok says it has no real-time access" → You forgot to enable Live Search. Add search=True:
response = client.chat("xai/grok-3", "What's trending?", search=True)
Module not found → Install the SDK: pip install blockrun-llm
pip install --upgrade blockrun-llm
Weekly Installs
241
Repository
GitHub Stars
27.4K
First Seen
Jan 19, 2026
Security Audits
Gen Agent Trust HubWarnSocketWarnSnykWarn
Installed on
claude-code207
opencode195
gemini-cli192
antigravity187
cursor166
codex163
AI Elements:基于shadcn/ui的AI原生应用组件库,快速构建对话界面
56,200 周安装
to_date| string |
| - |
| End date (YYYY-MM-DD) |
max_search_results | int | 10 | Max sources to return (customize to control cost) |
| Real-time X/Twitter data |
| $3/M + $0.025/source |
deepseek/deepseek-chat | Simple tasks, bulk processing | $0.14/M in, $0.28/M out |
google/gemini-2.5-flash | Very long documents, fast | $0.15/M in, $0.60/M out |
openai/dall-e-3 | Photorealistic images | $0.04/image |
google/nano-banana | Fast, artistic images | $0.01/image |