BridgeNode

AI inference qua x402. Thanh toán bằng Solana USDC. Không cần đăng ký. Không cần khóa API.

Tài liệu

BridgeNode — Full Agent Guide

AI inference bridge for AI agents. No API keys, no registration, no subscriptions. Pay per request with Solana USDC via x402 (HTTP 402). Transaction fees are sponsored — the agent only needs USDC.

Endpoints

Models & Pricing

Prices are in USDC per token (6 decimals). Live prices: GET https://bridgenode.cc/v1/models.

ModelInput / tokenOutput / tokenContext windowMax output
deepseek-v4-flash$0.00000020$0.000000401,048,5768,192
deepseek-v4-pro$0.00000050$0.000001001,048,5768,192
groq-llama-3.3-70b$0.00000079$0.00000099131,07232,768

Pricing model: exact scheme — the agent pays for input tokens + max_tokens before processing. Minimum charge per request: 2000 atomic units = $0.002 USDC.

Payment Flow (x402 V2, exact scheme)

  1. Send the request without payment headers.
  2. Server responds 402 Payment Required with a PAYMENT-REQUIRED header (base64 JSON): price, payTo address, USDC mint, memo, recent blockhash.
  3. Agent constructs a partial transaction: USDC TransferChecked (amount = required) + Memo instruction, signs with its own wallet. Fee payer is NOT signed by the agent.
  4. Agent retries the request with PAYMENT-SIGNATURE header (base64 JSON payload with the signed transaction).
  5. Server verifies the payment and processes the request (fees sponsored — gasless for the agent).
  6. Response is 200 with PAYMENT-RESPONSE header (settlement receipt).
  • Network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp (Solana mainnet)
  • Asset: USDC EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
  • The agent must have an existing USDC ATA; it does not need SOL (BridgeNode sponsors fees).
  • Use official x402 SDKs (@x402/svm, x402[svm]) or any x402-capable client — they handle 402 → sign → retry automatically.

Quick Start (curl)

curl https://bridgenode.cc/v1/chat/completions   -H "Content-Type: application/json"   -d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"hello"}],"max_tokens":100}'

Response: 402 with PAYMENT-REQUIRED header. Sign the partial transaction with an x402-capable client and retry with PAYMENT-SIGNATURE header. Response: 200 with the completion.

SDKs

All SDKs handle the x402 payment handshake automatically, with fail-closed spending limits (BRIDGENODE_MAX_PER_CALL, BRIDGENODE_DAILY_CAP).

MCP Usage

  • One-line install: claude mcp add bridgenode -s user -- npx -y @bridgenode/mcp@latest
  • Server URL: https://bridgenode.cc/mcp (streamable-http)
  • Tool: chat_completions (model, mode, messages, max_tokens)
  • Payment: x402 handshake per tool call; always check the actual amount in the 402 response before signing.

Errors

StatusMeaning
400Bad request (unknown model, invalid body, oversized non-stream max_tokens)
402Payment required — see PAYMENT-REQUIRED header
413Request body too large (limit 2 MB)
429Too many requests (queue limit)
503Service busy — retry with backoff

Discovery

Notes

  • Refunds: if the provider fails before any content is delivered, the payment is refunded automatically (reverse USDC transfer).
  • Reasoning models: use max_tokens >= 200 — a too-small limit can produce an EMPTY answer; empty answers are NOT refunded (service provided).