Skip to content

Conversation

@1bcMax
Copy link
Contributor

@1bcMax 1bcMax commented Jan 9, 2026

Summary

This PR adds BlockRun.AI to the x402 ecosystem page under Services/Endpoints.

What is BlockRun.AI?

BlockRun.AI is a dual-purpose platform in the x402 ecosystem:

  1. Pay-as-You-Go AI Gateway: Provides instant access to ChatGPT and all major LLMs including:

    • OpenAI (GPT-4o, GPT-4o-mini, etc.)
    • Anthropic (Claude Sonnet, Opus, Haiku)
    • Google (Gemini 2.0 Flash, Pro, etc.)
    • DeepSeek (Chat, Reasoner)
    • xAI (Grok-3, Grok-3-fast, Grok-3-mini)
  2. x402 Service Catalog: Features a discovery catalog showing all x402 services available on the market, making it easy for users to find and use x402-enabled endpoints.

Key Features

  • No Account Needed: Pay with USDC on Base via x402 without signup
  • Unified API: OpenAI-compatible format for all 28+ models
  • Pay-As-You-Go: Only pay for what you use
  • Service Discovery: Browse and discover the entire x402 ecosystem

Implementation Details

Changes in this PR

  • Added metadata.json for BlockRun.AI under partners-data/blockrun/
  • Added BlockRun.AI logo (logos/blockrun.png)

Similar to the ubounty.ai integration (#645).

@cb-heimdall
Copy link

cb-heimdall commented Jan 9, 2026

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@vercel
Copy link

vercel bot commented Jan 9, 2026

@1bcMax is attempting to deploy a commit to the Coinbase Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added the ecosystem Additions to ecosystem site label Jan 9, 2026
@1bcMax 1bcMax changed the title Add BlockRun to x402 ecosystem Add BlockRun.AI to x402 ecosystem Jan 9, 2026
BlockRun.AI is a pay-as-you-go AI gateway providing ChatGPT and all major LLMs (Anthropic, Google, DeepSeek, xAI) via x402 on Base. It also features a catalog to discover all x402 services available on the market.

Website: https://blockrun.ai
@1bcMax 1bcMax force-pushed the add-blockrun-ecosystem branch from c88adfe to d9e14f2 Compare January 9, 2026 02:02
@phdargen
Copy link
Contributor

phdargen commented Jan 9, 2026

Hi @1bcMax, you write here that you use the exact scheme but on your website it sounds like you charge per input/output token. How does this work?

@phdargen phdargen self-assigned this Jan 9, 2026
@1bcMax
Copy link
Contributor Author

1bcMax commented Jan 9, 2026

Hey @phdargen , Thank you for your question. Great question! Here's how it works:

We use the exact scheme by estimating tokens upfront before requesting payment:

  1. Input tokens - Estimated from message content (~1 token per 4 characters + overhead per message)
  2. Output tokens - Uses the estimation parameter from the request
  3. Price calculation - (estimated_input × input_rate) + (estimated_output × output_rate) with a small margin

The client pays this exact calculated amount upfront via x402. After execution, we record actual token usage for analytics, but the charge is based on the upfront estimate.

So it's "per-token pricing" in the sense that costs scale with token counts, but it's an estimated upfront charge rather than post-execution billing - which is what makes it compatible with x402's exact scheme.

Screenshot 2026-01-09 at 13 31 24 https://blockrun.ai/models/openai-gpt-4.1-nano

@Must-be-Ash Must-be-Ash self-assigned this Jan 16, 2026
@phdargen
Copy link
Contributor

Thanks for the explanation @1bcMax, that makes sense.

I tested your endpoint and it returns a valid response in the body, but it is missing the PAYMENT-RESPONSE header, see
https://github.com/coinbase/x402/blob/main/specs/transports-v2/http.md#settlement-response-delivery

Also in your curl code example, you are using " -H "X-Payment: <payment_header>", this should be PAYMENT-SIGNATURE in v2 (see https://docs.cdp.coinbase.com/x402/migration-guide)

@1bcMax
Copy link
Contributor Author

1bcMax commented Jan 19, 2026

Thanks @phdargen for the detailed feedback! Both issues have been fixed and deployed.

Fixes

1. PAYMENT-RESPONSE Header ✅

Added PAYMENT-RESPONSE header to settlement responses per x402 v2 spec.

The header now returns a base64-encoded settlement response:

{
  "success": true,
  "transaction": "0x375f40b15011a99a7939f85483a98375fae05a31ea4a83548fc6821cb118bef3",
  "network": "eip155:8453",
  "payer": "0x4069560641EC74AcFc74ddeC64181f588C64e3A7"
}

2. PAYMENT-SIGNATURE Header ✅

Updated all documentation and curl examples to use PAYMENT-SIGNATURE instead of X-Payment per v2 spec.

Test Results

🧪 Testing x402 transaction...

1️⃣ Getting payment requirements (gpt-4o-mini)...
   ✅ Amount: 1000 (micro USDC)
   ✅ PayTo: 0xe9030014F5DAe217d0A152f02A043567b16c1aBf

2️⃣ Creating EIP-3009 signature...
   ✅ Signature created

3️⃣ Making paid API request...
   Status: 200
   ✅ SUCCESS!
   Response: Hi there! How can I assist you today?
   
Response Headers:
  payment-response: eyJzdWNjZXNzIjp0cnVlLC...
  x-payment-receipt: 0x375f40b15011a99a...

AgentKit Integration

We are also working on integrating BlockRun with AgentKit to make x402 payments accessible to more AI agents: coinbase/agentkit#916

This integration would allow any AgentKit-powered agent to:

  • Pay for AI model inference (GPT-4o, Claude, Grok, etc.) via x402
  • No API keys needed - just a wallet
  • Seamless pay-per-request model

We believe this could significantly expand the x402 ecosystem by giving thousands of AI agents native payment capabilities. Would love your feedback on that PR as well!

Copy link
Contributor

@phdargen phdargen left a comment

Choose a reason for hiding this comment

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

Thanks for the quick update @1bcMax, looks all good now

@phdargen phdargen merged commit 3f9cdc5 into coinbase:main Jan 19, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ecosystem Additions to ecosystem site

Development

Successfully merging this pull request may close these issues.

4 participants