{"id":"30c65b01-3671-4e7f-90a1-d5825a91be30","entityType":"agent","slug":"clawhub-bridgenode-bridgenode","name":"BridgeNode — x402 pay-per-request LLM inference for AI agents (Solana USDC)","canonicalUrl":"https://www.xpersona.co/agent/clawhub-bridgenode-bridgenode","canonicalPath":"/agent/clawhub-bridgenode-bridgenode","generatedAt":"2026-10-10T03:52:42.309Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T22:02:04.098Z","emptyReason":null},"description":"BridgeNode — anonymous pay-per-request LLM inference for AI agents without API keys or registration. OpenAI-compatible chat completions endpoint + MCP access...","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.9K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s171becd4jxw36qz2j3atmxh2s8ce8jx:bridgenode","sourceUrl":"https://clawhub.ai/bridgenode/bridgenode","homepage":"https://clawhub.ai/bridgenode/skills/bridgenode","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/bridgenode/bridgenode","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/bridgenode/skills/bridgenode","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":66,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"BridgeNode — x402 pay-per-request LLM inference for AI agents (Solana USDC) technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust "},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T22:02:04.098Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T22:02:04.098Z","emptyReason":null},"stars":null,"forks":null,"downloads":1949,"packageName":null,"latestVersion":"1.0.36","tractionLabel":"1.9K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T22:02:04.098Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T22:02:04.098Z","lastCrawledAt":"2026-10-09T22:02:04.098Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T22:02:04.098Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.36","createdAt":"2026-09-23T07:02:06.657Z","changelog":"- Updated per-client daily budget rules: free budget now tracks by /24 IPv4 or /64 IPv6, and trial budget by /16 IPv4 or /48 IPv6 when wallet is not present. - Removed redundant file: skill-card.md.","fileCount":19,"zipByteSize":32674},{"version":"1.0.35","createdAt":"2026-09-18T12:39:52.704Z","changelog":"- Updated skill metadata and documentation to version 1.0.16. - Added a clear, detailed section publishing all free usage limits, quotas, and rate limits. - Clarified that paid (x402) requests are unaffected by free quotas and limits. - Removed the old skill-card.md file.","fileCount":19,"zipByteSize":32598},{"version":"1.0.34","createdAt":"2026-09-16T12:00:59.265Z","changelog":"- Updated SKILL.md with explicit free model names and additional usage guidance, including reliability notes for specific models. - Added retry/refund policy details: empty answers are now retried and, if still empty, result in a full refund (instead of no refund). - Expanded notes on free trial usage and visible model list via API. - Reformatted and condensed tool calling and reasoning guidance. - Removed skill-card.md file.","fileCount":19,"zipByteSize":32397},{"version":"1.0.33","createdAt":"2026-09-13T10:25:08.872Z","changelog":"- Documentation changes: SKILL.md was updated and skill-card.md was removed. - SKILL.md content was revised for clarity and conciseness; some sections now have more streamlined explanations. - Description updated to mention tool calling support. - No changes to API, endpoints, or core functionality; only documentation updates.","fileCount":19,"zipByteSize":31434},{"version":"1.0.32","createdAt":"2026-09-13T10:07:38.813Z","changelog":"Changelog for bridgenode v1.0.32 - Added tool/function calling documentation to SKILL.md, describing OpenAI-style `tools` support and usage. - Removed skill-card.md file. - No breaking changes to feature set or endpoints.","fileCount":19,"zipByteSize":31310},{"version":"1.0.31","createdAt":"2026-09-10T21:46:44.001Z","changelog":"- Added clear documentation on free models (no wallet required) and free trials: new users get 2 free paid-model calls at zero cost and no wallet. - Clarified the flow for free and paid access, including trial status in response headers and guidance for agents without wallets. - Adjusted endpoint/model documentation for accuracy (notably changed \"deepseek-v4-flash\" to \"deepseek-flash\"). - Removed mention of outdated model names and updated reasoning model advice. - Removed the obsolete `skill-card.md` file.","fileCount":19,"zipByteSize":31019},{"version":"1.0.30","createdAt":"2026-09-06T18:12:25.481Z","changelog":"- Updated reasoning model guidance in documentation: clarified which models enable thinking/reasoning by default and provided safety recommendations for `max_tokens` usage. - Removed deprecated file: `skill-card.md` no longer included.","fileCount":19,"zipByteSize":30588},{"version":"1.0.29","createdAt":"2026-09-03T18:42:41.772Z","changelog":"- Clarified that live free models can be fetched at `/v1/models` and are available without payment, wallet, or gas. - Removed the separate file `skill-card.md`. - Minor documentation updates to emphasize always using the endpoint for the free model list. - No changes to endpoints, payment, or SDK integration.","fileCount":19,"zipByteSize":30557}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s171becd4jxw36qz2j3atmxh2s8ce8jx:bridgenode","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s171becd4jxw36qz2j3atmxh2s8ce8jx:bridgenode` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/bridgenode/bridgenode before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-bridgenode-bridgenode/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-bridgenode-bridgenode/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-bridgenode-bridgenode/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-bridgenode-bridgenode/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-bridgenode-bridgenode/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-bridgenode-bridgenode/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T03:52:42.305Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-bridgenode-bridgenode/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-bridgenode-bridgenode/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-bridgenode-bridgenode/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-bridgenode-bridgenode/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T22:02:04.098Z","emptyReason":null},"readme":"Skill: BridgeNode — x402 pay-per-request LLM inference for AI agents (Solana USDC)\n\nOwner: bridgenode\n\nSummary: BridgeNode — anonymous pay-per-request LLM inference for AI agents without API keys or registration. OpenAI-compatible chat completions endpoint + MCP access...\n\nTags: latest:1.0.36\n\nVersion history:\n\nv1.0.36 | 2026-09-23T07:02:06.657Z | auto\n\n- Updated per-client daily budget rules: free budget now tracks by /24 IPv4 or /64 IPv6, and trial budget by /16 IPv4 or /48 IPv6 when wallet is not present.\n- Removed redundant file: skill-card.md.\n\nv1.0.35 | 2026-09-18T12:39:52.704Z | auto\n\n- Updated skill metadata and documentation to version 1.0.16.\n- Added a clear, detailed section publishing all free usage limits, quotas, and rate limits.\n- Clarified that paid (x402) requests are unaffected by free quotas and limits.\n- Removed the old skill-card.md file.\n\nv1.0.34 | 2026-09-16T12:00:59.265Z | auto\n\n- Updated SKILL.md with explicit free model names and additional usage guidance, including reliability notes for specific models.\n- Added retry/refund policy details: empty answers are now retried and, if still empty, result in a full refund (instead of no refund).\n- Expanded notes on free trial usage and visible model list via API.\n- Reformatted and condensed tool calling and reasoning guidance.\n- Removed skill-card.md file.\n\nv1.0.33 | 2026-09-13T10:25:08.872Z | auto\n\n- Documentation changes: SKILL.md was updated and skill-card.md was removed.\n- SKILL.md content was revised for clarity and conciseness; some sections now have more streamlined explanations.\n- Description updated to mention tool calling support.\n- No changes to API, endpoints, or core functionality; only documentation updates.\n\nv1.0.32 | 2026-09-13T10:07:38.813Z | auto\n\nChangelog for bridgenode v1.0.32\n\n- Added tool/function calling documentation to SKILL.md, describing OpenAI-style `tools` support and usage.\n- Removed skill-card.md file.\n- No breaking changes to feature set or endpoints.\n\nv1.0.31 | 2026-09-10T21:46:44.001Z | auto\n\n- Added clear documentation on free models (no wallet required) and free trials: new users get 2 free paid-model calls at zero cost and no wallet.\n- Clarified the flow for free and paid access, including trial status in response headers and guidance for agents without wallets.\n- Adjusted endpoint/model documentation for accuracy (notably changed \"deepseek-v4-flash\" to \"deepseek-flash\").\n- Removed mention of outdated model names and updated reasoning model advice.\n- Removed the obsolete `skill-card.md` file.\n\nv1.0.30 | 2026-09-06T18:12:25.481Z | auto\n\n- Updated reasoning model guidance in documentation: clarified which models enable thinking/reasoning by default and provided safety recommendations for `max_tokens` usage.\n- Removed deprecated file: `skill-card.md` no longer included.\n\nv1.0.29 | 2026-09-03T18:42:41.772Z | auto\n\n- Clarified that live free models can be fetched at `/v1/models` and are available without payment, wallet, or gas.\n- Removed the separate file `skill-card.md`.\n- Minor documentation updates to emphasize always using the endpoint for the free model list.\n- No changes to endpoints, payment, or SDK integration.\n\nv1.0.28 | 2026-09-01T17:46:03.863Z | auto\n\n- Removed the file: skill-card.md.\n- Updated SKILL.md formatting and content, notably in the \"Paid models\" section (removed explicit count of paid models).\n- No functional changes to API, endpoints, or usage.\n- Maintains documentation and instructions for x402 payment and SDK usage.\n\nv1.0.27 | 2026-09-01T17:23:13.074Z | auto\n\nBridgeNode Skill v1.0.27\n\n- Documentation updates in README.md and SKILL.md, including minor corrections and clarification of paid/free model counts.\n- Updated agent-registration.json for improved metadata accuracy.\n- Removed obsolete skill-card.md to streamline documentation.\n\nv1.0.26 | 2026-08-24T21:57:30.217Z | auto\n\n- Added SECURITY.md file with security-related information.\n- Updated documentation in README.md.\n- Removed the obsolete skill-card.md file.\n\nv1.0.25 | 2026-08-23T06:25:23.779Z | auto\n\nBridgeNode Skill v1.0.25 Changelog\n\n- Updated repository URL in SKILL.md metadata from applefanaimail-blip/bridgenode-skill to bridgenode-ai/bridgenode-skill.\n- Minor documentation updates in README.md and related metadata files.\n- Removed deprecated skill-card.md file.\n\nv1.0.24 | 2026-08-20T17:48:03.860Z | auto\n\nBridgeNode 1.0.24 Changelog\n\n- Documentation updated: SKILL.md and AGENTS.md revised for clarity and conciseness.\n- Obsolete file skill-card.md removed.\n- Description and usage instructions in SKILL.md streamlined and shortened, with a clear summary of endpoints and pricing.\n- No functional or API changes; this release focuses on documentation cleanup.\n\nv1.0.23 | 2026-08-20T15:10:19.760Z | auto\n\n- Updated documentation in SKILL.md: now lists several free models (no payment required) and clarifies there are 29 eco + 4 premium paid models, with a live endpoint for details.\n- Removed the file skill-card.md.\n- No changes to endpoints or core functionality; changes are documentation and metadata only.\n\nv1.0.22 | 2026-08-20T07:54:45.932Z | auto\n\n- Removed the file: skill-card.md\n- No user-facing changes to functionality; documentation remains unchanged.\n\nv1.0.21 | 2026-08-17T16:43:41.811Z | auto\n\n- Removed the file skill-card.md.\n- SKILL.md unchanged in content; no user-facing documentation changes.\n- No changes to endpoints, pricing, or functionality.\n- Version update only reflects non-functional file cleanup.\n\nv1.0.20 | 2026-08-16T12:38:02.755Z | auto\n\n- Added AGENTS.md with agent-specific usage or guidance.\n- Updated documentation in several example directories for clarity and possibly new usage instructions.\n- Improved and reorganized main README for clearer onboarding.\n- Removed skill-card.md file.\n- No changes made to core functionality or API; updates are primarily documentation improvements.\n\nv1.0.19 | 2026-08-14T18:52:52.665Z | auto\n\nBridgeNode 1.0.19\n\n- Removed redundant file: skill-card.md\n- Updated documentation (SKILL.md) for clarity and completeness\n- No functional or API changes; all compatibility remains the same\n\nv1.0.18 | 2026-08-14T10:10:32.494Z | auto\n\nBridgeNode 1.0.18\n\n- Documentation files updated (README.md, SKILL.md).\n- Obsolete skill-card.md file removed.\n- No breaking changes to functionality.\n\nv1.0.17 | 2026-08-14T06:34:23.111Z | auto\n\nbridgenode 1.0.17\n\n- Updated documentation in SKILL.md: added a high-level natural language overview section at the top for better clarity.\n- No changes made to core functionality, endpoints, pricing, or payment flows.\n- This update is documentation-only for improved accessibility and understanding.\n\nv1.0.16 | 2026-08-14T06:30:25.318Z | auto\n\n- Improved description for clarity and conciseness, emphasizing privacy-preserving, pay-as-you-go AI inference without API keys or registration.\n- No changes to usage, endpoints, payment flow, pricing, or model support.\n- Documentation and wording updates only; core functionality remains unchanged.\n\nv1.0.15 | 2026-08-14T06:25:23.283Z | auto\n\n- Removed the file skill-card.md.\n- Updated SKILL.md metadata to add an \"openclaw.homepage\" field.\n- No functional or API changes were introduced.\n\nv1.0.14 | 2026-08-14T04:16:19.558Z | auto\n\n- Updated version metadata from 1.0.11 to 1.0.13 in SKILL.md.\n- No functional or feature changes; documentation only.\n\nv1.0.13 | 2026-08-14T04:10:34.900Z | auto\n\n- Documentation updates in README.md for clarity and usability.\n- Removed the skill-card.md file.\n- No changes to code or API behavior.\n\nv1.0.12 | 2026-08-14T03:17:42.923Z | auto\n\n- Removed the file skill-card.md from the project.\n- No other changes to functionality or documentation.\n\nv1.0.11 | 2026-08-14T02:33:37.288Z | auto\n\nVersion 1.0.11\n\n- Updated version identifiers in SKILL.md from 1.0.10 to 1.0.11 in both metadata and front matter.\n- No functional or descriptive content changes to the skill; documentation version consistency improved.\n\nv1.0.10 | 2026-08-14T02:09:49.964Z | auto\n\nbridgenode 1.0.10\n\n- Added a prominent cost warning to inform users that real USDC is spent per request and refunds are not provided once the provider responds.\n- Documented official SDKs and CLI for easier integration: bridgenode-llm (Python), bridgenode-cli, and @bridgenode/llm (TypeScript).\n- Clarified and emphasized client-side spending limits (`BRIDGENODE_MAX_PER_CALL`, `BRIDGENODE_DAILY_CAP`) in the documentation.\n- Minor improvements to usage instructions and warnings for better clarity and user safety.\n- Updated metadata to version 1.0.10.\n\nv1.0.9 | 2026-08-14T01:02:39.249Z | auto\n\nBridgeNode 1.0.9 is a major update with expanded documentation and new example resources.\n\n- Added comprehensive examples in curl, Python, TypeScript, and MCP usage\n- Introduced new documentation files: LICENSE, README.md, agent-registration.json, glama.json\n- Removed legacy metadata files (_meta.json, skill-card.md)\n- Updated SKILL.md for improved clarity and inclusion of OpenClaw metadata\n- No functional API changes; all endpoints and payment flows remain the same\n\nv1.0.8 | 2026-08-12T08:37:45.313Z | user\n\nFix public claims: no accounts/no personal data wording; remove settle-before-work phrasing (matches server)\n\nv1.0.7 | 2026-08-11T08:01:09.370Z | user\n\nFix deepseek-v4-pro pricing; correct USDC ATA wording (must have existing ATA); add x402-list link; MIT-0 license\n\nv1.0.6 | 2026-08-08T07:39:38.435Z | user\n\nFix: publish correct SKILL.md content (previous 1.0.5 artifact had stale installed copy)\n\nv1.0.5 | 2026-08-08T07:33:56.297Z | user\n\nShorter description: removed repetition, added micropayments positioning\n\nv1.0.4 | 2026-08-07T21:29:04.400Z | user\n\nTopics: llm -> agents (P1 principle: built for agents)\n\nv1.0.3 | 2026-08-07T21:22:55.843Z | user\n\nSharpened agent-focused description: anonymous requests, no data collection\n\nv1.0.2 | 2026-08-07T21:05:26.172Z | user\n\nOptimized description (micropayment + gasless positioning); moved from other to finance,integrations categories; added topics\n\nArchive index:\n\nArchive v1.0.36: 19 files, 32674 bytes\n\nFiles: agent-registration.json (748b), AGENTS.md (2831b), examples/curl/README.md (3791b), examples/mcp/README.md (2684b), examples/python/main.py (2963b), examples/python/README.md (2442b), examples/README.md (1550b), examples/typescript/example.ts (1419b), examples/typescript/package-lock.json (51960b), examples/typescript/package.json (418b), examples/typescript/README.md (1861b), examples/typescript/tsconfig.json (260b), glama.json (96b), LICENSE (905b), README.md (4218b), SECURITY.md (609b), skill-card.md (2563b), SKILL.md (15959b), _meta.json (130b)\n\nFile v1.0.36:SKILL.md\n\n---\nname: bridgenode\nversion: 1.0.16\ndescription: BridgeNode — x402 pay-per-request AI inference for agents. OpenAI-compatible API + MCP server with tool calling, Solana USDC, gas-free micropayments. No API keys. Free models included. Live prices: bridgenode.cc/v1/models Use when an agent lacks a provider API key or wants privacy-preserving per-request AI inference pricing.\nmetadata:\n  author: BridgeNode\n  version: \"1.0.16\"\n  url: https://bridgenode.cc\n  repository: https://github.com/bridgenode-ai/bridgenode-skill\n  network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\n  currency: USDC\n  openclaw:\n    emoji: \"⚡\"\n    homepage: https://bridgenode.cc\ncompatibility: Any OpenAI-compatible agent with x402 payment support; MCP clients (streamable-http)\n---\n\n# BridgeNode\n\n## Overview (natural language)\n\nBridgeNode is an AI inference service for agents: anonymous LLM access without API keys, without registration, without subscriptions. Agents get an OpenAI-compatible chat completions endpoint and pay as they go with Solana USDC micropayments via the x402 payment protocol (HTTP 402). Model prices are published per token on the public models endpoint; transaction fees are sponsored, so an agent only needs USDC in its own wallet. Works with any OpenAI-compatible agent, MCP clients, and x402-capable SDKs.\n\n\n## Free access (start here — no payment, no wallet)\n\n- **Free models** (`gpt-oss-20b, gpt-oss-120b, glm-4.7-flash, glm-4.5-flash, glm-4.6v-flash`) are served without payment: no 402, no wallet, no gas. Same endpoint, same request body.\n\n**Free model notes (read before choosing one):**\n- `glm-4.7-flash` — ⚠️ **temporarily unreliable**: z.ai free model: slower than the Groq free models — a reply can take up to a minute, and the provider is sometimes overloaded. If it returns an error (rate limit / temporarily overloaded), retry once or switch to gpt-oss-20b, the most reliable free model.\n- `glm-4.5-flash` — ⚠️ **temporarily unreliable**: z.ai free model: slower than the Groq free models — a reply can take up to a minute, and the provider is sometimes overloaded. If it returns an error (rate limit / temporarily overloaded), retry once or switch to gpt-oss-20b, the most reliable free model.\n- `glm-4.6v-flash`: z.ai free model: slower than the Groq free models — a reply can take up to a minute, and the provider is sometimes overloaded. If it returns an error (rate limit / temporarily overloaded), retry once or switch to gpt-oss-20b, the most reliable free model.\n- **Free trials:** a client that has never called us gets **2 free calls on PAID models** without payment — real inference from a real model before any wallet exists. The remaining count travels in the response headers (`X-Bridgenode-Free-Trials-Remaining`).\n- When the trials are used up, the third call returns **402** with a machine-readable offer in `extensions.bridgenode` (free models, trials left, `how_to_pay`, `docs`) — not a dead end.\n- Check the live list: `GET https://bridgenode.cc/v1/models` (`\"free\": true`).\n\nThis applies to every transport: HTTP (`https://bridgenode.cc/v1`), MCP (`https://bridgenode.cc/mcp`) and the SDKs — no wallet key is needed for the free path.\n\n## Limits (published — counted per client, and enforced exactly like this)\n- **One client =** a wallet with payment history, otherwise your network (daily budget: /24 IPv4, /64 IPv6; trials: /16 IPv4, /48 IPv6).\n- **Free trials:** 2 calls on PAID models (one-off, per client).\n- **Daily free budget:** 200 calls and 100,000 tokens per client per day (FREE MODELS AND TRIALS together, resets 00:00 UTC). Over it → **429** `free_daily_quota_exhausted` with `Retry-After`.\n- **Per free model, our own daily ceiling:** `gpt-oss-120b` 160,000, `gpt-oss-20b` 160,000 tokens/day (shared by all clients). Reached → **429** `free_budget_exhausted` naming a model that still works — we stop before the provider does.\n- **Rate:** 30 free requests/minute per client; 10 payment challenges/minute.\n- **Concurrency:** 20 free calls at once across all clients. Over it → **503** `free_path_busy` + `Retry-After` (never a silent queue).\n- **Every free answer carries the numbers:** `X-Bridgenode-Free-Quota-Limit`, `X-Bridgenode-Free-Quota-Remaining`, `X-Bridgenode-Free-Quota-Reset`, `X-Bridgenode-Free-Quota-Tokens-Limit`, `X-Bridgenode-Free-Quota-Tokens-Remaining`, `X-Bridgenode-Free-Trials-Remaining`.\n- **Paid requests (x402) are never affected by any of these limits** — they neither wait for free traffic nor share its budgets.\n\n\n## ⚠️ Cost Warning (read first)\n\nThis skill **spends real money (USDC)** on PAID requests via on-chain Solana USDC micropayments (x402). There are no refunds once the provider has responded. Check live prices at `GET /v1/models` before use, set `max_tokens` to control cost, and use client-side spending limits (`BRIDGENODE_MAX_PER_CALL`, `BRIDGENODE_DAILY_CAP`) if available. Free models and the free trials never spend anything.\n\n\nBridgeNode is an AI inference bridge. Agents get an OpenAI-compatible endpoint and pay per request with Solana USDC via the x402 protocol. No API keys, no registration, no subscriptions. Transaction fees (SOL) are sponsored by BridgeNode — the agent only needs USDC in its wallet.\n\n## When to Use\n\n- The agent needs LLM inference (chat completions) but has no provider API key.\n- Pay-per-request is preferred over monthly subscriptions.\n- **The agent has no wallet yet** — free models and the free trials work without payment (start there).\n- The agent has a Solana wallet with USDC (or can receive it) and supports x402 payments.\n- Deterministic, transparent per-request pricing is required.\n- MCP-based agents that need a paid inference tool.\n\n## Endpoints\n\n| Endpoint | Purpose |\n|---|---|\n\n## Models & Pricing\n\nPrices are in USDC per token (6 decimals). Always fetch live prices from `GET /v1/models` — they are the single source of truth and are generated from server config (never hardcoded here — stale prices cost money).\n\n**🆓 Free models (no payment, no API key, no registration) are included** — no 402, no wallet, no gas. Live free list: `GET https://bridgenode.cc/v1/models`.\n\n**Paid models (pay-per-request):** DeepSeek, GLM (Z.AI), Kimi (Moonshot), MiniMax. Full list with live prices: `GET https://bridgenode.cc/v1/models`.\n\n| Model | Input / token | Output / token | Context window | Max output | Tools |\n|---|---|---|---|---|---|\n\nPricing model: **exact scheme** — the agent pays for `input tokens + max_tokens` **before** processing. If the model generates fewer than `max_tokens`, the agent still pays for `max_tokens` (this is the business model, not a bug). Minimum charge per request: 2000 atomic units = $0.002 USDC.\n\n## Tool Calling (function calling)\n\nSend OpenAI-style `tools` (+ optional `tool_choice`) — they are forwarded to the model **unchanged** (free and paid models, HTTP and MCP, streaming and non-streaming). The answer is the provider's own: text, or `choices[0].message.tool_calls` with `finish_reason: \"tool_calls\"`.\n\nContinue like any OpenAI client: send the assistant turn back with **`content: null` and its `tool_calls`**, then one `role: \"tool\"` message per call with `tool_call_id`.\n\n- The **tool schema counts as input tokens** — it is priced and context-checked like your messages.\n- **Free models have a small token budget** (see the table above); a large tool list will not fit. Use a paid model for agentic loops.\n- The `Tools` column marks models verified to accept tool calling. Unmarked = unverified, not necessarily unsupported.\n\n## Reasoning Models — Important\n\n- Many providers enable thinking/reasoning by default; reasoning tokens **SHARE** the `max_tokens` budget with the answer.\n- Use `max_tokens >= 200` — a too-small limit can be fully consumed by reasoning, producing an **EMPTY answer** (the model returns 200 with no content).\n- **An empty answer is retried and refunded**: we retry once automatically with a bigger budget; if the answer is still empty you get an error with the reason and a FULL refund — you never pay for an answer you did not receive.\n- Thinking is disabled on: `glm-4.7-flash`, `deepseek-flash`, `deepseek-v4-pro` (these are safe at smaller `max_tokens`). All other models may reason by default — treat `max_tokens < 200` as at-risk.\n- Prefer `stream: true` for long generations (non-stream is capped at 4096).\n- If you use tools with a thinking model: you MUST return `reasoning_content` in the next turn, otherwise the API returns 400.\n\n## Payment Flow (x402 V2, exact scheme)\n\n1. Send the request without payment headers.\n2. Server responds `402 Payment Required` with a `PAYMENT-REQUIRED` header (base64 JSON): price, `payTo` address, USDC mint, memo, recent blockhash.\n3. Agent constructs a **partial transaction**: USDC `TransferChecked` (amount = required) + Memo instruction, signs with its own wallet. Fee payer is NOT signed by the agent.\n4. Agent retries the request with `PAYMENT-SIGNATURE` header (base64 JSON payload with the signed transaction).\n5. Server verifies the payment and processes the request (fees sponsored — gasless for the agent).\n6. Response is `200` with `PAYMENT-RESPONSE` header (settlement receipt).\n\nKey details:\n\n- Network: `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` (Solana mainnet)\n- Asset: USDC `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`\n- The agent must have an existing USDC ATA (associated token account) for the mint.\n- The agent does **not** need SOL — BridgeNode sponsors transaction fees.\n- Use the official x402 SDKs (`@x402/svm`, `x402[svm]`) or any x402-capable client — they handle the 402 → sign → retry flow automatically.\n\n## Funding\n\n- Requires USDC on Solana mainnet (no API keys, no registration)\n- The agent keeps USDC in its own wallet — BridgeNode never holds balances; every request is paid individually via x402 (exact amount quoted in the 402 response)\n- The agent must have an existing USDC ATA (associated token account) for the mint — it is derived from the agent's wallet address; no manual token account setup needed\n- Gasless: BridgeNode sponsor covers Solana fees\n- Optional client-side spending limits (SDK, enforced locally before signing — not server balances): `BRIDGENODE_MAX_PER_CALL`, `BRIDGENODE_DAILY_CAP`\n\n## Quick Start (curl)\n\nStep 0 — first call, free (copy this one): the leading free model answers\nwithout payment and without a wallet. Keep `max_tokens >= 200` — a smaller\nlimit can be consumed by reasoning and return an EMPTY answer.\n\n```bash\ncurl https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"gpt-oss-20b\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":200}'\n```\n\nResponse: `200` directly — no `402`, no `PAYMENT-REQUIRED`.\n\nStep 1 — get payment requirements for a PAID model:\n\n```bash\ncurl https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"deepseek-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":200}'\n```\n\nResponse: `402` with `PAYMENT-REQUIRED` header (amount, payTo, memo).\n\nStep 2 — sign the partial transaction with an x402-capable client (e.g. `x402-proxy` (npx x402-proxy), official SDK, or `pay` CLI) and retry:\n\n```bash\ncurl https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"PAYMENT-SIGNATURE: <base64 payload>\" \\\n  -d '{\"model\":\"deepseek-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":200}'\n```\n\nResponse: `200` with the completion and `PAYMENT-RESPONSE` header.\n\n## Quick Start (Python, x402 SDK)\n\n```python\n# pip install \"x402[svm]\"\n# Official x402 client handles the full 402 -> sign -> retry loop.\n```\n\nUse the official `x402` Python client (`x402[svm]`) configured with the agent's Solana keypair; point it at `https://bridgenode.cc/v1/chat/completions`. Payment is automatic.\n\n## SDKs\n\n- **Python SDK:** `pip install bridgenode-llm` (https://pypi.org/project/bridgenode-llm) — full toolkit: `pip install bridgenode`\n- **CLI:** `pip install bridgenode-cli` (https://pypi.org/project/bridgenode-cli) — `bridgenode chat \"Hello!\"`\n- **TypeScript SDK:** `npm i @bridgenode/llm` (https://www.npmjs.com/package/@bridgenode/llm)\n- **MCP wrapper:** `npm i @bridgenode/mcp` (https://www.npmjs.com/package/@bridgenode/mcp)\n\nAll SDKs handle the x402 payment handshake automatically (402 → sign → retry → 200), with fail-closed spending limits (`BRIDGENODE_MAX_PER_CALL`, `BRIDGENODE_DAILY_CAP`).\n\n## MCP Usage\n\n- One-line install: `claude mcp add bridgenode -s user -- npx -y @bridgenode/mcp@latest`\n- Server URL: `https://bridgenode.cc/mcp` (streamable-http)\n- Tool: `chat_completions` (model, mode, messages, max_tokens)\n- Payment: x402 handshake per tool call; prices are annotated in `tools/list` (`x-x402`) as an indication — always check the actual amount in the 402 response before signing.\n\n## Request Options\n\n- `model`: explicit model ID from `/v1/models` (e.g. `deepseek-flash`).\n- `mode`: smart routing — `auto` (complexity-based tier), `eco` (cheapest), `premium` (best). If both `model` and `mode` are sent, `model` wins.\n- `max_tokens`: request cap (default 4096, clamped to model max). A non-stream request above `non_stream_max_tokens` (published per model in `/v1/models`) is clamped to it, never rejected — use `stream: true` for longer generations.\n- `stream`: SSE streaming supported (`stream: true`).\n- `tools`: OpenAI-style function definitions the model may call (forwarded unchanged; the schema counts as input tokens — see Tool Calling above).\n- `tool_choice`: `auto` / `none` / `required`, or a forced function object.\n\n## Errors\n\n| Status | Meaning |\n|---|---|\n| 400 | Bad request (unknown model, invalid body, oversized non-stream max_tokens) |\n| 402 | Payment required — see `PAYMENT-REQUIRED` header |\n| 413 | Request body too large (limit 2 MB) |\n| 429 | Too many requests (queue limit) |\n| 503 | Service busy — retry with backoff |\n\nAll errors use the OpenAI error format: `{\"error\": {\"message\": ..., \"type\": ..., \"code\": ...}}`.\n\n## Notes\n- Security: ClawHub security audit Pass; VirusTotal scan clean (no engine findings).\n\n- Discovery: `https://bridgenode.cc/.well-known/agent-card.json`, `https://bridgenode.cc/.well-known/mcp.json`, `https://bridgenode.cc/.well-known/ai-manifest.json`\n- Listed on x402-list: https://x402-list.com/services/bridgenode\n- Listed on x402-dev: https://www.x402dev.com/awesome-projects/\n- Listed on nohumans.directory: https://nohumans.directory/l/f1f74751-9d5\n- Listed on gold-402: https://github.com/Haustorium12/gold-402/blob/main/directory/learning.md\n- ClawHub skill: https://clawhub.ai/bridgenode/skills/bridgenode\n- Transaction fees are sponsored (gasless) — the agent only needs USDC in its own wallet.\n- Refunds: if the provider fails before any content is delivered, the payment is refunded automatically (reverse USDC transfer).\n\n## Conformance (x402 v2, `exact`)\n\nFacts you can check, not a badge (fix.md 6.1):\n\n- `x402Version` **2**, scheme **`exact`**, network **`solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`** (Solana mainnet, CAIP-2).\n- Asset: **USDC** `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` (6 decimals); `amount` is an **atomic string** (`\"2000\"` = 0.002 USDC).\n- `payTo` and `extra.feePayer` are the same address — the agent needs **no SOL** (gasless).\n- The 402 body is a `PaymentRequired` envelope, validated against the **official x402 SDK** schemas; the live check passes 17/17 (envelope fields, `/supported`, `/verify` semantics, and a real settlement verified on-chain).\n- **Self-facilitated:** `GET /supported`, `POST /verify`, `POST /settle` are served by BridgeNode itself (declared in `https://bridgenode.cc/.well-known/x402`) — no third party between the agent and us.\n- `/verify` follows the spec: a payment that does not verify is answered **`200 {isValid: false, invalidReason}`**; only a malformed request body is a 400.\n\nFile v1.0.36:examples/curl/README.md\n\n# BridgeNode curl example\n\nManual x402 flow with curl. This shows the protocol steps; for automatic\npayment handling use [x402curl](https://github.com/second-state/x402-skill)\n(drop-in curl replacement) or the SDK examples.\n\n> ⚠️ Mainnet warning: Solana mainnet, real USDC. Minimum charge: $0.002.\n> Check the 402 `amount` before signing.\n\n## Step 1 — Request, get 402\n\n```bash\ncurl -sS -D - -o /dev/null https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"deepseek-v4-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":100}'\n```\n\nExpected: `HTTP/1.1 402 Payment Required` with a `PAYMENT-REQUIRED` header\n(base64 JSON: scheme, network, amount, asset, payTo, memo, feePayer).\n\n## Step 2 — Sign the partial transaction\n\nDecode the `PAYMENT-REQUIRED` header and sign a partial transaction:\nUSDC `TransferChecked` (amount from the 402) + Memo instruction, signed with\nthe agent's Solana keypair. The fee payer is NOT signed by the agent —\nBridgeNode sponsors gas.\n\nUse any x402-capable signer: `x402curl`, the official SDKs (`x402[svm,httpx]`,\n`@x402/svm`), or the Solana `pay` CLI. This produces a base64 JSON payload\n(`x402Version`, `resource`, `accepted`, `payload.transaction`).\n\n## Step 3 — Retry with PAYMENT-SIGNATURE\n\n```bash\nPAYLOAD=\"<base64 JSON from step 2>\"\ncurl -sS https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"PAYMENT-SIGNATURE: $PAYLOAD\" \\\n  -d '{\"model\":\"deepseek-v4-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":100}'\n```\n\nExpected: `200 OK` with the completion and a `PAYMENT-RESPONSE` header\n(settlement receipt).\n\n## Automatic alternative — x402curl\n\n```bash\n# install: https://github.com/second-state/x402-skill\n# config: X402_PRIVATE_KEY=... (agent's Solana keypair)\nx402curl -sS https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"deepseek-v4-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":100}'\n```\n\nx402curl detects the 402, signs the payment, and retries automatically.\n\n## Expected output (Step 1)\n\n```\nHTTP/2 402\npayment-required: <base64 JSON — scheme, network, amount, asset, payTo, memo, feePayer, recentBlockhash>\n{\"x402Version\":2,\"error\":\"PAYMENT-SIGNATURE header is required\",\"resource\":{...},\"accepts\":[{\"scheme\":\"exact\",\"network\":\"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\",\"asset\":\"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\"amount\":\"2000\",\"payTo\":\"<BridgeNode wallet>\",\"maxTimeoutSeconds\":30,\"extra\":{...}}]}\n```\n\n## Expected output (Step 3, after signing)\n\n```\nHTTP/2 200\npayment-response: <base64 JSON — SettlementResponse: success, payer, transaction, network, amount>\n{\"id\":\"...\",\"object\":\"chat.completion\",\"model\":\"deepseek-v4-flash\",\"choices\":[...],\"usage\":{...}}\n```\n\n- The exact `amount` comes from the 402 response (minimum charge: 2000 atomic units = $0.002).\n- Live prices always: `GET https://bridgenode.cc/v1/models`.\n\n## Troubleshooting\n\n- **`402` instead of `200`** — expected on the first request; that is the payment challenge, not an error.\n- **`400 Bad request`** — unknown model, invalid body, or `max_tokens` above the non-stream cap (use `stream: true` for long generations).\n- **`503 Service busy`** — retry with backoff.\n- **Signing fails** — use `x402curl`, the official SDKs (`x402[svm,httpx]`, `@x402/svm`), or the Solana `pay` CLI; the fee payer is NOT signed by the agent.\n- **Empty answer from reasoning models** — use `max_tokens >= 200`.\n\n## Notes\n\n- Network: `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` (mainnet)\n- Asset: USDC `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`\n- The agent needs a USDC ATA, but no SOL (gas sponsored).\n- Free: `GET https://bridgenode.cc/v1/models` (models + prices).\n\nFile v1.0.36:examples/mcp/README.md\n\n# BridgeNode MCP example\n\nCall BridgeNode through its MCP server with x402 payment.\n\n## Server\n\n- URL: `https://bridgenode.cc/mcp` (streamable-http)\n- Tool: `chat_completions` (model | mode, messages, max_tokens)\n- Payment: x402 handshake per tool call (via `_meta[\"x402/payment\"]`)\n\nPrices are annotated in `tools/list` (`x-x402`) as an indication; the actual\namount is in the 402 response — always check it before signing.\n\n## Option A — one-command wrapper (any MCP client)\n\n```bash\nnpx -y @bridgenode/mcp@latest\n```\n\nUse this as the MCP server command in your client (Claude Code, Cursor,\nWindsurf, etc.). The wrapper connects to `https://bridgenode.cc/mcp` and\nhandles x402 payment automatically with the agent's wallet.\n\nClaude Code example:\n\n```bash\nclaude mcp add bridgenode -- npx -y @bridgenode/mcp@latest\n```\n\n## Option B — direct streamable-http\n\nConfigure your MCP client with:\n\n```\nURL: https://bridgenode.cc/mcp\nTransport: streamable-http\n```\n\n## What the agent sees\n\n1. `tools/list` → `chat_completions` with `x-x402` price annotation.\n2. `tools/call` → server returns payment required (result with\n   `structuredContent` PaymentRequired object).\n3. Client signs the USDC transaction, retries the call with\n   `_meta[\"x402/payment\"]`.\n4. Server settles, runs inference, returns the completion with\n   `_meta[\"x402/payment-response\"]` (settlement receipt).\n\n## Expected output (`tools/list`)\n\n```json\n{\"result\":{\"tools\":[{\"name\":\"chat_completions\",\"title\":\"Chat completions with x402 payment\",\"description\":\"Send a chat completion request to any supported model. Paid tool: x402 payment (Solana USDC) is required — the first call returns 402 with the exact price; retry with _meta[\\\"x402/payment\\\"]. ...\",\"inputSchema\":{...},\"x-x402\":{\"scheme\":\"exact\",\"network\":\"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\",\"amount\":\"2000\",\"asset\":\"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\"payTo\":\"<BridgeNode wallet>\"}}]}}\n```\n\n- The `x-x402` amount is **indicative** (floor); the exact amount is in the 402 response — always check it before signing.\n\n## Troubleshooting\n\n- **`tools/call` returns payment required** — expected on the first call; that is the x402 challenge, not an error.\n- **Client can't connect** — use the one-command wrapper (`npx -y @bridgenode/mcp@latest`) or point the client at `https://bridgenode.cc/mcp` with `streamable-http`.\n- **`503 Service busy`** — retry with backoff.\n- **Empty answer from reasoning models** — use `max_tokens >= 200`.\n\n## Notes\n\n- Solana mainnet, real USDC. Minimum charge: $0.002 per request.\n- Gas sponsored by BridgeNode — the agent only needs USDC, no SOL.\n- Free tools (e.g., model list) skip payment.\n\nFile v1.0.36:examples/python/README.md\n\n# BridgeNode Python example\n\nBuyer-side example: AI agent pays for and calls BridgeNode with the official\nx402 Python SDK (`x402[svm,httpx]`).\n\n## Setup\n\n```bash\npip install \"x402[svm,httpx]\" \"solana==0.39.0\" python-dotenv\ncp .env.example .env\n# fill SVM_PRIVATE_KEY (agent's Solana keypair, must have USDC ATA)\n```\n\n## Run\n\n```bash\npython main.py\n```\n\n## What it does\n\n1. `GET /v1/models` — free, lists models and prices.\n2. `POST /v1/chat/completions` — x402 payment handled automatically:\n   request → 402 → sign partial TX (USDC TransferChecked + Memo) →\n   retry with `PAYMENT-SIGNATURE` → 200 + `PAYMENT-RESPONSE`.\n\n## Expected output\n\n```\nInitialized SVM account: <your wallet address>\nModels & prices: {\"object\":\"list\",\"data\":[{\"id\":\"deepseek-v4-flash\",\"pricing\":{\"prompt\":2e-07,\"completion\":4e-07},...}]}\n\nPOST https://bridgenode.cc/v1/chat/completions\nStatus: 200\nBody: {\"id\":\"...\",\"object\":\"chat.completion\",\"model\":\"deepseek-v4-flash\",\"choices\":[...],\"usage\":{...}}\n\nPayment response: {\n  \"success\": true,\n  \"payer\": \"<your wallet address>\",\n  \"transaction\": \"<signature>\",\n  \"network\": \"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\",\n  \"amount\": \"2000\"\n}\n```\n\n- The exact `amount` comes from the 402 response (minimum charge: 2000 atomic units = $0.002).\n- Live prices always: `GET https://bridgenode.cc/v1/models`.\n\n## Troubleshooting\n\n- **`SVM_PRIVATE_KEY missing`** — copy `.env.example` to `.env` and fill in the keypair.\n- **`InsufficientFunds` / payment rejected** — the wallet needs a USDC ATA with balance on Solana mainnet.\n- **`Invalid account`** — the agent must have an existing USDC ATA (it is derived from the wallet address automatically when funded).\n- **`402` spam / timeout** — the server rate-limits 402 responses per IP; wait a moment and retry.\n- **Empty answer from reasoning models** — use `max_tokens >= 200`; too-small limits can produce an empty response (service was provided, no refund).\n\n## Notes\n\n- Solana mainnet, real USDC. Minimum charge: $0.002 per request.\n- Gas is sponsored by BridgeNode — the agent only needs USDC, no SOL.\n- The agent must have an existing USDC ATA (associated token account).\n- Funding: send USDC on Solana mainnet to the agent's own wallet — BridgeNode never holds balances; every request is paid individually via x402 (exact amount in the 402 response). The USDC ATA is derived from the agent's wallet address; no manual token account setup needed.\n\nFile v1.0.36:examples/README.md\n\n# BridgeNode Examples\n\nBuyer-side examples: how an AI agent pays for and calls BridgeNode via x402.\n\nAll examples are **client-side only** — they use the public x402 SDKs and the\npublic BridgeNode endpoint (`https://bridgenode.cc/v1`). No server code.\n\n> ⚠️ **Mainnet warning:** BridgeNode runs on Solana mainnet with real USDC.\n> Use a wallet with a small balance. Minimum charge per request: $0.002 USDC.\n> Check the 402 `amount` before signing.\n\n## Contents\n\n| Example | Stack | What it shows |\n|---|---|---|\n| [curl/](curl/README.md) | curl + x402curl | Manual x402 flow: request → 402 → sign → retry |\n| [python/](python/README.md) | Python + `x402[svm,httpx]` | OpenAI-compatible call with automatic payment |\n| [typescript/](typescript/README.md) | TypeScript + `@x402/svm` | Fetch wrapper with automatic payment |\n| [mcp/](mcp/README.md) | MCP client | Paid tool call through the BridgeNode MCP server |\n\n## Flow (x402 V2, exact scheme)\n\n1. `POST /v1/chat/completions` without payment → server responds `402` with a\n   `PAYMENT-REQUIRED` header (base64 JSON: amount, payTo, memo).\n2. Client signs a partial transaction: USDC `TransferChecked` + Memo.\n3. Client retries with `PAYMENT-SIGNATURE` header.\n4. Server verifies, settles (gas sponsored by BridgeNode), returns `200` with a\n   `PAYMENT-RESPONSE` header (settlement receipt).\n\nNetwork: `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` (mainnet) · Asset: USDC\n`EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`\n\nModels and live prices: `GET https://bridgenode.cc/v1/models` (free).\n\nFile v1.0.36:examples/typescript/README.md\n\n# BridgeNode TypeScript example\n\nBuyer-side example: AI agent pays for and calls BridgeNode with the official\nx402 TS SDKs (`@x402/fetch` + `@x402/svm`).\n\n## Setup\n\n```bash\nnpm install\ncp .env.example .env\n# fill SVM_PRIVATE_KEY (agent's Solana keypair, must have USDC ATA)\n```\n\n## Run\n\n```bash\nnpm run start\n```\n\n## What it does\n\n1. Registers the Solana exact payment scheme.\n2. `POST /v1/chat/completions` through `wrapFetchWithPayment` — 402 handled\n   automatically: sign partial TX → retry with `PAYMENT-SIGNATURE` → 200.\n3. Prints the payment response (settlement receipt).\n\n## Expected output\n\n```\nPOST https://bridgenode.cc/v1/chat/completions\n\n{\n  id: '...',\n  object: 'chat.completion',\n  model: 'deepseek-v4-flash',\n  choices: [ { index: 0, message: { role: 'assistant', content: 'Hello!' }, finish_reason: 'stop' } ],\n  usage: { prompt_tokens: 10, completion_tokens: 4, total_tokens: 14 },\n  header: {\n    success: true,\n    payer: '<your wallet address>',\n    transaction: '<signature>',\n    network: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',\n    amount: '2000'\n  }\n}\n```\n\n- The exact `amount` comes from the 402 response (minimum charge: 2000 atomic units = $0.002).\n- Live prices always: `GET https://bridgenode.cc/v1/models`.\n\n## Troubleshooting\n\n- **`SVM_PRIVATE_KEY` missing** — copy `.env.example` to `.env` and fill in the keypair.\n- **`InsufficientFunds` / payment rejected** — the wallet needs a USDC ATA with balance on Solana mainnet.\n- **TypeScript compile errors** — run `npm install` first; requires Node 20+.\n- **`503 Service busy`** — retry with backoff.\n- **Empty answer from reasoning models** — use `max_tokens >= 200`.\n\n## Notes\n\n- Solana mainnet, real USDC. Minimum charge: $0.002 per request.\n- Gas is sponsored by BridgeNode — the agent only needs USDC, no SOL.\n- The agent must have an existing USDC ATA.\n\nFile v1.0.36:README.md\n\n# BridgeNode Skill & Examples\n\n[![PyPI version](https://img.shields.io/pypi/v/bridgenode-llm.svg)](https://pypi.org/project/bridgenode-llm/)\n[![Downloads](https://img.shields.io/pypi/dm/bridgenode-llm.svg)](https://pypi.org/project/bridgenode-llm/)\n[![npm version](https://img.shields.io/npm/v/@bridgenode/llm.svg)](https://www.npmjs.com/package/@bridgenode/llm)\n[![npm version](https://img.shields.io/npm/v/@bridgenode/mcp.svg)](https://www.npmjs.com/package/@bridgenode/mcp)\n[![License: MIT-0](https://img.shields.io/badge/License-MIT--0-yellow.svg)](https://opensource.org/license/mit-0/)\n[![CI](https://img.shields.io/github/actions/workflow/status/bridgenode-ai/bridgenode-skill/ci.yml)](https://github.com/bridgenode-ai/bridgenode-skill/actions)\n[![BridgeNode on x402-list](https://x402-list.com/badge/bridgenode.svg)](https://x402-list.com/services/bridgenode?utm_source=badge&utm_medium=referral&utm_campaign=embed)\n[![BridgeNode uptime on x402-list](https://x402-list.com/badge/bridgenode.svg?data=uptime)](https://x402-list.com/services/bridgenode?utm_source=badge&utm_medium=referral&utm_campaign=embed)\n[![BridgeNode on ClawHub](https://img.shields.io/badge/ClawHub-Skill-blue)](https://clawhub.ai/bridgenode/skills/bridgenode)\n[![GitHub Stars](https://img.shields.io/github/stars/bridgenode-ai/bridgenode-skill?style=social)](https://github.com/bridgenode-ai/bridgenode-skill)\n\nAgent skill and buyer-side examples for [BridgeNode](https://bridgenode.cc) — AI inference bridge for AI agents. Pay per request with Solana USDC via [x402](https://docs.x402.org). No API keys, no registration.\n\n> This repository contains only the **public agent skill and usage examples**. No server code.\n\n## Why BridgeNode\n\n| | BridgeNode | API keys (OpenAI etc.) | Other x402 gateways |\n|---|---|---|---|\n| **Setup** | None — pay per request | Sign up, billing, keys | Varies |\n| **Auth** | x402 on-chain payment | API key (secret management) | x402 (some require third-party facilitators) |\n| **Gas** | Sponsored — agent needs no SOL | — | Often agent pays gas |\n| **Models** | DeepSeek, Groq — one endpoint | One provider each | Varies |\n| **Refunds** | Full refund on provider failure | Credit-based | Varies |\n| **Discovery** | `/v1/models` live pricing | Fixed plans | Varies |\n\n## Quick start\n\n```bash\n# Install the skill (teaches any agent how to pay & call)\nnpx skills add bridgenode-ai/bridgenode-skill\n```\n\n```bash\n# Or use the SDKs\npip install bridgenode-llm        # Python\nnpm i @bridgenode/llm             # TypeScript\nnpm i -g @bridgenode/mcp          # MCP server (automatic x402 payments)\n```\n\nThe x402 flow is automatic in the SDKs: the first request gets a `402` with payment requirements, the agent signs a USDC transfer (fees sponsored), and the request completes as a normal OpenAI-compatible response. See `examples/` for curl, Python, TypeScript, and MCP walkthroughs.\n\n## Install the skill\n\nThe skill teaches AI agents how to use BridgeNode: endpoints, models, pricing, and the x402 payment flow.\n\n```bash\nnpx skills add bridgenode-ai/bridgenode-skill\n```\n\n## Install the SDKs\n\n- **Python SDK:** `pip install bridgenode-llm` ([PyPI](https://pypi.org/project/bridgenode-llm)) — or the full toolkit: `pip install bridgenode`\n- **CLI:** `pip install bridgenode-cli` ([PyPI](https://pypi.org/project/bridgenode-cli))\n- **TypeScript SDK:** `npm i @bridgenode/llm` ([npm](https://www.npmjs.com/package/@bridgenode/llm))\n- **MCP wrapper:** `npm i @bridgenode/mcp` ([npm](https://www.npmjs.com/package/@bridgenode/mcp)) — stdio MCP server with automatic x402 payments\n\n## What's inside\n\n- `SKILL.md` — the agent skill\n- `examples/` — buyer-side examples (curl, Python, TypeScript, MCP)\n\n## Learn more\n\n- Website: https://bridgenode.cc\n- Agent map: https://bridgenode.cc/llms.txt\n- Models & pricing: https://bridgenode.cc/v1/models\n\n## Community\n\n- Smithery: [smithery.ai/servers/applefanaimail/bridgenode](https://smithery.ai/servers/applefanaimail/bridgenode)\n- Moltbook agent profile: https://moltbook.com/u/bridgenode_eli\n- Discord: https://discord.gg/HUpVKxJxhG\n- X (Twitter): https://x.com/eliBNx\n\n⭐ **Star this repo** — it helps AI agents discover BridgeNode.\n\n## License\n\nMIT-0\n\nFile v1.0.36:_meta.json\n\n{\n  \"ownerId\": \"kn75e7saac07527dydk1n1a8ns8bxgd6\",\n  \"slug\": \"bridgenode\",\n  \"version\": \"1.0.36\",\n  \"publishedAt\": 1790146926657\n}\n\nFile v1.0.36:AGENTS.md\n\n# AGENTS.md — BridgeNode Skill & Examples\n\nThis repository is the **public agent-facing entry point** for BridgeNode — an AI\ninference bridge for autonomous agents. It contains the agent skill and\nbuyer-side examples only. **No server code lives here.**\n\n## What BridgeNode is\n\n- OpenAI-compatible chat completions endpoint: `https://bridgenode.cc/v1/chat/completions`\n- Payment: **Solana USDC via x402** (HTTP 402 flow). No API keys, no registration.\n- Pricing: live at `https://bridgenode.cc/v1/models` — always read prices from there.\n- Models: see the live list at `https://bridgenode.cc/v1/models` (or use `mode: auto|eco|premium`).\n\n## How an agent pays (x402 flow, 4 steps)\n\n1. **POST** `/v1/chat/completions` with `{model|mode, messages, max_tokens}` → server responds **402** with a `PAYMENT-REQUIRED` header (base64 JSON: exact amount, USDC asset, `payTo`, feePayer, memo, recent blockhash).\n2. Agent builds a **partially signed transaction** (USDC `TransferChecked` + Memo with the given memo) and signs it with its own wallet (agent needs USDC in its ATA; no SOL needed — fees are sponsored).\n3. Agent retries the request with the `PAYMENT-SIGNATURE` header (base64 JSON with the signed TX + echoed `accepted`).\n4. Server verifies, settles on-chain, then streams/produces the normal OpenAI completion (`200` + `PAYMENT-RESPONSE` receipt header).\n\n## Quick start (buyer side)\n\n```bash\n# curl — full flow in examples/\ncurl -i https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"deepseek-v4-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}]}'\n# → 402 with PAYMENT-REQUIRED; sign; retry with PAYMENT-SIGNATURE → 200\n```\n\n```bash\n# Python SDK\npip install bridgenode-llm\n```\n\n```bash\n# TypeScript SDK\nnpm i @bridgenode/llm\n```\n\n```bash\n# MCP (stdio, automatic x402 payments)\nnpm i -g @bridgenode/mcp\nclaude mcp add bridgenode -- npx @bridgenode/mcp\n```\n\n## Repository layout\n\n- `SKILL.md` — the installable agent skill (also served at `https://bridgenode.cc/skill.md`; keep identical when editing either side)\n- `examples/` — buyer-side examples: curl, Python, TypeScript, MCP (each with expected output + troubleshooting)\n- `agent-registration.json` — A2A agent-card metadata\n- `glama.json` — Glama connector metadata\n\n## Development\n\n- CI runs on `.github/workflows/`: Python syntax + guardrail, TS typecheck, live smoke tests (models/402/mcp).\n- Run examples locally: `python examples/python/chat.py`, `npx tsx examples/ts/chat.ts`.\n- Changes to `SKILL.md` are auto-published to ClawHub (GitHub Actions).\n\n## Rules for contributors\n\n- English only (code, docs, commits).\n- Public-facing content only — never commit server code, config, or internal details.\n- Keep `SKILL.md` in sync with the served version at `https://bridgenode.cc/skill.md`.\n\nFile v1.0.36:SECURITY.md\n\n# Security Policy\n\n## Reporting a Vulnerability\n\nBridgeNode is an agent-to-agent (A2A) platform. If you discover a security vulnerability, please report it privately:\n\n- **Email:** eli.BNx@proton.me\n\nPlease do **not** open a public issue for security vulnerabilities.\n\n## Supported Versions\n\n| Version | Supported |\n|---|---|\n| latest | ✅ |\n\n## Security Practices\n\n- No API keys or registration required — payments via x402 (HTTP 402) with Solana USDC\n- Wallet keys live only in `.env` — never committed\n- Dependencies are audited regularly (pip-audit / npm audit)\n- License: MIT-0 (MIT No Attribution)\n\nFile v1.0.36:skill-card.md\n\n## Description:\n\nBridgeNode provides OpenAI-compatible LLM inference and MCP access for agents with x402 pay-per-request Solana USDC payments, free models, and no API keys or registration.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[bridgenode](https://clawhub.ai/user/bridgenode)\n\n### License/Terms of Use:\n\nMIT No Attribution\n\n## Use Case:\n\nDevelopers and external agent operators use this skill to give agents pay-per-request LLM inference through an OpenAI-compatible endpoint or MCP tool when they do not want to manage provider API keys or subscriptions. It is most relevant for agents that can use free models or sign x402 Solana USDC payment requests for paid models.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Paid examples and MCP setup can automatically spend real USDC.\n\nMitigation: Start with free models, use a dedicated low-balance Solana wallet, and require independent per-call and daily spending limits before running paid calls.\n\nRisk: A payment request may quote an unexpected amount, asset, or recipient.\n\nMitigation: Verify every 402 amount, USDC asset, recipient, and memo before signing a payment transaction.\n\nRisk: Unpinned package installs or npx commands can introduce supply-chain drift.\n\nMitigation: Prefer pinned package versions and review dependency changes before running examples or MCP commands.\n\n## Reference(s):\n\n- [BridgeNode website](https://bridgenode.cc)\n- [Models and pricing endpoint](https://bridgenode.cc/v1/models)\n- [BridgeNode MCP endpoint](https://bridgenode.cc/mcp)\n- [BridgeNode agent card](https://bridgenode.cc/.well-known/agent-card.json)\n- [x402 documentation](https://docs.x402.org)\n- [ClawHub skill page](https://clawhub.ai/bridgenode/skills/bridgenode)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Code, Shell commands, Configuration, Guidance]\n\n**Output Format:** [Markdown guidance with shell commands, JSON request bodies, and Python, TypeScript, curl, and MCP examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Agent calls can return OpenAI-compatible JSON chat completions, streaming responses, tool-call messages, MCP tool results, and x402 payment headers.]\n\n## Skill Version(s):\n\n1.0.36 (source: ClawHub server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.36:agent-registration.json\n\n{\n  \"type\": \"https://eips.ethereum.org/EIPS/eip-8004#registration-v1\",\n  \"name\": \"BridgeNode\",\n  \"description\": \"AI inference bridge — pay per request with Solana USDC via x402. No API keys, no registration.\",\n  \"services\": [\n    {\n      \"name\": \"MCP\",\n      \"endpoint\": \"https://bridgenode.cc/mcp\"\n    },\n    {\n      \"name\": \"A2A\",\n      \"endpoint\": \"https://bridgenode.cc/.well-known/agent-card.json\"\n    },\n    {\n      \"name\": \"OASF\",\n      \"endpoint\": \"https://bridgenode.cc/openapi.json\",\n      \"skills\": [\n        \"natural_language_processing/natural_language_generation/text_completion\"\n      ],\n      \"domains\": [\n        \"technology/software_engineering/software_engineering\"\n      ]\n    }\n  ],\n  \"active\": false,\n  \"x402Support\": true\n}\n\nArchive v1.0.35: 19 files, 32598 bytes\n\nFiles: agent-registration.json (748b), AGENTS.md (2831b), examples/curl/README.md (3791b), examples/mcp/README.md (2684b), examples/python/main.py (2963b), examples/python/README.md (2442b), examples/README.md (1550b), examples/typescript/example.ts (1419b), examples/typescript/package-lock.json (51960b), examples/typescript/package.json (418b), examples/typescript/README.md (1861b), examples/typescript/tsconfig.json (260b), glama.json (96b), LICENSE (905b), README.md (4218b), SECURITY.md (609b), skill-card.md (2371b), SKILL.md (15917b), _meta.json (130b)\n\nFile v1.0.35:SKILL.md\n\n---\nname: bridgenode\nversion: 1.0.16\ndescription: BridgeNode — x402 pay-per-request AI inference for agents. OpenAI-compatible API + MCP server with tool calling, Solana USDC, gas-free micropayments. No API keys. Free models included. Live prices: bridgenode.cc/v1/models Use when an agent lacks a provider API key or wants privacy-preserving per-request AI inference pricing.\nmetadata:\n  author: BridgeNode\n  version: \"1.0.16\"\n  url: https://bridgenode.cc\n  repository: https://github.com/bridgenode-ai/bridgenode-skill\n  network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\n  currency: USDC\n  openclaw:\n    emoji: \"⚡\"\n    homepage: https://bridgenode.cc\ncompatibility: Any OpenAI-compatible agent with x402 payment support; MCP clients (streamable-http)\n---\n\n# BridgeNode\n\n## Overview (natural language)\n\nBridgeNode is an AI inference service for agents: anonymous LLM access without API keys, without registration, without subscriptions. Agents get an OpenAI-compatible chat completions endpoint and pay as they go with Solana USDC micropayments via the x402 payment protocol (HTTP 402). Model prices are published per token on the public models endpoint; transaction fees are sponsored, so an agent only needs USDC in its own wallet. Works with any OpenAI-compatible agent, MCP clients, and x402-capable SDKs.\n\n\n## Free access (start here — no payment, no wallet)\n\n- **Free models** (`gpt-oss-20b, gpt-oss-120b, glm-4.7-flash, glm-4.5-flash, glm-4.6v-flash`) are served without payment: no 402, no wallet, no gas. Same endpoint, same request body.\n\n**Free model notes (read before choosing one):**\n- `glm-4.7-flash` — ⚠️ **temporarily unreliable**: z.ai free model: slower than the Groq free models — a reply can take up to a minute, and the provider is sometimes overloaded. If it returns an error (rate limit / temporarily overloaded), retry once or switch to gpt-oss-20b, the most reliable free model.\n- `glm-4.5-flash` — ⚠️ **temporarily unreliable**: z.ai free model: slower than the Groq free models — a reply can take up to a minute, and the provider is sometimes overloaded. If it returns an error (rate limit / temporarily overloaded), retry once or switch to gpt-oss-20b, the most reliable free model.\n- `glm-4.6v-flash`: z.ai free model: slower than the Groq free models — a reply can take up to a minute, and the provider is sometimes overloaded. If it returns an error (rate limit / temporarily overloaded), retry once or switch to gpt-oss-20b, the most reliable free model.\n- **Free trials:** a client that has never called us gets **2 free calls on PAID models** without payment — real inference from a real model before any wallet exists. The remaining count travels in the response headers (`X-Bridgenode-Free-Trials-Remaining`).\n- When the trials are used up, the third call returns **402** with a machine-readable offer in `extensions.bridgenode` (free models, trials left, `how_to_pay`, `docs`) — not a dead end.\n- Check the live list: `GET https://bridgenode.cc/v1/models` (`\"free\": true`).\n\nThis applies to every transport: HTTP (`https://bridgenode.cc/v1`), MCP (`https://bridgenode.cc/mcp`) and the SDKs — no wallet key is needed for the free path.\n\n## Limits (published — counted per client, and enforced exactly like this)\n- **One client =** a wallet with payment history, otherwise your network (/24 IPv4, /64 IPv6).\n- **Free trials:** 2 calls on PAID models (one-off, per client).\n- **Daily free budget:** 200 calls and 100,000 tokens per client per day (FREE MODELS AND TRIALS together, resets 00:00 UTC). Over it → **429** `free_daily_quota_exhausted` with `Retry-After`.\n- **Per free model, our own daily ceiling:** `gpt-oss-120b` 160,000, `gpt-oss-20b` 160,000 tokens/day (shared by all clients). Reached → **429** `free_budget_exhausted` naming a model that still works — we stop before the provider does.\n- **Rate:** 30 free requests/minute per client; 10 payment challenges/minute.\n- **Concurrency:** 20 free calls at once across all clients. Over it → **503** `free_path_busy` + `Retry-After` (never a silent queue).\n- **Every free answer carries the numbers:** `X-Bridgenode-Free-Quota-Limit`, `X-Bridgenode-Free-Quota-Remaining`, `X-Bridgenode-Free-Quota-Reset`, `X-Bridgenode-Free-Quota-Tokens-Limit`, `X-Bridgenode-Free-Quota-Tokens-Remaining`, `X-Bridgenode-Free-Trials-Remaining`.\n- **Paid requests (x402) are never affected by any of these limits** — they neither wait for free traffic nor share its budgets.\n\n\n## ⚠️ Cost Warning (read first)\n\nThis skill **spends real money (USDC)** on PAID requests via on-chain Solana USDC micropayments (x402). There are no refunds once the provider has responded. Check live prices at `GET /v1/models` before use, set `max_tokens` to control cost, and use client-side spending limits (`BRIDGENODE_MAX_PER_CALL`, `BRIDGENODE_DAILY_CAP`) if available. Free models and the free trials never spend anything.\n\n\nBridgeNode is an AI inference bridge. Agents get an OpenAI-compatible endpoint and pay per request with Solana USDC via the x402 protocol. No API keys, no registration, no subscriptions. Transaction fees (SOL) are sponsored by BridgeNode — the agent only needs USDC in its wallet.\n\n## When to Use\n\n- The agent needs LLM inference (chat completions) but has no provider API key.\n- Pay-per-request is preferred over monthly subscriptions.\n- **The agent has no wallet yet** — free models and the free trials work without payment (start there).\n- The agent has a Solana wallet with USDC (or can receive it) and supports x402 payments.\n- Deterministic, transparent per-request pricing is required.\n- MCP-based agents that need a paid inference tool.\n\n## Endpoints\n\n| Endpoint | Purpose |\n|---|---|\n\n## Models & Pricing\n\nPrices are in USDC per token (6 decimals). Always fetch live prices from `GET /v1/models` — they are the single source of truth and are generated from server config (never hardcoded here — stale prices cost money).\n\n**🆓 Free models (no payment, no API key, no registration) are included** — no 402, no wallet, no gas. Live free list: `GET https://bridgenode.cc/v1/models`.\n\n**Paid models (pay-per-request):** DeepSeek, GLM (Z.AI), Kimi (Moonshot), MiniMax. Full list with live prices: `GET https://bridgenode.cc/v1/models`.\n\n| Model | Input / token | Output / token | Context window | Max output | Tools |\n|---|---|---|---|---|---|\n\nPricing model: **exact scheme** — the agent pays for `input tokens + max_tokens` **before** processing. If the model generates fewer than `max_tokens`, the agent still pays for `max_tokens` (this is the business model, not a bug). Minimum charge per request: 2000 atomic units = $0.002 USDC.\n\n## Tool Calling (function calling)\n\nSend OpenAI-style `tools` (+ optional `tool_choice`) — they are forwarded to the model **unchanged** (free and paid models, HTTP and MCP, streaming and non-streaming). The answer is the provider's own: text, or `choices[0].message.tool_calls` with `finish_reason: \"tool_calls\"`.\n\nContinue like any OpenAI client: send the assistant turn back with **`content: null` and its `tool_calls`**, then one `role: \"tool\"` message per call with `tool_call_id`.\n\n- The **tool schema counts as input tokens** — it is priced and context-checked like your messages.\n- **Free models have a small token budget** (see the table above); a large tool list will not fit. Use a paid model for agentic loops.\n- The `Tools` column marks models verified to accept tool calling. Unmarked = unverified, not necessarily unsupported.\n\n## Reasoning Models — Important\n\n- Many providers enable thinking/reasoning by default; reasoning tokens **SHARE** the `max_tokens` budget with the answer.\n- Use `max_tokens >= 200` — a too-small limit can be fully consumed by reasoning, producing an **EMPTY answer** (the model returns 200 with no content).\n- **An empty answer is retried and refunded**: we retry once automatically with a bigger budget; if the answer is still empty you get an error with the reason and a FULL refund — you never pay for an answer you did not receive.\n- Thinking is disabled on: `glm-4.7-flash`, `deepseek-flash`, `deepseek-v4-pro` (these are safe at smaller `max_tokens`). All other models may reason by default — treat `max_tokens < 200` as at-risk.\n- Prefer `stream: true` for long generations (non-stream is capped at 4096).\n- If you use tools with a thinking model: you MUST return `reasoning_content` in the next turn, otherwise the API returns 400.\n\n## Payment Flow (x402 V2, exact scheme)\n\n1. Send the request without payment headers.\n2. Server responds `402 Payment Required` with a `PAYMENT-REQUIRED` header (base64 JSON): price, `payTo` address, USDC mint, memo, recent blockhash.\n3. Agent constructs a **partial transaction**: USDC `TransferChecked` (amount = required) + Memo instruction, signs with its own wallet. Fee payer is NOT signed by the agent.\n4. Agent retries the request with `PAYMENT-SIGNATURE` header (base64 JSON payload with the signed transaction).\n5. Server verifies the payment and processes the request (fees sponsored — gasless for the agent).\n6. Response is `200` with `PAYMENT-RESPONSE` header (settlement receipt).\n\nKey details:\n\n- Network: `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` (Solana mainnet)\n- Asset: USDC `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`\n- The agent must have an existing USDC ATA (associated token account) for the mint.\n- The agent does **not** need SOL — BridgeNode sponsors transaction fees.\n- Use the official x402 SDKs (`@x402/svm`, `x402[svm]`) or any x402-capable client — they handle the 402 → sign → retry flow automatically.\n\n## Funding\n\n- Requires USDC on Solana mainnet (no API keys, no registration)\n- The agent keeps USDC in its own wallet — BridgeNode never holds balances; every request is paid individually via x402 (exact amount quoted in the 402 response)\n- The agent must have an existing USDC ATA (associated token account) for the mint — it is derived from the agent's wallet address; no manual token account setup needed\n- Gasless: BridgeNode sponsor covers Solana fees\n- Optional client-side spending limits (SDK, enforced locally before signing — not server balances): `BRIDGENODE_MAX_PER_CALL`, `BRIDGENODE_DAILY_CAP`\n\n## Quick Start (curl)\n\nStep 0 — first call, free (copy this one): the leading free model answers\nwithout payment and without a wallet. Keep `max_tokens >= 200` — a smaller\nlimit can be consumed by reasoning and return an EMPTY answer.\n\n```bash\ncurl https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"gpt-oss-20b\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":200}'\n```\n\nResponse: `200` directly — no `402`, no `PAYMENT-REQUIRED`.\n\nStep 1 — get payment requirements for a PAID model:\n\n```bash\ncurl https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"deepseek-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":200}'\n```\n\nResponse: `402` with `PAYMENT-REQUIRED` header (amount, payTo, memo).\n\nStep 2 — sign the partial transaction with an x402-capable client (e.g. `x402-proxy` (npx x402-proxy), official SDK, or `pay` CLI) and retry:\n\n```bash\ncurl https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"PAYMENT-SIGNATURE: <base64 payload>\" \\\n  -d '{\"model\":\"deepseek-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":200}'\n```\n\nResponse: `200` with the completion and `PAYMENT-RESPONSE` header.\n\n## Quick Start (Python, x402 SDK)\n\n```python\n# pip install \"x402[svm]\"\n# Official x402 client handles the full 402 -> sign -> retry loop.\n```\n\nUse the official `x402` Python client (`x402[svm]`) configured with the agent's Solana keypair; point it at `https://bridgenode.cc/v1/chat/completions`. Payment is automatic.\n\n## SDKs\n\n- **Python SDK:** `pip install bridgenode-llm` (https://pypi.org/project/bridgenode-llm) — full toolkit: `pip install bridgenode`\n- **CLI:** `pip install bridgenode-cli` (https://pypi.org/project/bridgenode-cli) — `bridgenode chat \"Hello!\"`\n- **TypeScript SDK:** `npm i @bridgenode/llm` (https://www.npmjs.com/package/@bridgenode/llm)\n- **MCP wrapper:** `npm i @bridgenode/mcp` (https://www.npmjs.com/package/@bridgenode/mcp)\n\nAll SDKs handle the x402 payment handshake automatically (402 → sign → retry → 200), with fail-closed spending limits (`BRIDGENODE_MAX_PER_CALL`, `BRIDGENODE_DAILY_CAP`).\n\n## MCP Usage\n\n- One-line install: `claude mcp add bridgenode -s user -- npx -y @bridgenode/mcp@latest`\n- Server URL: `https://bridgenode.cc/mcp` (streamable-http)\n- Tool: `chat_completions` (model, mode, messages, max_tokens)\n- Payment: x402 handshake per tool call; prices are annotated in `tools/list` (`x-x402`) as an indication — always check the actual amount in the 402 response before signing.\n\n## Request Options\n\n- `model`: explicit model ID from `/v1/models` (e.g. `deepseek-flash`).\n- `mode`: smart routing — `auto` (complexity-based tier), `eco` (cheapest), `premium` (best). If both `model` and `mode` are sent, `model` wins.\n- `max_tokens`: request cap (default 4096, clamped to model max). A non-stream request above `non_stream_max_tokens` (published per model in `/v1/models`) is clamped to it, never rejected — use `stream: true` for longer generations.\n- `stream`: SSE streaming supported (`stream: true`).\n- `tools`: OpenAI-style function definitions the model may call (forwarded unchanged; the schema counts as input tokens — see Tool Calling above).\n- `tool_choice`: `auto` / `none` / `required`, or a forced function object.\n\n## Errors\n\n| Status | Meaning |\n|---|---|\n| 400 | Bad request (unknown model, invalid body, oversized non-stream max_tokens) |\n| 402 | Payment required — see `PAYMENT-REQUIRED` header |\n| 413 | Request body too large (limit 2 MB) |\n| 429 | Too many requests (queue limit) |\n| 503 | Service busy — retry with backoff |\n\nAll errors use the OpenAI error format: `{\"error\": {\"message\": ..., \"type\": ..., \"code\": ...}}`.\n\n## Notes\n- Security: ClawHub security audit Pass; VirusTotal scan clean (no engine findings).\n\n- Discovery: `https://bridgenode.cc/.well-known/agent-card.json`, `https://bridgenode.cc/.well-known/mcp.json`, `https://bridgenode.cc/.well-known/ai-manifest.json`\n- Listed on x402-list: https://x402-list.com/services/bridgenode\n- Listed on x402-dev: https://www.x402dev.com/awesome-projects/\n- Listed on nohumans.directory: https://nohumans.directory/l/f1f74751-9d5\n- Listed on gold-402: https://github.com/Haustorium12/gold-402/blob/main/directory/learning.md\n- ClawHub skill: https://clawhub.ai/bridgenode/skills/bridgenode\n- Transaction fees are sponsored (gasless) — the agent only needs USDC in its own wallet.\n- Refunds: if the provider fails before any content is delivered, the payment is refunded automatically (reverse USDC transfer).\n\n## Conformance (x402 v2, `exact`)\n\nFacts you can check, not a badge (fix.md 6.1):\n\n- `x402Version` **2**, scheme **`exact`**, network **`solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`** (Solana mainnet, CAIP-2).\n- Asset: **USDC** `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` (6 decimals); `amount` is an **atomic string** (`\"2000\"` = 0.002 USDC).\n- `payTo` and `extra.feePayer` are the same address — the agent needs **no SOL** (gasless).\n- The 402 body is a `PaymentRequired` envelope, validated against the **official x402 SDK** schemas; the live check passes 17/17 (envelope fields, `/supported`, `/verify` semantics, and a real settlement verified on-chain).\n- **Self-facilitated:** `GET /supported`, `POST /verify`, `POST /settle` are served by BridgeNode itself (declared in `https://bridgenode.cc/.well-known/x402`) — no third party between the agent and us.\n- `/verify` follows the spec: a payment that does not verify is answered **`200 {isValid: false, invalidReason}`**; only a malformed request body is a 400.\n\nFile v1.0.35:examples/curl/README.md\n\n# BridgeNode curl example\n\nManual x402 flow with curl. This shows the protocol steps; for automatic\npayment handling use [x402curl](https://github.com/second-state/x402-skill)\n(drop-in curl replacement) or the SDK examples.\n\n> ⚠️ Mainnet warning: Solana mainnet, real USDC. Minimum charge: $0.002.\n> Check the 402 `amount` before signing.\n\n## Step 1 — Request, get 402\n\n```bash\ncurl -sS -D - -o /dev/null https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"deepseek-v4-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":100}'\n```\n\nExpected: `HTTP/1.1 402 Payment Required` with a `PAYMENT-REQUIRED` header\n(base64 JSON: scheme, network, amount, asset, payTo, memo, feePayer).\n\n## Step 2 — Sign the partial transaction\n\nDecode the `PAYMENT-REQUIRED` header and sign a partial transaction:\nUSDC `TransferChecked` (amount from the 402) + Memo instruction, signed with\nthe agent's Solana keypair. The fee payer is NOT signed by the agent —\nBridgeNode sponsors gas.\n\nUse any x402-capable signer: `x402curl`, the official SDKs (`x402[svm,httpx]`,\n`@x402/svm`), or the Solana `pay` CLI. This produces a base64 JSON payload\n(`x402Version`, `resource`, `accepted`, `payload.transaction`).\n\n## Step 3 — Retry with PAYMENT-SIGNATURE\n\n```bash\nPAYLOAD=\"<base64 JSON from step 2>\"\ncurl -sS https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"PAYMENT-SIGNATURE: $PAYLOAD\" \\\n  -d '{\"model\":\"deepseek-v4-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":100}'\n```\n\nExpected: `200 OK` with the completion and a `PAYMENT-RESPONSE` header\n(settlement receipt).\n\n## Automatic alternative — x402curl\n\n```bash\n# install: https://github.com/second-state/x402-skill\n# config: X402_PRIVATE_KEY=... (agent's Solana keypair)\nx402curl -sS https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"deepseek-v4-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":100}'\n```\n\nx402curl detects the 402, signs the payment, and retries automatically.\n\n## Expected output (Step 1)\n\n```\nHTTP/2 402\npayment-required: <base64 JSON — scheme, network, amount, asset, payTo, memo, feePayer, recentBlockhash>\n{\"x402Version\":2,\"error\":\"PAYMENT-SIGNATURE header is required\",\"resource\":{...},\"accepts\":[{\"scheme\":\"exact\",\"network\":\"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\",\"asset\":\"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\"amount\":\"2000\",\"payTo\":\"<BridgeNode wallet>\",\"maxTimeoutSeconds\":30,\"extra\":{...}}]}\n```\n\n## Expected output (Step 3, after signing)\n\n```\nHTTP/2 200\npayment-response: <base64 JSON — SettlementResponse: success, payer, transaction, network, amount>\n{\"id\":\"...\",\"object\":\"chat.completion\",\"model\":\"deepseek-v4-flash\",\"choices\":[...],\"usage\":{...}}\n```\n\n- The exact `amount` comes from the 402 response (minimum charge: 2000 atomic units = $0.002).\n- Live prices always: `GET https://bridgenode.cc/v1/models`.\n\n## Troubleshooting\n\n- **`402` instead of `200`** — expected on the first request; that is the payment challenge, not an error.\n- **`400 Bad request`** — unknown model, invalid body, or `max_tokens` above the non-stream cap (use `stream: true` for long generations).\n- **`503 Service busy`** — retry with backoff.\n- **Signing fails** — use `x402curl`, the official SDKs (`x402[svm,httpx]`, `@x402/svm`), or the Solana `pay` CLI; the fee payer is NOT signed by the agent.\n- **Empty answer from reasoning models** — use `max_tokens >= 200`.\n\n## Notes\n\n- Network: `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` (mainnet)\n- Asset: USDC `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`\n- The agent needs a USDC ATA, but no SOL (gas sponsored).\n- Free: `GET https://bridgenode.cc/v1/models` (models + prices).\n\nFile v1.0.35:examples/mcp/README.md\n\n# BridgeNode MCP example\n\nCall BridgeNode through its MCP server with x402 payment.\n\n## Server\n\n- URL: `https://bridgenode.cc/mcp` (streamable-http)\n- Tool: `chat_completions` (model | mode, messages, max_tokens)\n- Payment: x402 handshake per tool call (via `_meta[\"x402/payment\"]`)\n\nPrices are annotated in `tools/list` (`x-x402`) as an indication; the actual\namount is in the 402 response — always check it before signing.\n\n## Option A — one-command wrapper (any MCP client)\n\n```bash\nnpx -y @bridgenode/mcp@latest\n```\n\nUse this as the MCP server command in your client (Claude Code, Cursor,\nWindsurf, etc.). The wrapper connects to `https://bridgenode.cc/mcp` and\nhandles x402 payment automatically with the agent's wallet.\n\nClaude Code example:\n\n```bash\nclaude mcp add bridgenode -- npx -y @bridgenode/mcp@latest\n```\n\n## Option B — direct streamable-http\n\nConfigure your MCP client with:\n\n```\nURL: https://bridgenode.cc/mcp\nTransport: streamable-http\n```\n\n## What the agent sees\n\n1. `tools/list` → `chat_completions` with `x-x402` price annotation.\n2. `tools/call` → server returns payment required (result with\n   `structuredContent` PaymentRequired object).\n3. Client signs the USDC transaction, retries the call with\n   `_meta[\"x402/payment\"]`.\n4. Server settles, runs inference, returns the completion with\n   `_meta[\"x402/payment-response\"]` (settlement receipt).\n\n## Expected output (`tools/list`)\n\n```json\n{\"result\":{\"tools\":[{\"name\":\"chat_completions\",\"title\":\"Chat completions with x402 payment\",\"description\":\"Send a chat completion request to any supported model. Paid tool: x402 payment (Solana USDC) is required — the first call returns 402 with the exact price; retry with _meta[\\\"x402/payment\\\"]. ...\",\"inputSchema\":{...},\"x-x402\":{\"scheme\":\"exact\",\"network\":\"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\",\"amount\":\"2000\",\"asset\":\"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\"payTo\":\"<BridgeNode wallet>\"}}]}}\n```\n\n- The `x-x402` amount is **indicative** (floor); the exact amount is in the 402 response — always check it before signing.\n\n## Troubleshooting\n\n- **`tools/call` returns payment required** — expected on the first call; that is the x402 challenge, not an error.\n- **Client can't connect** — use the one-command wrapper (`npx -y @bridgenode/mcp@latest`) or point the client at `https://bridgenode.cc/mcp` with `streamable-http`.\n- **`503 Service busy`** — retry with backoff.\n- **Empty answer from reasoning models** — use `max_tokens >= 200`.\n\n## Notes\n\n- Solana mainnet, real USDC. Minimum charge: $0.002 per request.\n- Gas sponsored by BridgeNode — the agent only needs USDC, no SOL.\n- Free tools (e.g., model list) skip payment.\n\nFile v1.0.35:examples/python/README.md\n\n# BridgeNode Python example\n\nBuyer-side example: AI agent pays for and calls BridgeNode with the official\nx402 Python SDK (`x402[svm,httpx]`).\n\n## Setup\n\n```bash\npip install \"x402[svm,httpx]\" \"solana==0.39.0\" python-dotenv\ncp .env.example .env\n# fill SVM_PRIVATE_KEY (agent's Solana keypair, must have USDC ATA)\n```\n\n## Run\n\n```bash\npython main.py\n```\n\n## What it does\n\n1. `GET /v1/models` — free, lists models and prices.\n2. `POST /v1/chat/completions` — x402 payment handled automatically:\n   request → 402 → sign partial TX (USDC TransferChecked + Memo) →\n   retry with `PAYMENT-SIGNATURE` → 200 + `PAYMENT-RESPONSE`.\n\n## Expected output\n\n```\nInitialized SVM account: <your wallet address>\nModels & prices: {\"object\":\"list\",\"data\":[{\"id\":\"deepseek-v4-flash\",\"pricing\":{\"prompt\":2e-07,\"completion\":4e-07},...}]}\n\nPOST https://bridgenode.cc/v1/chat/completions\nStatus: 200\nBody: {\"id\":\"...\",\"object\":\"chat.completion\",\"model\":\"deepseek-v4-flash\",\"choices\":[...],\"usage\":{...}}\n\nPayment response: {\n  \"success\": true,\n  \"payer\": \"<your wallet address>\",\n  \"transaction\": \"<signature>\",\n  \"network\": \"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\",\n  \"amount\": \"2000\"\n}\n```\n\n- The exact `amount` comes from the 402 response (minimum charge: 2000 atomic units = $0.002).\n- Live prices always: `GET https://bridgenode.cc/v1/models`.\n\n## Troubleshooting\n\n- **`SVM_PRIVATE_KEY missing`** — copy `.env.example` to `.env` and fill in the keypair.\n- **`InsufficientFunds` / payment rejected** — the wallet needs a USDC ATA with balance on Solana mainnet.\n- **`Invalid account`** — the agent must have an existing USDC ATA (it is derived from the wallet address automatically when funded).\n- **`402` spam / timeout** — the server rate-limits 402 responses per IP; wait a moment and retry.\n- **Empty answer from reasoning models** — use `max_tokens >= 200`; too-small limits can produce an empty response (service was provided, no refund).\n\n## Notes\n\n- Solana mainnet, real USDC. Minimum charge: $0.002 per request.\n- Gas is sponsored by BridgeNode — the agent only needs USDC, no SOL.\n- The agent must have an existing USDC ATA (associated token account).\n- Funding: send USDC on Solana mainnet to the agent's own wallet — BridgeNode never holds balances; every request is paid individually via x402 (exact amount in the 402 response). The USDC ATA is derived from the agent's wallet address; no manual token account setup needed.\n\nFile v1.0.35:examples/README.md\n\n# BridgeNode Examples\n\nBuyer-side examples: how an AI agent pays for and calls BridgeNode via x402.\n\nAll examples are **client-side only** — they use the public x402 SDKs and the\npublic BridgeNode endpoint (`https://bridgenode.cc/v1`). No server code.\n\n> ⚠️ **Mainnet warning:** BridgeNode runs on Solana mainnet with real USDC.\n> Use a wallet with a small balance. Minimum charge per request: $0.002 USDC.\n> Check the 402 `amount` before signing.\n\n## Contents\n\n| Example | Stack | What it shows |\n|---|---|---|\n| [curl/](curl/README.md) | curl + x402curl | Manual x402 flow: request → 402 → sign → retry |\n| [python/](python/README.md) | Python + `x402[svm,httpx]` | OpenAI-compatible call with automatic payment |\n| [typescript/](typescript/README.md) | TypeScript + `@x402/svm` | Fetch wrapper with automatic payment |\n| [mcp/](mcp/README.md) | MCP client | Paid tool call through the BridgeNode MCP server |\n\n## Flow (x402 V2, exact scheme)\n\n1. `POST /v1/chat/completions` without payment → server responds `402` with a\n   `PAYMENT-REQUIRED` header (base64 JSON: amount, payTo, memo).\n2. Client signs a partial transaction: USDC `TransferChecked` + Memo.\n3. Client retries with `PAYMENT-SIGNATURE` header.\n4. Server verifies, settles (gas sponsored by BridgeNode), returns `200` with a\n   `PAYMENT-RESPONSE` header (settlement receipt).\n\nNetwork: `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` (mainnet) · Asset: USDC\n`EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`\n\nModels and live prices: `GET https://bridgenode.cc/v1/models` (free).\n\nFile v1.0.35:examples/typescript/README.md\n\n# BridgeNode TypeScript example\n\nBuyer-side example: AI agent pays for and calls BridgeNode with the official\nx402 TS SDKs (`@x402/fetch` + `@x402/svm`).\n\n## Setup\n\n```bash\nnpm install\ncp .env.example .env\n# fill SVM_PRIVATE_KEY (agent's Solana keypair, must have USDC ATA)\n```\n\n## Run\n\n```bash\nnpm run start\n```\n\n## What it does\n\n1. Registers the Solana exact payment scheme.\n2. `POST /v1/chat/completions` through `wrapFetchWithPayment` — 402 handled\n   automatically: sign partial TX → retry with `PAYMENT-SIGNATURE` → 200.\n3. Prints the payment response (settlement receipt).\n\n## Expected output\n\n```\nPOST https://bridgenode.cc/v1/chat/completions\n\n{\n  id: '...',\n  object: 'chat.completion',\n  model: 'deepseek-v4-flash',\n  choices: [ { index: 0, message: { role: 'assistant', content: 'Hello!' }, finish_reason: 'stop' } ],\n  usage: { prompt_tokens: 10, completion_tokens: 4, total_tokens: 14 },\n  header: {\n    success: true,\n    payer: '<your wallet address>',\n    transaction: '<signature>',\n    network: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',\n    amount: '2000'\n  }\n}\n```\n\n- The exact `amount` comes from the 402 response (minimum charge: 2000 atomic units = $0.002).\n- Live prices always: `GET https://bridgenode.cc/v1/models`.\n\n## Troubleshooting\n\n- **`SVM_PRIVATE_KEY` missing** — copy `.env.example` to `.env` and fill in the keypair.\n- **`InsufficientFunds` / payment rejected** — the wallet needs a USDC ATA with balance on Solana mainnet.\n- **TypeScript compile errors** — run `npm install` first; requires Node 20+.\n- **`503 Service busy`** — retry with backoff.\n- **Empty answer from reasoning models** — use `max_tokens >= 200`.\n\n## Notes\n\n- Solana mainnet, real USDC. Minimum charge: $0.002 per request.\n- Gas is sponsored by BridgeNode — the agent only needs USDC, no SOL.\n- The agent must have an existing USDC ATA.\n\nFile v1.0.35:README.md\n\n# BridgeNode Skill & Examples\n\n[![PyPI version](https://img.shields.io/pypi/v/bridgenode-llm.svg)](https://pypi.org/project/bridgenode-llm/)\n[![Downloads](https://img.shields.io/pypi/dm/bridgenode-llm.svg)](https://pypi.org/project/bridgenode-llm/)\n[![npm version](https://img.shields.io/npm/v/@bridgenode/llm.svg)](https://www.npmjs.com/package/@bridgenode/llm)\n[![npm version](https://img.shields.io/npm/v/@bridgenode/mcp.svg)](https://www.npmjs.com/package/@bridgenode/mcp)\n[![License: MIT-0](https://img.shields.io/badge/License-MIT--0-yellow.svg)](https://opensource.org/license/mit-0/)\n[![CI](https://img.shields.io/github/actions/workflow/status/bridgenode-ai/bridgenode-skill/ci.yml)](https://github.com/bridgenode-ai/bridgenode-skill/actions)\n[![BridgeNode on x402-list](https://x402-list.com/badge/bridgenode.svg)](https://x402-list.com/services/bridgenode?utm_source=badge&utm_medium=referral&utm_campaign=embed)\n[![BridgeNode uptime on x402-list](https://x402-list.com/badge/bridgenode.svg?data=uptime)](https://x402-list.com/services/bridgenode?utm_source=badge&utm_medium=referral&utm_campaign=embed)\n[![BridgeNode on ClawHub](https://img.shields.io/badge/ClawHub-Skill-blue)](https://clawhub.ai/bridgenode/skills/bridgenode)\n[![GitHub Stars](https://img.shields.io/github/stars/bridgenode-ai/bridgenode-skill?style=social)](https://github.com/bridgenode-ai/bridgenode-skill)\n\nAgent skill and buyer-side examples for [BridgeNode](https://bridgenode.cc) — AI inference bridge for AI agents. Pay per request with Solana USDC via [x402](https://docs.x402.org). No API keys, no registration.\n\n> This repository contains only the **public agent skill and usage examples**. No server code.\n\n## Why BridgeNode\n\n| | BridgeNode | API keys (OpenAI etc.) | Other x402 gateways |\n|---|---|---|---|\n| **Setup** | None — pay per request | Sign up, billing, keys | Varies |\n| **Auth** | x402 on-chain payment | API key (secret management) | x402 (some require third-party facilitators) |\n| **Gas** | Sponsored — agent needs no SOL | — | Often agent pays gas |\n| **Models** | DeepSeek, Groq — one endpoint | One provider each | Varies |\n| **Refunds** | Full refund on provider failure | Credit-based | Varies |\n| **Discovery** | `/v1/models` live pricing | Fixed plans | Varies |\n\n## Quick start\n\n```bash\n# Install the skill (teaches any agent how to pay & call)\nnpx skills add bridgenode-ai/bridgenode-skill\n```\n\n```bash\n# Or use the SDKs\npip install bridgenode-llm        # Python\nnpm i @bridgenode/llm             # TypeScript\nnpm i -g @bridgenode/mcp          # MCP server (automatic x402 payments)\n```\n\nThe x402 flow is automatic in the SDKs: the first request gets a `402` with payment requirements, the agent signs a USDC transfer (fees sponsored), and the request completes as a normal OpenAI-compatible response. See `examples/` for curl, Python, TypeScript, and MCP walkthroughs.\n\n## Install the skill\n\nThe skill teaches AI agents how to use BridgeNode: endpoints, models, pricing, and the x402 payment flow.\n\n```bash\nnpx skills add bridgenode-ai/bridgenode-skill\n```\n\n## Install the SDKs\n\n- **Python SDK:** `pip install bridgenode-llm` ([PyPI](https://pypi.org/project/bridgenode-llm)) — or the full toolkit: `pip install bridgenode`\n- **CLI:** `pip install bridgenode-cli` ([PyPI](https://pypi.org/project/bridgenode-cli))\n- **TypeScript SDK:** `npm i @bridgenode/llm` ([npm](https://www.npmjs.com/package/@bridgenode/llm))\n- **MCP wrapper:** `npm i @bridgenode/mcp` ([npm](https://www.npmjs.com/package/@bridgenode/mcp)) — stdio MCP server with automatic x402 payments\n\n## What's inside\n\n- `SKILL.md` — the agent skill\n- `examples/` — buyer-side examples (curl, Python, TypeScript, MCP)\n\n## Learn more\n\n- Website: https://bridgenode.cc\n- Agent map: https://bridgenode.cc/llms.txt\n- Models & pricing: https://bridgenode.cc/v1/models\n\n## Community\n\n- Smithery: [smithery.ai/servers/applefanaimail/bridgenode](https://smithery.ai/servers/applefanaimail/bridgenode)\n- Moltbook agent profile: https://moltbook.com/u/bridgenode_eli\n- Discord: https://discord.gg/HUpVKxJxhG\n- X (Twitter): https://x.com/eliBNx\n\n⭐ **Star this repo** — it helps AI agents discover BridgeNode.\n\n## License\n\nMIT-0\n\nFile v1.0.35:_meta.json\n\n{\n  \"ownerId\": \"kn75e7saac07527dydk1n1a8ns8bxgd6\",\n  \"slug\": \"bridgenode\",\n  \"version\": \"1.0.35\",\n  \"publishedAt\": 1789735192704\n}\n\nFile v1.0.35:AGENTS.md\n\n# AGENTS.md — BridgeNode Skill & Examples\n\nThis repository is the **public agent-facing entry point** for BridgeNode — an AI\ninference bridge for autonomous agents. It contains the agent skill and\nbuyer-side examples only. **No server code lives here.**\n\n## What BridgeNode is\n\n- OpenAI-compatible chat completions endpoint: `https://bridgenode.cc/v1/chat/completions`\n- Payment: **Solana USDC via x402** (HTTP 402 flow). No API keys, no registration.\n- Pricing: live at `https://bridgenode.cc/v1/models` — always read prices from there.\n- Models: see the live list at `https://bridgenode.cc/v1/models` (or use `mode: auto|eco|premium`).\n\n## How an agent pays (x402 flow, 4 steps)\n\n1. **POST** `/v1/chat/completions` with `{model|mode, messages, max_tokens}` → server responds **402** with a `PAYMENT-REQUIRED` header (base64 JSON: exact amount, USDC asset, `payTo`, feePayer, memo, recent blockhash).\n2. Agent builds a **partially signed transaction** (USDC `TransferChecked` + Memo with the given memo) and signs it with its own wallet (agent needs USDC in its ATA; no SOL needed — fees are sponsored).\n3. Agent retries the request with the `PAYMENT-SIGNATURE` header (base64 JSON with the signed TX + echoed `accepted`).\n4. Server verifies, settles on-chain, then streams/produces the normal OpenAI completion (`200` + `PAYMENT-RESPONSE` receipt header).\n\n## Quick start (buyer side)\n\n```bash\n# curl — full flow in examples/\ncurl -i https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"deepseek-v4-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}]}'\n# → 402 with PAYMENT-REQUIRED; sign; retry with PAYMENT-SIGNATURE → 200\n```\n\n```bash\n# Python SDK\npip install bridgenode-llm\n```\n\n```bash\n# TypeScript SDK\nnpm i @bridgenode/llm\n```\n\n```bash\n# MCP (stdio, automatic x402 payments)\nnpm i -g @bridgenode/mcp\nclaude mcp add bridgenode -- npx @bridgenode/mcp\n```\n\n## Repository layout\n\n- `SKILL.md` — the installable agent skill (also served at `https://bridgenode.cc/skill.md`; keep identical when editing either side)\n- `examples/` — buyer-side examples: curl, Python, TypeScript, MCP (each with expected output + troubleshooting)\n- `agent-registration.json` — A2A agent-card metadata\n- `glama.json` — Glama connector metadata\n\n## Development\n\n- CI runs on `.github/workflows/`: Python syntax + guardrail, TS typecheck, live smoke tests (models/402/mcp).\n- Run examples locally: `python examples/python/chat.py`, `npx tsx examples/ts/chat.ts`.\n- Changes to `SKILL.md` are auto-published to ClawHub (GitHub Actions).\n\n## Rules for contributors\n\n- English only (code, docs, commits).\n- Public-facing content only — never commit server code, config, or internal details.\n- Keep `SKILL.md` in sync with the served version at `https://bridgenode.cc/skill.md`.\n\nFile v1.0.35:SECURITY.md\n\n# Security Policy\n\n## Reporting a Vulnerability\n\nBridgeNode is an agent-to-agent (A2A) platform. If you discover a security vulnerability, please report it privately:\n\n- **Email:** eli.BNx@proton.me\n\nPlease do **not** open a public issue for security vulnerabilities.\n\n## Supported Versions\n\n| Version | Supported |\n|---|---|\n| latest | ✅ |\n\n## Security Practices\n\n- No API keys or registration required — payments via x402 (HTTP 402) with Solana USDC\n- Wallet keys live only in `.env` — never committed\n- Dependencies are audited regularly (pip-audit / npm audit)\n- License: MIT-0 (MIT No Attribution)\n\nFile v1.0.35:skill-card.md\n\n## Description:\n\nBridgeNode provides anonymous pay-per-request LLM inference for agents through an OpenAI-compatible chat completions API and MCP server, with x402 Solana USDC payments and free model access.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[bridgenode](https://clawhub.ai/user/bridgenode)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and external agent builders use this skill to add LLM chat completions when they do not have a provider API key or want per-request pricing. Agents can use free models without a wallet, or paid models through x402 payments from the agent's own Solana USDC wallet.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Wallet-connected paid requests can spend real Solana USDC.\n\nMitigation: Prefer free models first, use a dedicated low-balance wallet, confirm the quoted amount before signing, and set per-call and daily spending caps where the client supports them.\n\nRisk: The MCP wrapper example can run the latest npm package while handling wallet-connected requests.\n\nMitigation: Use a pinned audited MCP wrapper version or configure direct streamable-http access to https://bridgenode.cc/mcp.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/bridgenode/skills/bridgenode)\n- [BridgeNode website](https://bridgenode.cc)\n- [Live models and pricing](https://bridgenode.cc/v1/models)\n- [BridgeNode MCP endpoint](https://bridgenode.cc/mcp)\n- [BridgeNode agent card](https://bridgenode.cc/.well-known/agent-card.json)\n- [x402 documentation](https://docs.x402.org)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Markdown, Code, Shell commands, Configuration, API calls]\n\n**Output Format:** [Markdown with inline bash, JSON, Python, and TypeScript examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include wallet and payment setup guidance, model and price lookup instructions, MCP configuration details, and settlement receipt handling.]\n\n## Skill Version(s):\n\n1.0.35 (source: server release metadata; artifact frontmatter reports 1.0.16)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.35:agent-registration.json\n\n{\n  \"type\": \"https://eips.ethereum.org/EIPS/eip-8004#registration-v1\",\n  \"name\": \"BridgeNode\",\n  \"description\": \"AI inference bridge — pay per request with Solana USDC via x402. No API keys, no registration.\",\n  \"services\": [\n    {\n      \"name\": \"MCP\",\n      \"endpoint\": \"https://bridgenode.cc/mcp\"\n    },\n    {\n      \"name\": \"A2A\",\n      \"endpoint\": \"https://bridgenode.cc/.well-known/agent-card.json\"\n    },\n    {\n      \"name\": \"OASF\",\n      \"endpoint\": \"https://bridgenode.cc/openapi.json\",\n      \"skills\": [\n        \"natural_language_processing/natural_language_generation/text_completion\"\n      ],\n      \"domains\": [\n        \"technology/software_engineering/software_engineering\"\n      ]\n    }\n  ],\n  \"active\": false,\n  \"x402Support\": true\n}\n\nArchive v1.0.34: 19 files, 32397 bytes\n\nFiles: agent-registration.json (748b), AGENTS.md (2831b), examples/curl/README.md (3791b), examples/mcp/README.md (2684b), examples/python/main.py (2963b), examples/python/README.md (2442b), examples/README.md (1550b), examples/typescript/example.ts (1419b), examples/typescript/package-lock.json (51960b), examples/typescript/package.json (418b), examples/typescript/README.md (1861b), examples/typescript/tsconfig.json (260b), glama.json (96b), LICENSE (905b), README.md (4218b), SECURITY.md (609b), skill-card.md (3133b), SKILL.md (14626b), _meta.json (130b)\n\nFile v1.0.34:SKILL.md\n\n---\nname: bridgenode\nversion: 1.0.15\ndescription: BridgeNode — x402 pay-per-request AI inference for agents. OpenAI-compatible API + MCP server with tool calling, Solana USDC, gas-free micropayments. No API keys. Free models included. Live prices: bridgenode.cc/v1/models Use when an agent lacks a provider API key or wants privacy-preserving per-request AI inference pricing.\nmetadata:\n  author: BridgeNode\n  version: \"1.0.15\"\n  url: https://bridgenode.cc\n  repository: https://github.com/bridgenode-ai/bridgenode-skill\n  network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\n  currency: USDC\n  openclaw:\n    emoji: \"⚡\"\n    homepage: https://bridgenode.cc\ncompatibility: Any OpenAI-compatible agent with x402 payment support; MCP clients (streamable-http)\n---\n\n# BridgeNode\n\n## Overview (natural language)\n\nBridgeNode is an AI inference service for agents: anonymous LLM access without API keys, without registration, without subscriptions. Agents get an OpenAI-compatible chat completions endpoint and pay as they go with Solana USDC micropayments via the x402 payment protocol (HTTP 402). Model prices are published per token on the public models endpoint; transaction fees are sponsored, so an agent only needs USDC in its own wallet. Works with any OpenAI-compatible agent, MCP clients, and x402-capable SDKs.\n\n\n## Free access (start here — no payment, no wallet)\n\n- **Free models** (`gpt-oss-20b, gpt-oss-120b, glm-4.7-flash, glm-4.5-flash, glm-4.6v-flash`) are served without payment: no 402, no wallet, no gas. Same endpoint, same request body.\n\n**Free model notes (read before choosing one):**\n- `glm-4.7-flash` — ⚠️ **temporarily unreliable**: z.ai free model: slower than the Groq free models — a reply can take up to a minute, and the provider is sometimes overloaded. If it returns an error (rate limit / temporarily overloaded), retry once or switch to gpt-oss-20b, the most reliable free model.\n- `glm-4.5-flash` — ⚠️ **temporarily unreliable**: z.ai free model: slower than the Groq free models — a reply can take up to a minute, and the provider is sometimes overloaded. If it returns an error (rate limit / temporarily overloaded), retry once or switch to gpt-oss-20b, the most reliable free model.\n- `glm-4.6v-flash`: z.ai free model: slower than the Groq free models — a reply can take up to a minute, and the provider is sometimes overloaded. If it returns an error (rate limit / temporarily overloaded), retry once or switch to gpt-oss-20b, the most reliable free model.\n- **Free trials:** a client that has never called us gets **2 free calls on PAID models** without payment — real inference from a real model before any wallet exists. The remaining count travels in the response headers (`X-Bridgenode-Free-Trials-Remaining`).\n- When the trials are used up, the third call returns **402** with a machine-readable offer in `extensions.bridgenode` (free models, trials left, `how_to_pay`, `docs`) — not a dead end.\n- Check the live list: `GET https://bridgenode.cc/v1/models` (`\"free\": true`).\n\nThis applies to every transport: HTTP (`https://bridgenode.cc/v1`), MCP (`https://bridgenode.cc/mcp`) and the SDKs — no wallet key is needed for the free path.\n\n\n## ⚠️ Cost Warning (read first)\n\nThis skill **spends real money (USDC)** on PAID requests via on-chain Solana USDC micropayments (x402). There are no refunds once the provider has responded. Check live prices at `GET /v1/models` before use, set `max_tokens` to control cost, and use client-side spending limits (`BRIDGENODE_MAX_PER_CALL`, `BRIDGENODE_DAILY_CAP`) if available. Free models and the free trials never spend anything.\n\n\nBridgeNode is an AI inference bridge. Agents get an OpenAI-compatible endpoint and pay per request with Solana USDC via the x402 protocol. No API keys, no registration, no subscriptions. Transaction fees (SOL) are sponsored by BridgeNode — the agent only needs USDC in its wallet.\n\n## When to Use\n\n- The agent needs LLM inference (chat completions) but has no provider API key.\n- Pay-per-request is preferred over monthly subscriptions.\n- **The agent has no wallet yet** — free models and the free trials work without payment (start there).\n- The agent has a Solana wallet with USDC (or can receive it) and supports x402 payments.\n- Deterministic, transparent per-request pricing is required.\n- MCP-based agents that need a paid inference tool.\n\n## Endpoints\n\n| Endpoint | Purpose |\n|---|---|\n\n## Models & Pricing\n\nPrices are in USDC per token (6 decimals). Always fetch live prices from `GET /v1/models` — they are the single source of truth and are generated from server config (never hardcoded here — stale prices cost money).\n\n**🆓 Free models (no payment, no API key, no registration) are included** — no 402, no wallet, no gas. Live free list: `GET https://bridgenode.cc/v1/models`.\n\n**Paid models (pay-per-request):** DeepSeek, GLM (Z.AI), Kimi (Moonshot), MiniMax. Full list with live prices: `GET https://bridgenode.cc/v1/models`.\n\n| Model | Input / token | Output / token | Context window | Max output | Tools |\n|---|---|---|---|---|---|\n\nPricing model: **exact scheme** — the agent pays for `input tokens + max_tokens` **before** processing. If the model generates fewer than `max_tokens`, the agent still pays for `max_tokens` (this is the business model, not a bug). Minimum charge per request: 2000 atomic units = $0.002 USDC.\n\n## Tool Calling (function calling)\n\nSend OpenAI-style `tools` (+ optional `tool_choice`) — they are forwarded to the model **unchanged** (free and paid models, HTTP and MCP, streaming and non-streaming). The answer is the provider's own: text, or `choices[0].message.tool_calls` with `finish_reason: \"tool_calls\"`.\n\nContinue like any OpenAI client: send the assistant turn back with **`content: null` and its `tool_calls`**, then one `role: \"tool\"` message per call with `tool_call_id`.\n\n- The **tool schema counts as input tokens** — it is priced and context-checked like your messages.\n- **Free models have a small token budget** (see the table above); a large tool list will not fit. Use a paid model for agentic loops.\n- The `Tools` column marks models verified to accept tool calling. Unmarked = unverified, not necessarily unsupported.\n\n## Reasoning Models — Important\n\n- Many providers enable thinking/reasoning by default; reasoning tokens **SHARE** the `max_tokens` budget with the answer.\n- Use `max_tokens >= 200` — a too-small limit can be fully consumed by reasoning, producing an **EMPTY answer** (the model returns 200 with no content).\n- **An empty answer is retried and refunded**: we retry once automatically with a bigger budget; if the answer is still empty you get an error with the reason and a FULL refund — you never pay for an answer you did not receive.\n- Thinking is disabled on: `glm-4.7-flash`, `deepseek-flash`, `deepseek-v4-pro` (these are safe at smaller `max_tokens`). All other models may reason by default — treat `max_tokens < 200` as at-risk.\n- Prefer `stream: true` for long generations (non-stream is capped at 4096).\n- If you use tools with a thinking model: you MUST return `reasoning_content` in the next turn, otherwise the API returns 400.\n\n## Payment Flow (x402 V2, exact scheme)\n\n1. Send the request without payment headers.\n2. Server responds `402 Payment Required` with a `PAYMENT-REQUIRED` header (base64 JSON): price, `payTo` address, USDC mint, memo, recent blockhash.\n3. Agent constructs a **partial transaction**: USDC `TransferChecked` (amount = required) + Memo instruction, signs with its own wallet. Fee payer is NOT signed by the agent.\n4. Agent retries the request with `PAYMENT-SIGNATURE` header (base64 JSON payload with the signed transaction).\n5. Server verifies the payment and processes the request (fees sponsored — gasless for the agent).\n6. Response is `200` with `PAYMENT-RESPONSE` header (settlement receipt).\n\nKey details:\n\n- Network: `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` (Solana mainnet)\n- Asset: USDC `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`\n- The agent must have an existing USDC ATA (associated token account) for the mint.\n- The agent does **not** need SOL — BridgeNode sponsors transaction fees.\n- Use the official x402 SDKs (`@x402/svm`, `x402[svm]`) or any x402-capable client — they handle the 402 → sign → retry flow automatically.\n\n## Funding\n\n- Requires USDC on Solana mainnet (no API keys, no registration)\n- The agent keeps USDC in its own wallet — BridgeNode never holds balances; every request is paid individually via x402 (exact amount quoted in the 402 response)\n- The agent must have an existing USDC ATA (associated token account) for the mint — it is derived from the agent's wallet address; no manual token account setup needed\n- Gasless: BridgeNode sponsor covers Solana fees\n- Optional client-side spending limits (SDK, enforced locally before signing — not server balances): `BRIDGENODE_MAX_PER_CALL`, `BRIDGENODE_DAILY_CAP`\n\n## Quick Start (curl)\n\nStep 0 — first call, free (copy this one): the leading free model answers\nwithout payment and without a wallet. Keep `max_tokens >= 200` — a smaller\nlimit can be consumed by reasoning and return an EMPTY answer.\n\n```bash\ncurl https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"gpt-oss-20b\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":200}'\n```\n\nResponse: `200` directly — no `402`, no `PAYMENT-REQUIRED`.\n\nStep 1 — get payment requirements for a PAID model:\n\n```bash\ncurl https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"deepseek-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":200}'\n```\n\nResponse: `402` with `PAYMENT-REQUIRED` header (amount, payTo, memo).\n\nStep 2 — sign the partial transaction with an x402-capable client (e.g. `x402-proxy` (npx x402-proxy), official SDK, or `pay` CLI) and retry:\n\n```bash\ncurl https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"PAYMENT-SIGNATURE: <base64 payload>\" \\\n  -d '{\"model\":\"deepseek-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":200}'\n```\n\nResponse: `200` with the completion and `PAYMENT-RESPONSE` header.\n\n## Quick Start (Python, x402 SDK)\n\n```python\n# pip install \"x402[svm]\"\n# Official x402 client handles the full 402 -> sign -> retry loop.\n```\n\nUse the official `x402` Python client (`x402[svm]`) configured with the agent's Solana keypair; point it at `https://bridgenode.cc/v1/chat/completions`. Payment is automatic.\n\n## SDKs\n\n- **Python SDK:** `pip install bridgenode-llm` (https://pypi.org/project/bridgenode-llm) — full toolkit: `pip install bridgenode`\n- **CLI:** `pip install bridgenode-cli` (https://pypi.org/project/bridgenode-cli) — `bridgenode chat \"Hello!\"`\n- **TypeScript SDK:** `npm i @bridgenode/llm` (https://www.npmjs.com/package/@bridgenode/llm)\n- **MCP wrapper:** `npm i @bridgenode/mcp` (https://www.npmjs.com/package/@bridgenode/mcp)\n\nAll SDKs handle the x402 payment handshake automatically (402 → sign → retry → 200), with fail-closed spending limits (`BRIDGENODE_MAX_PER_CALL`, `BRIDGENODE_DAILY_CAP`).\n\n## MCP Usage\n\n- One-line install: `claude mcp add bridgenode -s user -- npx -y @bridgenode/mcp@latest`\n- Server URL: `https://bridgenode.cc/mcp` (streamable-http)\n- Tool: `chat_completions` (model, mode, messages, max_tokens)\n- Payment: x402 handshake per tool call; prices are annotated in `tools/list` (`x-x402`) as an indication — always check the actual amount in the 402 response before signing.\n\n## Request Options\n\n- `model`: explicit model ID from `/v1/models` (e.g. `deepseek-flash`).\n- `mode`: smart routing — `auto` (complexity-based tier), `eco` (cheapest), `premium` (best). If both `model` and `mode` are sent, `model` wins.\n- `max_tokens`: request cap (default 4096, clamped to model max). A non-stream request above `non_stream_max_tokens` (published per model in `/v1/models`) is clamped to it, never rejected — use `stream: true` for longer generations.\n- `stream`: SSE streaming supported (`stream: true`).\n- `tools`: OpenAI-style function definitions the model may call (forwarded unchanged; the schema counts as input tokens — see Tool Calling above).\n- `tool_choice`: `auto` / `none` / `required`, or a forced function object.\n\n## Errors\n\n| Status | Meaning |\n|---|---|\n| 400 | Bad request (unknown model, invalid body, oversized non-stream max_tokens) |\n| 402 | Payment required — see `PAYMENT-REQUIRED` header |\n| 413 | Request body too large (limit 2 MB) |\n| 429 | Too many requests (queue limit) |\n| 503 | Service busy — retry with backoff |\n\nAll errors use the OpenAI error format: `{\"error\": {\"message\": ..., \"type\": ..., \"code\": ...}}`.\n\n## Notes\n- Security: ClawHub security audit Pass; VirusTotal scan clean (no engine findings).\n\n- Discovery: `https://bridgenode.cc/.well-known/agent-card.json`, `https://bridgenode.cc/.well-known/mcp.json`, `https://bridgenode.cc/.well-known/ai-manifest.json`\n- Listed on x402-list: https://x402-list.com/services/bridgenode\n- Listed on x402-dev: https://www.x402dev.com/awesome-projects/\n- Listed on nohumans.directory: https://nohumans.directory/l/f1f74751-9d5\n- Listed on gold-402: https://github.com/Haustorium12/gold-402/blob/main/directory/learning.md\n- ClawHub skill: https://clawhub.ai/bridgenode/skills/bridgenode\n- Transaction fees are sponsored (gasless) — the agent only needs USDC in its own wallet.\n- Refunds: if the provider fails before any content is delivered, the payment is refunded automatically (reverse USDC transfer).\n\n## Conformance (x402 v2, `exact`)\n\nFacts you can check, not a badge (fix.md 6.1):\n\n- `x402Version` **2**, scheme **`exact`**, network **`solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`** (Solana mainnet, CAIP-2).\n- Asset: **USDC** `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` (6 decimals); `amount` is an **atomic string** (`\"2000\"` = 0.002 USDC).\n- `payTo` and `extra.feePayer` are the same address — the agent needs **no SOL** (gasless).\n- The 402 body is a `PaymentRequired` envelope, validated against the **official x402 SDK** schemas; the live check passes 17/17 (envelope fields, `/supported`, `/verify` semantics, and a real settlement verified on-chain).\n- **Self-facilitated:** `GET /supported`, `POST /verify`, `POST /settle` are served by BridgeNode itself (declared in `https://bridgenode.cc/.well-known/x402`) — no third party between the agent and us.\n- `/verify` follows the spec: a payment that does not verify is answered **`200 {isValid: false, invalidReason}`**; only a malformed request body is a 400.\n\nFile v1.0.34:examples/curl/README.md\n\n# BridgeNode curl example\n\nManual x402 flow with curl. This shows the protocol steps; for automatic\npayment handling use [x402curl](https://github.com/second-state/x402-skill)\n(drop-in curl replacement) or the SDK examples.\n\n> ⚠️ Mainnet warning: Solana mainnet, real USDC. Minimum charge: $0.002.\n> Check the 402 `amount` before signing.\n\n## Step 1 — Request, get 402\n\n```bash\ncurl -sS -D - -o /dev/null https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"deepseek-v4-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":100}'\n```\n\nExpected: `HTTP/1.1 402 Payment Required` with a `PAYMENT-REQUIRED` header\n(base64 JSON: scheme, network, amount, asset, payTo, memo, feePayer).\n\n## Step 2 — Sign the partial transaction\n\nDecode the `PAYMENT-REQUIRED` header and sign a partial transaction:\nUSDC `TransferChecked` (amount from the 402) + Memo instruction, signed with\nthe agent's Solana keypair. The fee payer is NOT signed by the agent —\nBridgeNode sponsors gas.\n\nUse any x402-capable signer: `x402curl`, the official SDKs (`x402[svm,httpx]`,\n`@x402/svm`), or the Solana `pay` CLI. This produces a base64 JSON payload\n(`x402Version`, `resource`, `accepted`, `payload.transaction`).\n\n## Step 3 — Retry with PAYMENT-SIGNATURE\n\n```bash\nPAYLOAD=\"<base64 JSON from step 2>\"\ncurl -sS https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"PAYMENT-SIGNATURE: $PAYLOAD\" \\\n  -d '{\"model\":\"deepseek-v4-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":100}'\n```\n\nExpected: `200 OK` with the completion and a `PAYMENT-RESPONSE` header\n(settlement receipt).\n\n## Automatic alternative — x402curl\n\n```bash\n# install: https://github.com/second-state/x402-skill\n# config: X402_PRIVATE_KEY=... (agent's Solana keypair)\nx402curl -sS https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"deepseek-v4-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":100}'\n```\n\nx402curl detects the 402, signs the payment, and retries automatically.\n\n## Expected output (Step 1)\n\n```\nHTTP/2 402\npayment-required: <base64 JSON — scheme, network, amount, asset, payTo, memo, feePayer, recentBlockhash>\n{\"x402Version\":2,\"error\":\"PAYMENT-SIGNATURE header is required\",\"resource\":{...},\"accepts\":[{\"scheme\":\"exact\",\"network\":\"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\",\"asset\":\"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\"amount\":\"2000\",\"payTo\":\"<BridgeNode wallet>\",\"maxTimeoutSeconds\":30,\"extra\":{...}}]}\n```\n\n## Expected output (Step 3, after signing)\n\n```\nHTTP/2 200\npayment-response: <base64 JSON — SettlementResponse: success, payer, transaction, network, amount>\n{\"id\":\"...\",\"object\":\"chat.completion\",\"model\":\"deepseek-v4-flash\",\"choices\":[...],\"usage\":{...}}\n```\n\n- The exact `amount` comes from the 402 response (minimum charge: 2000 atomic units = $0.002).\n- Live prices always: `GET https://bridgenode.cc/v1/models`.\n\n## Troubleshooting\n\n- **`402` instead of `200`** — expected on the first request; that is the payment challenge, not an error.\n- **`400 Bad request`** — unknown model, invalid body, or `max_tokens` above the non-stream cap (use `stream: true` for long generations).\n- **`503 Service busy`** — retry with backoff.\n- **Signing fails** — use `x402curl`, the official SDKs (`x402[svm,httpx]`, `@x402/svm`), or the Solana `pay` CLI; the fee payer is NOT signed by the agent.\n- **Empty answer from reasoning models** — use `max_tokens >= 200`.\n\n## Notes\n\n- Network: `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` (mainnet)\n- Asset: USDC `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`\n- The agent needs a USDC ATA, but no SOL (gas sponsored).\n- Free: `GET https://bridgenode.cc/v1/models` (models + prices).\n\nFile v1.0.34:examples/mcp/README.md\n\n# BridgeNode MCP example\n\nCall BridgeNode through its MCP server with x402 payment.\n\n## Server\n\n- URL: `https://bridgenode.cc/mcp` (streamable-http)\n- Tool: `chat_completions` (model | mode, messages, max_tokens)\n- Payment: x402 handshake per tool call (via `_meta[\"x402/payment\"]`)\n\nPrices are annotated in `tools/list` (`x-x402`) as an indication; the actual\namount is in the 402 response — always check it before signing.\n\n## Option A — one-command wrapper (any MCP client)\n\n```bash\nnpx -y @bridgenode/mcp@latest\n```\n\nUse this as the MCP server command in your client (Claude Code, Cursor,\nWindsurf, etc.). The wrapper connects to `https://bridgenode.cc/mcp` and\nhandles x402 payment automatically with the agent's wallet.\n\nClaude Code example:\n\n```bash\nclaude mcp add bridgenode -- npx -y @bridgenode/mcp@latest\n```\n\n## Option B — direct streamable-http\n\nConfigure your MCP client with:\n\n```\nURL: https://bridgenode.cc/mcp\nTransport: streamable-http\n```\n\n## What the agent sees\n\n1. `tools/list` → `chat_completions` with `x-x402` price annotation.\n2. `tools/call` → server returns payment required (result with\n   `structuredContent` PaymentRequired object).\n3. Client signs the USDC transaction, retries the call with\n   `_meta[\"x402/payment\"]`.\n4. Server settles, runs inference, returns the completion with\n   `_meta[\"x402/payment-response\"]` (settlement receipt).\n\n## Expected output (`tools/list`)\n\n```json\n{\"result\":{\"tools\":[{\"name\":\"chat_completions\",\"title\":\"Chat completions with x402 payment\",\"description\":\"Send a chat completion request to any supported model. Paid tool: x402 payment (Solana USDC) is required — the first call returns 402 with the exact price; retry with _meta[\\\"x402/payment\\\"]. ...\",\"inputSchema\":{...},\"x-x402\":{\"scheme\":\"exact\",\"network\":\"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\",\"amount\":\"2000\",\"asset\":\"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\"payTo\":\"<BridgeNode wallet>\"}}]}}\n```\n\n- The `x-x402` amount is **indicative** (floor); the exact amount is in the 402 response — always check it before signing.\n\n## Troubleshooting\n\n- **`tools/call` returns payment required** — expected on the first call; that is the x402 challenge, not an error.\n- **Client can't connect** — use the one-command wrapper (`npx -y @bridgenode/mcp@latest`) or point the client at `https://bridgenode.cc/mcp` with `streamable-http`.\n- **`503 Service busy`** — retry with backoff.\n- **Empty answer from reasoning models** — use `max_tokens >= 200`.\n\n## Notes\n\n- Solana mainnet, real USDC. Minimum charge: $0.002 per request.\n- Gas sponsored by BridgeNode — the agent only needs USDC, no SOL.\n- Free tools (e.g., model list) skip payment.\n\nFile v1.0.34:examples/python/README.md\n\n# BridgeNode Python example\n\nBuyer-side example: AI agent pays for and calls BridgeNode with the official\nx402 Python SDK (`x402[svm,httpx]`).\n\n## Setup\n\n```bash\npip install \"x402[svm,httpx]\" \"solana==0.39.0\" python-dotenv\ncp .env.example .env\n# fill SVM_PRIVATE_KEY (agent's Solana keypair, must have USDC ATA)\n```\n\n## Run\n\n```bash\npython main.py\n```\n\n## What it does\n\n1. `GET /v1/models` — free, lists models and prices.\n2. `POST /v1/chat/completions` — x402 payment handled automatically:\n   request → 402 → sign partial TX (USDC TransferChecked + Memo) →\n   retry with `PAYMENT-SIGNATURE` → 200 + `PAYMENT-RESPONSE`.\n\n## Expected output\n\n```\nInitialized SVM account: <your wallet address>\nModels & prices: {\"object\":\"list\",\"data\":[{\"id\":\"deepseek-v4-flash\",\"pricing\":{\"prompt\":2e-07,\"completion\":4e-07},...}]}\n\nPOST https://bridgenode.cc/v1/chat/completions\nStatus: 200\nBody: {\"id\":\"...\",\"object\":\"chat.completion\",\"model\":\"deepseek-v4-flash\",\"choices\":[...],\"usage\":{...}}\n\nPayment response: {\n  \"success\": true,\n  \"payer\": \"<your wallet address>\",\n  \"transaction\": \"<signature>\",\n  \"network\": \"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\",\n  \"amount\": \"2000\"\n}\n```\n\n- The exact `amount` comes from the 402 response (minimum charge: 2000 atomic units = $0.002).\n- Live prices always: `GET https://bridgenode.cc/v1/models`.\n\n## Troubleshooting\n\n- **`SVM_PRIVATE_KEY missing`** — copy `.env.example` to `.env` and fill in the keypair.\n- **`InsufficientFunds` / payment rejected** — the wallet needs a USDC ATA with balance on Solana mainnet.\n- **`Invalid account`** — the agent must have an existing USDC ATA (it is derived from the wallet address automatically when funded).\n- **`402` spam / timeout** — the server rate-limits 402 responses per IP; wait a moment and retry.\n- **Empty answer from reasoning models** — use `max_tokens >= 200`; too-small limits can produce an empty response (service was provided, no refund).\n\n## Notes\n\n- Solana mainnet, real USDC. Minimum charge: $0.002 per request.\n- Gas is sponsored by BridgeNode — the agent only needs USDC, no SOL.\n- The agent must have an existing USDC ATA (associated token account).\n- Funding: send USDC on Solana mainnet to the agent's own wallet — BridgeNode never holds balances; every request is paid individually via x402 (exact amount in the 402 response). The USDC ATA is derived from the agent's wallet address; no manual token account setup needed.\n\nFile v1.0.34:examples/README.md\n\n# BridgeNode Examples\n\nBuyer-side examples: how an AI agent pays for and calls BridgeNode via x402.\n\nAll examples are **client-side only** — they use the public x402 SDKs and the\npublic BridgeNode endpoint (`https://bridgenode.cc/v1`). No server code.\n\n> ⚠️ **Mainnet warning:** BridgeNode runs on Solana mainnet with real USDC.\n> Use a wallet with a small balance. Minimum charge per request: $0.002 USDC.\n> Check the 402 `amount` before signing.\n\n## Contents\n\n| Example | Stack | What it shows |\n|---|---|---|\n| [curl/](curl/README.md) | curl + x402curl | Manual x402 flow: request → 402 → sign → retry |\n| [python/](python/README.md) | Python + `x402[svm,httpx]` | OpenAI-compatible call with automatic payment |\n| [typescript/](typescript/README.md) | TypeScript + `@x402/svm` | Fetch wrapper with automatic payment |\n| [mcp/](mcp/README.md) | MCP client | Paid tool call through the BridgeNode MCP server |\n\n## Flow (x402 V2, exact scheme)\n\n1. `POST /v1/chat/completions` without payment → server responds `402` with a\n   `PAYMENT-REQUIRED` header (base64 JSON: amount, payTo, memo).\n2. Client signs a partial transaction: USDC `TransferChecked` + Memo.\n3. Client retries with `PAYMENT-SIGNATURE` header.\n4. Server verifies, settles (gas sponsored by BridgeNode), returns `200` with a\n   `PAYMENT-RESPONSE` header (settlement receipt).\n\nNetwork: `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` (mainnet) · Asset: USDC\n`EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`\n\nModels and live prices: `GET https://bridgenode.cc/v1/models` (free).\n\nFile v1.0.34:examples/typescript/README.md\n\n# BridgeNode TypeScript example\n\nBuyer-side example: AI agent pays for and calls BridgeNode with the official\nx402 TS SDKs (`@x402/fetch` + `@x402/svm`).\n\n## Setup\n\n```bash\nnpm install\ncp .env.example .env\n# fill SVM_PRIVATE_KEY (agent's Solana keypair, must have USDC ATA)\n```\n\n## Run\n\n```bash\nnpm run start\n```\n\n## What it does\n\n1. Registers the Solana exact payment scheme.\n2. `POST /v1/chat/completions` through `wrapFetchWithPayment` — 402 handled\n   automatically: sign partial TX → retry with `PAYMENT-SIGNATURE` → 200.\n3. Prints the payment response (settlement receipt).\n\n## Expected output\n\n```\nPOST https://bridgenode.cc/v1/chat/completions\n\n{\n  id: '...',\n  object: 'chat.completion',\n  model: 'deepseek-v4-flash',\n  choices: [ { index: 0, message: { role: 'assistant', content: 'Hello!' }, finish_reason: 'stop' } ],\n  usage: { prompt_tokens: 10, completion_tokens: 4, total_tokens: 14 },\n  header: {\n    success: true,\n    payer: '<your wallet address>',\n    transaction: '<signature>',\n    network: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',\n    amount: '2000'\n  }\n}\n```\n\n- The exact `amount` comes from the 402 response (minimum charge: 2000 atomic units = $0.002).\n- Live prices always: `GET https://bridgenode.cc/v1/models`.\n\n## Troubleshooting\n\n- **`SVM_PRIVATE_KEY` missing** — copy `.env.example` to `.env` and fill in the keypair.\n- **`InsufficientFunds` / payment rejected** — the wallet needs a USDC ATA with balance on Solana mainnet.\n- **TypeScript compile errors** — run `npm install` first; requires Node 20+.\n- **`503 Service busy`** — retry with backoff.\n- **Empty answer from reasoning models** — use `max_tokens >= 200`.\n\n## Notes\n\n- Solana mainnet, real USDC. Minimum charge: $0.002 per request.\n- Gas is sponsored by BridgeNode — the agent only needs USDC, no SOL.\n- The agent must have an existing USDC ATA.\n\nFile v1.0.34:README.md\n\n# BridgeNode Skill & Examples\n\n[![PyPI version](https://img.shields.io/pypi/v/bridgenode-llm.svg)](https://pypi.org/project/bridgenode-llm/)\n[![Downloads](https://img.shields.io/pypi/dm/bridgenode-llm.svg)](https://pypi.org/project/bridgenode-llm/)\n[![npm version](https://img.shields.io/npm/v/@bridgenode/llm.svg)](https://www.npmjs.com/package/@bridgenode/llm)\n[![npm version](https://img.shields.io/npm/v/@bridgenode/mcp.svg)](https://www.npmjs.com/package/@bridgenode/mcp)\n[![License: MIT-0](https://img.shields.io/badge/License-MIT--0-yellow.svg)](https://opensource.org/license/mit-0/)\n[![CI](https://img.shields.io/github/actions/workflow/status/bridgenode-ai/bridgenode-skill/ci.yml)](https://github.com/bridgenode-ai/bridgenode-skill/actions)\n[![BridgeNode on x402-list](https://x402-list.com/badge/bridgenode.svg)](https://x402-list.com/services/bridgenode?utm_source=badge&utm_medium=referral&utm_campaign=embed)\n[![BridgeNode uptime on x402-list](https://x402-list.com/badge/bridgenode.svg?data=uptime)](https://x402-list.com/services/bridgenode?utm_source=badge&utm_medium=referral&utm_campaign=embed)\n[![BridgeNode on ClawHub](https://img.shields.io/badge/ClawHub-Skill-blue)](https://clawhub.ai/bridgenode/skills/bridgenode)\n[![GitHub Stars](https://img.shields.io/github/stars/bridgenode-ai/bridgenode-skill?style=social)](https://github.com/bridgenode-ai/bridgenode-skill)\n\nAgent skill and buyer-side examples for [BridgeNode](https://bridgenode.cc) — AI inference bridge for AI agents. Pay per request with Solana USDC via [x402](https://docs.x402.org). No API keys, no registration.\n\n> This repository contains only the **public agent skill and usage examples**. No server code.\n\n## Why BridgeNode\n\n| | BridgeNode | API keys (OpenAI etc.) | Other x402 gateways |\n|---|---|---|---|\n| **Setup** | None — pay per request | Sign up, billing, keys | Varies |\n| **Auth** | x402 on-chain payment | API key (secret management) | x402 (some require third-party facilitators) |\n| **Gas** | Sponsored — agent needs no SOL | — | Often agent pays gas |\n| **Models** | DeepSeek, Groq — one endpoint | One provider each | Varies |\n| **Refunds** | Full refund on provider failure | Credit-based | Varies |\n| **Discovery** | `/v1/models` live pricing | Fixed plans | Varies |\n\n## Quick start\n\n```bash\n# Install the skill (teaches any agent how to pay & call)\nnpx skills add bridgenode-ai/bridgenode-skill\n```\n\n```bash\n# Or use the SDKs\npip install bridgenode-llm        # Python\nnpm i @bridgenode/llm             # TypeScript\nnpm i -g @bridgenode/mcp          # MCP server (automatic x402 payments)\n```\n\nThe x402 flow is automatic in the SDKs: the first request gets a `402` with payment requirements, the agent signs a USDC transfer (fees sponsored), and the request completes as a normal OpenAI-compatible response. See `examples/` for curl, Python, TypeScript, and MCP walkthroughs.\n\n## Install the skill\n\nThe skill teaches AI agents how to use BridgeNode: endpoints, models, pricing, and the x402 payment flow.\n\n```bash\nnpx skills add bridgenode-ai/bridgenode-skill\n```\n\n## Install the SDKs\n\n- **Python SDK:** `pip install bridgenode-llm` ([PyPI](https://pypi.org/project/bridgenode-llm)) — or the full toolkit: `pip install bridgenode`\n- **CLI:** `pip install bridgenode-cli` ([PyPI](https://pypi.org/project/bridgenode-cli))\n- **TypeScript SDK:** `npm i @bridgenode/llm` ([npm](https://www.npmjs.com/package/@bridgenode/llm))\n- **MCP wrapper:** `npm i @bridgenode/mcp` ([npm](https://www.npmjs.com/package/@bridgenode/mcp)) — stdio MCP server with automatic x402 payments\n\n## What's inside\n\n- `SKILL.md` — the agent skill\n- `examples/` — buyer-side examples (curl, Python, TypeScript, MCP)\n\n## Learn more\n\n- Website: https://bridgenode.cc\n- Agent map: https://bridgenode.cc/llms.txt\n- Models & pricing: https://bridgenode.cc/v1/models\n\n## Community\n\n- Smithery: [smithery.ai/servers/applefanaimail/bridgenode](https://smithery.ai/servers/applefanaimail/bridgenode)\n- Moltbook agent profile: https://moltbook.com/u/bridgenode_eli\n- Discord: https://discord.gg/HUpVKxJxhG\n- X (Twitter): https://x.com/eliBNx\n\n⭐ **Star this repo** — it helps AI agents discover BridgeNode.\n\n## License\n\nMIT-0\n\nFile v1.0.34:_meta.json\n\n{\n  \"ownerId\": \"kn75e7saac07527dydk1n1a8ns8bxgd6\",\n  \"slug\": \"bridgenode\",\n  \"version\": \"1.0.34\",\n  \"publishedAt\": 1789560059265\n}\n\nFile v1.0.34:AGENTS.md\n\n# AGENTS.md — BridgeNode Skill & Examples\n\nThis repository is the **public agent-facing entry point** for BridgeNode — an AI\ninference bridge for autonomous agents. It contains the agent skill and\nbuyer-side examples only. **No server code lives here.**\n\n## What BridgeNode is\n\n- OpenAI-compatible chat completions endpoint: `https://bridgenode.cc/v1/chat/completions`\n- Payment: **Solana USDC via x402** (HTTP 402 flow). No API keys, no registration.\n- Pricing: live at `https://bridgenode.cc/v1/models` — always read prices from there.\n- Models: see the live list at `https://bridgenode.cc/v1/models` (or use `mode: auto|eco|premium`).\n\n## How an agent pays (x402 flow, 4 steps)\n\n1. **POST** `/v1/chat/completions` with `{model|mode, messages, max_tokens}` → server responds **402** with a `PAYMENT-REQUIRED` header (base64 JSON: exact amount, USDC asset, `payTo`, feePayer, memo, recent blockhash).\n2. Agent builds a **partially signed transaction** (USDC `TransferChecked` + Memo with the given memo) and signs it with its own wallet (agent needs USDC in its ATA; no SOL needed — fees are sponsored).\n3. Agent retries the request with the `PAYMENT-SIGNATURE` header (base64 JSON with the signed TX + echoed `accepted`).\n4. Server verifies, settles on-chain, then streams/produces the normal OpenAI completion (`200` + `PAYMENT-RESPONSE` receipt header).\n\n## Quick start (buyer side)\n\n```bash\n# curl — full flow in examples/\ncurl -i https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"deepseek-v4-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}]}'\n# → 402 with PAYMENT-REQUIRED; sign; retry with PAYMENT-SIGNATURE → 200\n```\n\n```bash\n# Python SDK\npip install bridgenode-llm\n```\n\n```bash\n# TypeScript SDK\nnpm i @bridgenode/llm\n```\n\n```bash\n# MCP (stdio, automatic x402 payments)\nnpm i -g @bridgenode/mcp\nclaude mcp add bridgenode -- npx @bridgenode/mcp\n```\n\n## Repository layout\n\n- `SKILL.md` — the installable agent skill (also served at `https://bridgenode.cc/skill.md`; keep identical when editing either side)\n- `examples/` — buyer-side examples: curl, Python, TypeScript, MCP (each with expected output + troubleshooting)\n- `agent-registration.json` — A2A agent-card metadata\n- `glama.json` — Glama connector metadata\n\n## Development\n\n- CI runs on `.github/workflows/`: Python syntax + guardrail, TS typecheck, live smoke tests (models/402/mcp).\n- Run examples locally: `python examples/python/chat.py`, `npx tsx examples/ts/chat.ts`.\n- Changes to `SKILL.md` are auto-published to ClawHub (GitHub Actions).\n\n## Rules for contributors\n\n- English only (code, docs, commits).\n- Public-facing content only — never commit server code, config, or internal details.\n- Keep `SKILL.md` in sync with the served version at `https://bridgenode.cc/skill.md`.\n\nFile v1.0.34:SECURITY.md\n\n# Security Policy\n\n## Reporting a Vulnerability\n\nBridgeNode is an agent-to-agent (A2A) platform. If you discover a security vulnerability, please report it privately:\n\n- **Email:** eli.BNx@proton.me\n\nPlease do **not** open a public issue for security vulnerabilities.\n\n## Supported Versions\n\n| Version | Supported |\n|---|---|\n| latest | ✅ |\n\n## Security Practices\n\n- No API keys or registration required — payments via x402 (HTTP 402) with Solana USDC\n- Wallet keys live only in `.env` — never committed\n- Dependencies are audited regularly (pip-audit / npm audit)\n- License: MIT-0 (MIT No Attribution)\n\nFile v1.0.34:skill-card.md\n\n## Description:\n\nBridgeNode provides OpenAI-compatible and MCP LLM inference for agents, with optional pay-per-request Solana USDC payments via x402, free models, tool calling, and live model pricing.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[bridgenode](https://clawhub.ai/user/bridgenode)\n\n### License/Terms of Use:\n\nMIT No Attribution\n\n## Use Case:\n\nExternal developers and AI agents use BridgeNode to access LLM chat completions without provider API keys, using free models or signing x402 Solana USDC payments for paid models. It is useful when agents need OpenAI-compatible HTTP or MCP inference with transparent per-request pricing.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Paid requests can spend real Solana USDC from the agent wallet.\n\nMitigation: Use free models first, connect only a dedicated low-balance wallet for paid use, set hard per-call and daily spending limits, and verify the network, USDC mint, amount, and recipient before signing.\n\nRisk: Remote MCP/package execution can run wallet-enabled code without a pinned version.\n\nMitigation: Pin MCP and package versions instead of using @latest, and avoid one-shot npx execution for wallet-enabled workflows.\n\nRisk: Automatic signing examples may be used without mandatory spending controls.\n\nMitigation: Require local spending caps before signing any payment and fail closed when limits are absent or exceeded.\n\nRisk: Some free or reasoning models may be slow, overloaded, or return empty answers with too-small token budgets.\n\nMitigation: Prefer the documented reliable free model when starting, retry transient failures, and use max_tokens of at least 200 for reasoning-prone models.\n\n## Reference(s):\n\n- [BridgeNode Skill on ClawHub](https://clawhub.ai/bridgenode/skills/bridgenode)\n- [BridgeNode Website](https://bridgenode.cc)\n- [Live Models and Pricing](https://bridgenode.cc/v1/models)\n- [Chat Completions Endpoint](https://bridgenode.cc/v1/chat/completions)\n- [MCP Endpoint](https://bridgenode.cc/mcp)\n- [A2A Agent Card](https://bridgenode.cc/.well-known/agent-card.json)\n- [OpenAPI Description](https://bridgenode.cc/openapi.json)\n- [x402 Protocol Documentation](https://docs.x402.org)\n- [x402 Discovery Metadata](https://bridgenode.cc/.well-known/x402)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown guidance with JSON request examples, code snippets, and shell commands; runtime API responses are OpenAI-compatible JSON or SSE text streams.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Paid calls require explicit x402 payment signing with Solana USDC; free models and free trials are available.]\n\n## Skill Version(s):\n\n1.0.34 (source: ClawHub release evidence; artifact frontmatter reports 1.0.15)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.34:agent-registration.json\n\n{\n  \"type\": \"https://eips.ethereum.org/EIPS/eip-8004#registration-v1\",\n  \"name\": \"BridgeNode\",\n  \"description\": \"AI inference bridge — pay per request with Solana USDC via x402. No API keys, no registration.\",\n  \"services\": [\n    {\n      \"name\": \"MCP\",\n      \"endpoint\": \"https://bridgenode.cc/mcp\"\n    },\n    {\n      \"name\": \"A2A\",\n      \"endpoint\": \"https://bridgenode.cc/.well-known/agent-card.json\"\n    },\n    {\n      \"name\": \"OASF\",\n      \"endpoint\": \"https://bridgenode.cc/openapi.json\",\n      \"skills\": [\n        \"natural_language_processing/natural_language_generation/text_completion\"\n      ],\n      \"domains\": [\n        \"technology/software_engineering/software_engineering\"\n      ]\n    }\n  ],\n  \"active\": false,\n  \"x402Support\": true\n}\n\nArchive v1.0.33: 19 files, 31434 bytes\n\nFiles: agent-registration.json (748b), AGENTS.md (2831b), examples/curl/README.md (3791b), examples/mcp/README.md (2684b), examples/python/main.py (2963b), examples/python/README.md (2442b), examples/README.md (1550b), examples/typescript/example.ts (1419b), examples/typescript/package-lock.json (51960b), examples/typescript/package.json (418b), examples/typescript/README.md (1861b), examples/typescript/tsconfig.json (260b), glama.json (96b), LICENSE (905b), README.md (4218b), SECURITY.md (609b), skill-card.md (2598b), SKILL.md (12251b), _meta.json (130b)\n\nFile v1.0.33:SKILL.md\n\n---\nname: bridgenode\nversion: 1.0.14\ndescription: BridgeNode — x402 pay-per-request AI inference for agents. OpenAI-compatible API + MCP server with tool calling, Solana USDC, gas-free micropayments. No API keys. Free models included. Live prices: bridgenode.cc/v1/models Use when an agent lacks a provider API key or wants privacy-preserving per-request AI inference pricing.\nmetadata:\n  author: BridgeNode\n  version: \"1.0.14\"\n  url: https://bridgenode.cc\n  repository: https://github.com/bridgenode-ai/bridgenode-skill\n  network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\n  currency: USDC\n  openclaw:\n    emoji: \"⚡\"\n    homepage: https://bridgenode.cc\ncompatibility: Any OpenAI-compatible agent with x402 payment support; MCP clients (streamable-http)\n---\n\n# BridgeNode\n\n## Overview (natural language)\n\nBridgeNode is an AI inference service for agents: anonymous LLM access without API keys, without registration, without subscriptions. Agents get an OpenAI-compatible chat completions endpoint and pay as they go with Solana USDC micropayments via the x402 payment protocol (HTTP 402). Model prices are published per token on the public models endpoint; transaction fees are sponsored, so an agent only needs USDC in its own wallet. Works with any OpenAI-compatible agent, MCP clients, and x402-capable SDKs.\n\n\n## Free access (start here — no payment, no wallet)\n\n- **Free models** are served without payment: no 402, no wallet, no gas. Same endpoint, same request body — the live list is `GET https://bridgenode.cc/v1/models`, where each free model carries `\"free\": true` (never hardcode the list here: it changes).\n- **Free trials:** a client that has never called us gets **2 free calls on PAID models** without payment — real inference from a real model before any wallet exists. The remaining count travels in the response headers (`X-Bridgenode-Free-Trials-Remaining`).\n- When the trials are used up, the third call returns **402** with a machine-readable offer in `extensions.bridgenode` (free models, trials left, `how_to_pay`, `docs`) — not a dead end.\nThis applies to every transport: HTTP (`https://bridgenode.cc/v1`), MCP (`https://bridgenode.cc/mcp`) and the SDKs — no wallet key is needed for the free path.\n\n\n## ⚠️ Cost Warning (read first)\n\nThis skill **spends real money (USDC)** on PAID requests via on-chain Solana USDC micropayments (x402). There are no refunds once the provider has responded. Check live prices at `GET /v1/models` before use, set `max_tokens` to control cost, and use client-side spending limits (`BRIDGENODE_MAX_PER_CALL`, `BRIDGENODE_DAILY_CAP`) if available. Free models and the free trials never spend anything.\n\n\nBridgeNode is an AI inference bridge. Agents get an OpenAI-compatible endpoint and pay per request with Solana USDC via the x402 protocol. No API keys, no registration, no subscriptions. Transaction fees (SOL) are sponsored by BridgeNode — the agent only needs USDC in its wallet.\n\n## When to Use\n\n- The agent needs LLM inference (chat completions) but has no provider API key.\n- Pay-per-request is preferred over monthly subscriptions.\n- **The agent has no wallet yet** — free models and the free trials work without payment (start there).\n- The agent has a Solana wallet with USDC (or can receive it) and supports x402 payments.\n- Deterministic, transparent per-request pricing is required.\n- MCP-based agents that need a paid inference tool.\n\n## Endpoints\n\n| Endpoint | Purpose |\n|---|---|\n| `https://bridgenode.cc/v1` | OpenAI-compatible API base URL |\n| `https://bridgenode.cc/v1/models` | Public model list + prices (no auth) |\n| `https://bridgenode.cc/v1/chat/completions` | Chat completions (POST) |\n| `https://bridgenode.cc/mcp` | MCP server (streamable-http) |\n| `https://bridgenode.cc/llms.txt` | Full agent install map |\n\n## Models & Pricing\n\nPrices are in USDC per token (6 decimals). Always fetch live prices from `GET /v1/models` — they are the single source of truth and are generated from server config (never hardcoded here — stale prices cost money).\n\n**🆓 Free models (no payment, no API key, no registration) are included** — no 402, no wallet, no gas. Live free list: `GET https://bridgenode.cc/v1/models`.\n\n**Paid models (pay-per-request):** DeepSeek, GLM (Z.AI), Kimi (Moonshot), MiniMax. Full list with live prices: `GET https://bridgenode.cc/v1/models`.\n\nPricing model: **exact scheme** — the agent pays for `input tokens + max_tokens` **before** processing. If the model generates fewer than `max_tokens`, the agent still pays for `max_tokens` (this is the business model, not a bug). Minimum charge per request: 2000 atomic units = $0.002 USDC.\n\n## Tool Calling (function calling)\n\nSend OpenAI-style `tools` (+ optional `tool_choice`) — they are forwarded to the model **unchanged** (free and paid models, HTTP and MCP, streaming and non-streaming). The answer is the provider's own: text, or `choices[0].message.tool_calls` with `finish_reason: \"tool_calls\"`.\n\nContinue like any OpenAI client: send the assistant turn back with **`content: null` and its `tool_calls`**, then one `role: \"tool\"` message per call with `tool_call_id`.\n\n- The **tool schema counts as input tokens** — it is priced and context-checked like your messages. Trim descriptions you do not need.\n- **Free models have a small token budget**: a large tool list will not fit. Use a paid model for agentic loops.\n- A model marked `\"tools\": true` in `GET https://bridgenode.cc/v1/models` is verified to accept tool calling; no such field means *unverified*, not necessarily unsupported.\n\n## Reasoning Models — Important\n\n- Many providers enable thinking/reasoning by default; reasoning tokens **SHARE** the `max_tokens` budget with the answer.\n- Use `max_tokens >= 200` — a too-small limit can be fully consumed by reasoning, producing an **EMPTY answer** (the model returns 200 with no content).\n- **An empty answer is NOT refunded** — the service was provided (the provider returned 200). Increase `max_tokens` and purchase again.\n- Thinking is disabled on: `deepseek-flash`, `deepseek-v4-pro` (these are safe at smaller `max_tokens`). All other models may reason by default — treat `max_tokens < 200` as at-risk.\n- Prefer `stream: true` for long generations (non-stream is capped at 4096).\n- If you use tools with a thinking model: you MUST return `reasoning_content` in the next turn, otherwise the API returns 400.\n\n## Payment Flow (x402 V2, exact scheme)\n\n1. Send the request without payment headers.\n2. Server responds `402 Payment Required` with a `PAYMENT-REQUIRED` header (base64 JSON): price, `payTo` address, USDC mint, memo, recent blockhash.\n3. Agent constructs a **partial transaction**: USDC `TransferChecked` (amount = required) + Memo instruction, signs with its own wallet. Fee payer is NOT signed by the agent.\n4. Agent retries the request with `PAYMENT-SIGNATURE` header (base64 JSON payload with the signed transaction).\n5. Server verifies the payment and processes the request (fees sponsored — gasless for the agent).\n6. Response is `200` with `PAYMENT-RESPONSE` header (settlement receipt).\n\nKey details:\n\n- Network: `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` (Solana mainnet)\n- Asset: USDC `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`\n- The agent must have an existing USDC ATA (associated token account) for the mint.\n- The agent does **not** need SOL — BridgeNode sponsors transaction fees.\n- Use the official x402 SDKs (`@x402/svm`, `x402[svm]`) or any x402-capable client — they handle the 402 → sign → retry flow automatically.\n\n## Funding\n\n- Requires USDC on Solana mainnet (no API keys, no registration)\n- The agent keeps USDC in its own wallet — BridgeNode never holds balances; every request is paid individually via x402 (exact amount quoted in the 402 response)\n- The agent must have an existing USDC ATA (associated token account) for the mint — it is derived from the agent's wallet address; no manual token account setup needed\n- Gasless: BridgeNode sponsor covers Solana fees\n- Optional client-side spending limits (SDK, enforced locally before signing — not server balances): `BRIDGENODE_MAX_PER_CALL`, `BRIDGENODE_DAILY_CAP`\n\n## Quick Start (curl)\n\nStep 1 — get payment requirements:\n\n```bash\ncurl https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"deepseek-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":100}'\n```\n\nResponse: `402` with `PAYMENT-REQUIRED` header (amount, payTo, memo).\n\nStep 2 — sign the partial transaction with an x402-capable client (e.g. `x402-proxy` (npx x402-proxy), official SDK, or `pay` CLI) and retry:\n\n```bash\ncurl https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"PAYMENT-SIGNATURE: <base64 payload>\" \\\n  -d '{\"model\":\"deepseek-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":100}'\n```\n\nResponse: `200` with the completion and `PAYMENT-RESPONSE` header.\n\n## Quick Start (Python, x402 SDK)\n\n```python\n# pip install \"x402[svm]\"\n# Official x402 client handles the full 402 -> sign -> retry loop.\n```\n\nUse the official `x402` Python client (`x402[svm]`) configured with the agent's Solana keypair; point it at `https://bridgenode.cc/v1/chat/completions`. Payment is automatic.\n\n## SDKs\n\n- **Python SDK:** `pip install bridgenode-llm` (https://pypi.org/project/bridgenode-llm) — full toolkit: `pip install bridgenode`\n- **CLI:** `pip install bridgenode-cli` (https://pypi.org/project/bridgenode-cli) — `bridgenode chat \"Hello!\"`\n- **TypeScript SDK:** `npm i @bridgenode/llm` (https://www.npmjs.com/package/@bridgenode/llm)\n- **MCP wrapper:** `npm i @bridgenode/mcp` (https://www.npmjs.com/package/@bridgenode/mcp)\n\nAll SDKs handle the x402 payment handshake automatically (402 → sign → retry → 200), with fail-closed spending limits (`BRIDGENODE_MAX_PER_CALL`, `BRIDGENODE_DAILY_CAP`).\n\n## MCP Usage\n\n- One-line install: `claude mcp add bridgenode -s user -- npx -y @bridgenode/mcp@latest`\n- Server URL: `https://bridgenode.cc/mcp` (streamable-http)\n- Tool: `chat_completions` (model, mode, messages, max_tokens)\n- Payment: x402 handshake per tool call; prices are annotated in `tools/list` (`x-x402`) as an indication — always check the actual amount in the 402 response before signing.\n\n## Request Options\n\n- `model`: explicit model ID from `/v1/models` (e.g. `deepseek-flash`).\n- `mode`: smart routing — `auto` (complexity-based tier), `eco` (cheapest), `premium` (best). If both `model` and `mode` are sent, `model` wins.\n- `max_tokens`: request cap (default 4096, clamped to model max). Non-stream requests are capped at 4096 — use `stream: true` for longer generations.\n- `stream`: SSE streaming supported (`stream: true`).\n- `tools`: OpenAI-style function definitions the model may call (forwarded unchanged; the schema counts as input tokens — see Tool Calling above).\n- `tool_choice`: `auto` / `none` / `required`, or a forced function object.\n\n## Errors\n\n| Status | Meaning |\n|---|---|\n| 400 | Bad request (unknown model, invalid body, oversized non-stream max_tokens) |\n| 402 | Payment required — see `PAYMENT-REQUIRED` header |\n| 413 | Request body too large (limit 2 MB) |\n| 429 | Too many requests (queue limit) |\n| 503 | Service busy — retry with backoff |\n\nAll errors use the OpenAI error format: `{\"error\": {\"message\": ..., \"type\": ..., \"code\": ...}}`.\n\n## Notes\n- Security: ClawHub security audit Pass; VirusTotal scan clean (no engine findings).\n\n- Discovery: `https://bridgenode.cc/.well-known/agent-card.json`, `https://bridgenode.cc/.well-known/mcp.json`, `https://bridgenode.cc/.well-known/ai-manifest.json`\n- Listed on x402-list: https://x402-list.com/services/bridgenode\n- Listed on x402-dev: https://www.x402dev.com/awesome-projects/\n- Listed on nohumans.directory: https://nohumans.directory/l/f1f74751-9d5\n- Listed on gold-402: https://github.com/Haustorium12/gold-402/blob/main/directory/learning.md\n- ClawHub skill: https://clawhub.ai/bridgenode/skills/bridgenode\n- Transaction fees are sponsored (gasless) — the agent only needs USDC in its own wallet.\n- Refunds: if the provider fails before any content is delivered, the payment is refunded automatically (reverse USDC transfer).\n\nFile v1.0.33:examples/curl/README.md\n\n# BridgeNode curl example\n\nManual x402 flow with curl. This shows the protocol steps; for automatic\npayment handling use [x402curl](https://github.com/second-state/x402-skill)\n(drop-in curl replacement) or the SDK examples.\n\n> ⚠️ Mainnet warning: Solana mainnet, real USDC. Minimum charge: $0.002.\n> Check the 402 `amount` before signing.\n\n## Step 1 — Request, get 402\n\n```bash\ncurl -sS -D - -o /dev/null https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"deepseek-v4-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":100}'\n```\n\nExpected: `HTTP/1.1 402 Payment Required` with a `PAYMENT-REQUIRED` header\n(base64 JSON: scheme, network, amount, asset, payTo, memo, feePayer).\n\n## Step 2 — Sign the partial transaction\n\nDecode the `PAYMENT-REQUIRED` header and sign a partial transaction:\nUSDC `TransferChecked` (amount from the 402) + Memo instruction, signed with\nthe agent's Solana keypair. The fee payer is NOT signed by the agent —\nBridgeNode sponsors gas.\n\nUse any x402-capable signer: `x402curl`, the official SDKs (`x402[svm,httpx]`,\n`@x402/svm`), or the Solana `pay` CLI. This produces a base64 JSON payload\n(`x402Version`, `resource`, `accepted`, `payload.transaction`).\n\n## Step 3 — Retry with PAYMENT-SIGNATURE\n\n```bash\nPAYLOAD=\"<base64 JSON from step 2>\"\ncurl -sS https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"PAYMENT-SIGNATURE: $PAYLOAD\" \\\n  -d '{\"model\":\"deepseek-v4-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":100}'\n```\n\nExpected: `200 OK` with the completion and a `PAYMENT-RESPONSE` header\n(settlement receipt).\n\n## Automatic alternative — x402curl\n\n```bash\n# install: https://github.com/second-state/x402-skill\n# config: X402_PRIVATE_KEY=... (agent's Solana keypair)\nx402curl -sS https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"deepseek-v4-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":100}'\n```\n\nx402curl detects the 402, signs the payment, and retries automatically.\n\n## Expected output (Step 1)\n\n```\nHTTP/2 402\npayment-required: <base64 JSON — scheme, network, amount, asset, payTo, memo, feePayer, recentBlockhash>\n{\"x402Version\":2,\"error\":\"PAYMENT-SIGNATURE header is required\",\"resource\":{...},\"accepts\":[{\"scheme\":\"exact\",\"network\":\"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\",\"asset\":\"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\"amount\":\"2000\",\"payTo\":\"<BridgeNode wallet>\",\"maxTimeoutSeconds\":30,\"extra\":{...}}]}\n```\n\n## Expected output (Step 3, after signing)\n\n```\nHTTP/2 200\npayment-response: <base64 JSON — SettlementResponse: success, payer, transaction, network, amount>\n{\"id\":\"...\",\"object\":\"chat.completion\",\"model\":\"deepseek-v4-flash\",\"choices\":[...],\"usage\":{...}}\n```\n\n- The exact `amount` comes from the 402 response (minimum charge: 2000 atomic units = $0.002).\n- Live prices always: `GET https://bridgenode.cc/v1/models`.\n\n## Troubleshooting\n\n- **`402` instead of `200`** — expected on the first request; that is the payment challenge, not an error.\n- **`400 Bad request`** — unknown model, invalid body, or `max_tokens` above the non-stream cap (use `stream: true` for long generations).\n- **`503 Service busy`** — retry with backoff.\n- **Signing fails** — use `x402curl`, the official SDKs (`x402[svm,httpx]`, `@x402/svm`), or the Solana `pay` CLI; the fee payer is NOT signed by the agent.\n- **Empty answer from reasoning models** — use `max_tokens >= 200`.\n\n## Notes\n\n- Network: `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` (mainnet)\n- Asset: USDC `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`\n- The agent needs a USDC ATA, but no SOL (gas sponsored).\n- Free: `GET https://bridgenode.cc/v1/models` (models + prices).\n\nFile v1.0.33:examples/mcp/README.md\n\n# BridgeNode MCP example\n\nCall BridgeNode through its MCP server with x402 payment.\n\n## Server\n\n- URL: `https://bridgenode.cc/mcp` (streamable-http)\n- Tool: `chat_completions` (model | mode, messages, max_tokens)\n- Payment: x402 handshake per tool call (via `_meta[\"x402/payment\"]`)\n\nPrices are annotated in `tools/list` (`x-x402`) as an indication; the actual\namount is in the 402 response — always check it before signing.\n\n## Option A — one-command wrapper (any MCP client)\n\n```bash\nnpx -y @bridgenode/mcp@latest\n```\n\nUse this as the MCP server command in your client (Claude Code, Cursor,\nWindsurf, etc.). The wrapper connects to `https://bridgenode.cc/mcp` and\nhandles x402 payment automatically with the agent's wallet.\n\nClaude Code example:\n\n```bash\nclaude mcp add bridgenode -- npx -y @bridgenode/mcp@latest\n```\n\n## Option B — direct streamable-http\n\nConfigure your MCP client with:\n\n```\nURL: https://bridgenode.cc/mcp\nTransport: streamable-http\n```\n\n## What the agent sees\n\n1. `tools/list` → `chat_completions` with `x-x402` price annotation.\n2. `tools/call` → server returns payment required (result with\n   `structuredContent` PaymentRequired object).\n3. Client signs the USDC transaction, retries the call with\n   `_meta[\"x402/payment\"]`.\n4. Server settles, runs inference, returns the completion with\n   `_meta[\"x402/payment-response\"]` (settlement receipt).\n\n## Expected output (`tools/list`)\n\n```json\n{\"result\":{\"tools\":[{\"name\":\"chat_completions\",\"title\":\"Chat completions with x402 payment\",\"description\":\"Send a chat completion request to any supported model. Paid tool: x402 payment (Solana USDC) is required — the first call returns 402 with the exact price; retry with _meta[\\\"x402/payment\\\"]. ...\",\"inputSchema\":{...},\"x-x402\":{\"scheme\":\"exact\",\"network\":\"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\",\"amount\":\"2000\",\"asset\":\"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\"payTo\":\"<BridgeNode wallet>\"}}]}}\n```\n\n- The `x-x402` amount is **indicative** (floor); the exact amount is in the 402 response — always check it before signing.\n\n## Troubleshooting\n\n- **`tools/call` returns payment required** — expected on the first call; that is the x402 challenge, not an error.\n- **Client can't connect** — use the one-command wrapper (`npx -y @bridgenode/mcp@latest`) or point the client at `https://bridgenode.cc/mcp` with `streamable-http`.\n- **`503 Service busy`** — retry with backoff.\n- **Empty answer from reasoning models** — use `max_tokens >= 200`.\n\n## Notes\n\n- Solana mainnet, real USDC. Minimum charge: $0.002 per request.\n- Gas sponsored by BridgeNode — the agent only needs USDC, no SOL.\n- Free tools (e.g., model list) skip payment.\n\nFile v1.0.33:examples/python/README.md\n\n# BridgeNode Python example\n\nBuyer-side example: AI agent pays for and calls BridgeNode with the official\nx402 Python SDK (`x402[svm,httpx]`).\n\n## Setup\n\n```bash\npip install \"x402[svm,httpx]\" \"solana==0.39.0\" python-dotenv\ncp .env.example .env\n# fill SVM_PRIVATE_KEY (agent's Solana keypair, must have USDC ATA)\n```\n\n## Run\n\n```bash\npython main.py\n```\n\n## What it does\n\n1. `GET /v1/models` — free, lists models and prices.\n2. `POST /v1/chat/completions` — x402 payment handled automatically:\n   request → 402 → sign partial TX (USDC TransferChecked + Memo) →\n   retry with `PAYMENT-SIGNATURE` → 200 + `PAYMENT-RESPONSE`.\n\n## Expected output\n\n```\nInitialized SVM account: <your wallet address>\nModels & prices: {\"object\":\"list\",\"data\":[{\"id\":\"deepseek-v4-flash\",\"pricing\":{\"prompt\":2e-07,\"completion\":4e-07},...}]}\n\nPOST https://bridgenode.cc/v1/chat/completions\nStatus: 200\nBody: {\"id\":\"...\",\"object\":\"chat.completion\",\"model\":\"deepseek-v4-flash\",\"choices\":[...],\"usage\":{...}}\n\nPayment response: {\n  \"success\": true,\n  \"payer\": \"<your wallet address>\",\n  \"transaction\": \"<signature>\",\n  \"network\": \"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\",\n  \"amount\": \"2000\"\n}\n```\n\n- The exact `amount` comes from the 402 response (minimum charge: 2000 atomic units = $0.002).\n- Live prices always: `GET https://bridgenode.cc/v1/models`.\n\n## Troubleshooting\n\n- **`SVM_PRIVATE_KEY missing`** — copy `.env.example` to `.env` and fill in the keypair.\n- **`InsufficientFunds` / payment rejected** — the wallet needs a USDC ATA with balance on Solana mainnet.\n- **`Invalid account`** — the agent must have an existing USDC ATA (it is derived from the wallet address automatically when funded).\n- **`402` spam / timeout** — the server rate-limits 402 responses per IP; wait a moment and retry.\n- **Empty answer from reasoning models** — use `max_tokens >= 200`; too-small limits can produce an empty response (service was provided, no refund).\n\n## Notes\n\n- Solana mainnet, real USDC. Minimum charge: $0.002 per request.\n- Gas is sponsored by BridgeNode — the agent only needs USDC, no SOL.\n- The agent must have an existing USDC ATA (associated token account).\n- Funding: send USDC on Solana mainnet to the agent's own wallet — BridgeNode never holds balances; every request is paid individually via x402 (exact amount in the 402 response). The USDC ATA is derived from the agent's wallet address; no manual token account setup needed.\n\nFile v1.0.33:examples/README.md\n\n# BridgeNode Examples\n\nBuyer-side examples: how an AI agent pays for and calls BridgeNode via x402.\n\nAll examples are **client-side only** — they use the public x402 SDKs and the\npublic BridgeNode endpoint (`https://bridgenode.cc/v1`). No server code.\n\n> ⚠️ **Mainnet warning:** BridgeNode runs on Solana mainnet with real USDC.\n> Use a wallet with a small balance. Minimum charge per request: $0.002 USDC.\n> Check the 402 `amount` before signing.\n\n## Contents\n\n| Example | Stack | What it shows |\n|---|---|---|\n| [curl/](curl/README.md) | curl + x402curl | Manual x402 flow: request → 402 → sign → retry |\n| [python/](python/README.md) | Python + `x402[svm,httpx]` | OpenAI-compatible call with automatic payment |\n| [typescript/](typescript/README.md) | TypeScript + `@x402/svm` | Fetch wrapper with automatic payment |\n| [mcp/](mcp/README.md) | MCP client | Paid tool call through the BridgeNode MCP server |\n\n## Flow (x402 V2, exact scheme)\n\n1. `POST /v1/chat/completions` without payment → server responds `402` with a\n   `PAYMENT-REQUIRED` header (base64 JSON: amount, payTo, memo).\n2. Client signs a partial transaction: USDC `TransferChecked` + Memo.\n3. Client retries with `PAYMENT-SIGNATURE` header.\n4. Server verifies, settles (gas sponsored by BridgeNode), returns `200` with a\n   `PAYMENT-RESPONSE` header (settlement receipt).\n\nNetwork: `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` (mainnet) · Asset: USDC\n`EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`\n\nModels and live prices: `GET https://bridgenode.cc/v1/models` (free).\n\nFile v1.0.33:examples/typescript/README.md\n\n# BridgeNode TypeScript example\n\nBuyer-side example: AI agent pays for and calls BridgeNode with the official\nx402 TS SDKs (`@x402/fetch` + `@x402/svm`).\n\n## Setup\n\n```bash\nnpm install\ncp .env.example .env\n# fill SVM_PRIVATE_KEY (agent's Solana keypair, must have USDC ATA)\n```\n\n## Run\n\n```bash\nnpm run start\n```\n\n## What it does\n\n1. Registers the Solana exact payment scheme.\n2. `POST /v1/chat/completions` through `wrapFetchWithPayment` — 402 handled\n   automatically: sign partial TX → retry with `PAYMENT-SIGNATURE` → 200.\n3. Prints the payment response (settlement receipt).\n\n## Expected output\n\n```\nPOST https://bridgenode.cc/v1/chat/completions\n\n{\n  id: '...',\n  object: 'chat.completion',\n  model: 'deepseek-v4-flash',\n  choices: [ { index: 0, message: { role: 'assistant', content: 'Hello!' }, finish_reason: 'stop' } ],\n  usage: { prompt_tokens: 10, completion_tokens: 4, total_tokens: 14 },\n  header: {\n    success: true,\n    payer: '<your wallet address>',\n    transaction: '<signature>',\n    network: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',\n    amount: '2000'\n  }\n}\n```\n\n- The exact `amount` comes from the 402 response (minimum charge: 2000 atomic units = $0.002).\n- Live prices al\n\nArchive v1.0.32: 19 files, 31310 bytes\n\nFiles: agent-registration.json (748b), AGENTS.md (2831b), examples/curl/README.md (3791b), examples/mcp/README.md (2684b), examples/python/main.py (2963b), examples/python/README.md (2442b), examples/README.md (1550b), examples/typescript/example.ts (1419b), examples/typescript/package-lock.json (51960b), examples/typescript/package.json (418b), examples/typescript/README.md (1861b), examples/typescript/tsconfig.json (260b), glama.json (96b), LICENSE (905b), README.md (4218b), SECURITY.md (609b), skill-card.md (2298b), SKILL.md (12296b), _meta.json (130b)\n\nArchive v1.0.31: 19 files, 31019 bytes\n\nFiles: agent-registration.json (748b), AGENTS.md (2831b), examples/curl/README.md (3791b), examples/mcp/README.md (2684b), examples/python/main.py (2963b), examples/python/README.md (2442b), examples/README.md (1550b), examples/typescript/example.ts (1419b), examples/typescript/package-lock.json (51960b), examples/typescript/package.json (418b), examples/typescript/README.md (1861b), examples/typescript/tsconfig.json (260b), glama.json (96b), LICENSE (905b), README.md (4218b), SECURITY.md (609b), skill-card.md (2662b), SKILL.md (11084b), _meta.json (130b)\n\nArchive v1.0.30: 19 files, 30588 bytes\n\nFiles: agent-registration.json (748b), AGENTS.md (2831b), examples/curl/README.md (3791b), examples/mcp/README.md (2684b), examples/python/main.py (2963b), examples/python/README.md (2442b), examples/README.md (1550b), examples/typescript/example.ts (1419b), examples/typescript/package-lock.json (51960b), examples/typescript/package.json (418b), examples/typescript/README.md (1861b), examples/typescript/tsconfig.json (260b), glama.json (96b), LICENSE (905b), README.md (4218b), SECURITY.md (609b), skill-card.md (2724b), SKILL.md (10013b), _meta.json (130b)\n\nArchive v1.0.29: 19 files, 30557 bytes\n\nFiles: agent-registration.json (748b), AGENTS.md (2831b), examples/curl/README.md (3791b), examples/mcp/README.md (2684b), examples/python/main.py (2963b), examples/python/README.md (2442b), examples/README.md (1550b), examples/typescript/example.ts (1419b), examples/typescript/package-lock.json (51960b), examples/typescript/package.json (418b), examples/typescript/README.md (1861b), examples/typescript/tsconfig.json (260b), glama.json (96b), LICENSE (905b), README.md (4218b), SECURITY.md (609b), skill-card.md (2854b), SKILL.md (9813b), _meta.json (130b)\n\nArchive v1.0.28: 19 files, 30697 bytes\n\nFiles: agent-registration.json (748b), AGENTS.md (2831b), examples/curl/README.md (3791b), examples/mcp/README.md (2684b), examples/python/main.py (2963b), examples/python/README.md (2442b), examples/README.md (1550b), examples/typescript/example.ts (1419b), examples/typescript/package-lock.json (51960b), examples/typescript/package.json (418b), examples/typescript/README.md (1861b), examples/typescript/tsconfig.json (260b), glama.json (96b), LICENSE (905b), README.md (4218b), SECURITY.md (609b), skill-card.md (3077b), SKILL.md (9773b), _meta.json (130b)\n\nArchive v1.0.27: 19 files, 30527 bytes\n\nFiles: agent-registration.json (748b), AGENTS.md (2831b), examples/curl/README.md (3791b), examples/mcp/README.md (2684b), examples/python/main.py (2963b), examples/python/README.md (2442b), examples/README.md (1550b), examples/typescript/example.ts (1419b), examples/typescript/package-lock.json (51960b), examples/typescript/package.json (418b), examples/typescript/README.md (1861b), examples/typescript/tsconfig.json (260b), glama.json (96b), LICENSE (905b), README.md (4218b), SECURITY.md (609b), skill-card.md (2666b), SKILL.md (9787b), _meta.json (130b)","readmeExcerpt":"Skill: BridgeNode — x402 pay-per-request LLM inference for AI agents (Solana USDC) Owner: bridgenode Summary: BridgeNode — anonymous pay-per-request LLM inference for AI agents without API keys or registration. OpenAI-compatible chat completions endpoint + MCP access... Tags: latest:1.0.36 Version history: v1.0.36 | 2026-09-23T07:02:06.657Z | auto - Updated per-client daily budget rules: free budget now tracks by /24","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"curl https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"gpt-oss-20b\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":200}'"},{"language":"bash","snippet":"curl https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"gpt-oss-20b\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":200}'"},{"language":"bash","snippet":"curl https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"deepseek-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":200}'"},{"language":"bash","snippet":"curl https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"deepseek-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":200}'"},{"language":"bash","snippet":"curl https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"PAYMENT-SIGNATURE: <base64 payload>\" \\\n  -d '{\"model\":\"deepseek-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":200}'"},{"language":"bash","snippet":"curl https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"PAYMENT-SIGNATURE: <base64 payload>\" \\\n  -d '{\"model\":\"deepseek-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":200}'"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: bridgenode\nversion: 1.0.16\ndescription: BridgeNode — x402 pay-per-request AI inference for agents. OpenAI-compatible API + MCP server with tool calling, Solana USDC, gas-free micropayments. No API keys. Free models included. Live prices: bridgenode.cc/v1/models Use when an agent lacks a provider API key or wants privacy-preserving per-request AI inference pricing.\nmetadata:\n  author: BridgeNode\n  version: \"1.0.16\"\n  url: https://bridgenode.cc\n  repository: https://github.com/bridgenode-ai/bridgenode-skill\n  network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\n  currency: USDC\n  openclaw:\n    emoji: \"⚡\"\n    homepage: https://bridgenode.cc\ncompatibility: Any OpenAI-compatible agent with x402 payment support; MCP clients (streamable-http)\n---\n\n# BridgeNode\n\n## Overview (natural language)\n\nBridgeNode is an AI inference service for agents: anonymous LLM access without API keys, without registration, without subscriptions. Agents get an OpenAI-compatible chat completions endpoint and pay as they go with Solana USDC micropayments via the x402 payment protocol (HTTP 402). Model prices are published per token on the public models endpoint; transaction fees are sponsored, so an agent only needs USDC in its own wallet. Works with any OpenAI-compatible agent, MCP clients, and x402-capable SDKs.\n\n\n## Free access (start here — no payment, no wallet)\n\n- **Free models** (`gpt-oss-20b, gpt-oss-120b, glm-4.7-flash, glm-4.5-flash, glm-4.6v-flash`) are served without payment: no 402, no wallet, no gas. Same endpoint, same request body.\n\n**Free model notes (read before choosing one):**\n- `glm-4.7-flash` — ⚠️ **temporarily unreliable**: z.ai free model: slower than the Groq free models — a reply can take up to a minute, and the provider is sometimes overloaded. If it returns an error (rate limit / temporarily overloaded), retry once or switch to gpt-oss-20b, the most reliable free model.\n- `glm-4.5-flash` — ⚠️ **temporarily unreliable**: z.ai free model: slower than the Groq free models — a reply can take up to a minute, and the provider is sometimes overloaded. If it returns an error (rate limit / temporarily overloaded), retry once or switch to gpt-oss-20b, the most reliable free model.\n- `glm-4.6v-flash`: z.ai free model: slower than the Groq free models — a reply can take up to a minute, and the provider is sometimes overloaded. If it returns an error (rate limit / temporarily overloaded), retry once or switch to gpt-oss-20b, the most reliable free model.\n- **Free trials:** a client that has never called us gets **2 free calls on PAID models** without payment — real inference from a real model before any wallet exists. The remaining count travels in the response headers (`X-Bridgenode-Free-Trials-Remaining`).\n- When the trials are used up, the third call returns **402** with a machine-readable offer in `extensions.bridgenode` (free models, trials left, `how_to_pay`, `docs`) — not a dead end.\n- Check the live list: `GET https://bridgenode.cc/v1/models` (`\"fre"},{"path":"examples/curl/README.md","content":"# BridgeNode curl example\n\nManual x402 flow with curl. This shows the protocol steps; for automatic\npayment handling use [x402curl](https://github.com/second-state/x402-skill)\n(drop-in curl replacement) or the SDK examples.\n\n> ⚠️ Mainnet warning: Solana mainnet, real USDC. Minimum charge: $0.002.\n> Check the 402 `amount` before signing.\n\n## Step 1 — Request, get 402\n\n```bash\ncurl -sS -D - -o /dev/null https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"deepseek-v4-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":100}'\n```\n\nExpected: `HTTP/1.1 402 Payment Required` with a `PAYMENT-REQUIRED` header\n(base64 JSON: scheme, network, amount, asset, payTo, memo, feePayer).\n\n## Step 2 — Sign the partial transaction\n\nDecode the `PAYMENT-REQUIRED` header and sign a partial transaction:\nUSDC `TransferChecked` (amount from the 402) + Memo instruction, signed with\nthe agent's Solana keypair. The fee payer is NOT signed by the agent —\nBridgeNode sponsors gas.\n\nUse any x402-capable signer: `x402curl`, the official SDKs (`x402[svm,httpx]`,\n`@x402/svm`), or the Solana `pay` CLI. This produces a base64 JSON payload\n(`x402Version`, `resource`, `accepted`, `payload.transaction`).\n\n## Step 3 — Retry with PAYMENT-SIGNATURE\n\n```bash\nPAYLOAD=\"<base64 JSON from step 2>\"\ncurl -sS https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"PAYMENT-SIGNATURE: $PAYLOAD\" \\\n  -d '{\"model\":\"deepseek-v4-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":100}'\n```\n\nExpected: `200 OK` with the completion and a `PAYMENT-RESPONSE` header\n(settlement receipt).\n\n## Automatic alternative — x402curl\n\n```bash\n# install: https://github.com/second-state/x402-skill\n# config: X402_PRIVATE_KEY=... (agent's Solana keypair)\nx402curl -sS https://bridgenode.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"deepseek-v4-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"max_tokens\":100}'\n```\n\nx402curl detects the 402, signs the payment, and retries automatically.\n\n## Expected output (Step 1)\n\n```\nHTTP/2 402\npayment-required: <base64 JSON — scheme, network, amount, asset, payTo, memo, feePayer, recentBlockhash>\n{\"x402Version\":2,\"error\":\"PAYMENT-SIGNATURE header is required\",\"resource\":{...},\"accepts\":[{\"scheme\":\"exact\",\"network\":\"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\",\"asset\":\"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\"amount\":\"2000\",\"payTo\":\"<BridgeNode wallet>\",\"maxTimeoutSeconds\":30,\"extra\":{...}}]}\n```\n\n## Expected output (Step 3, after signing)\n\n```\nHTTP/2 200\npayment-response: <base64 JSON — SettlementResponse: success, payer, transaction, network, amount>\n{\"id\":\"...\",\"object\":\"chat.completion\",\"model\":\"deepseek-v4-flash\",\"choices\":[...],\"usage\":{...}}\n```\n\n- The exact `amount` comes from the 402 response (minimum charge: 2000 atomic units = $0.002).\n- Live prices always: `GET https://bridgenode.cc/v1/models`.\n\n## Troubleshooting\n\n- **`402` ins"},{"path":"examples/mcp/README.md","content":"# BridgeNode MCP example\n\nCall BridgeNode through its MCP server with x402 payment.\n\n## Server\n\n- URL: `https://bridgenode.cc/mcp` (streamable-http)\n- Tool: `chat_completions` (model | mode, messages, max_tokens)\n- Payment: x402 handshake per tool call (via `_meta[\"x402/payment\"]`)\n\nPrices are annotated in `tools/list` (`x-x402`) as an indication; the actual\namount is in the 402 response — always check it before signing.\n\n## Option A — one-command wrapper (any MCP client)\n\n```bash\nnpx -y @bridgenode/mcp@latest\n```\n\nUse this as the MCP server command in your client (Claude Code, Cursor,\nWindsurf, etc.). The wrapper connects to `https://bridgenode.cc/mcp` and\nhandles x402 payment automatically with the agent's wallet.\n\nClaude Code example:\n\n```bash\nclaude mcp add bridgenode -- npx -y @bridgenode/mcp@latest\n```\n\n## Option B — direct streamable-http\n\nConfigure your MCP client with:\n\n```\nURL: https://bridgenode.cc/mcp\nTransport: streamable-http\n```\n\n## What the agent sees\n\n1. `tools/list` → `chat_completions` with `x-x402` price annotation.\n2. `tools/call` → server returns payment required (result with\n   `structuredContent` PaymentRequired object).\n3. Client signs the USDC transaction, retries the call with\n   `_meta[\"x402/payment\"]`.\n4. Server settles, runs inference, returns the completion with\n   `_meta[\"x402/payment-response\"]` (settlement receipt).\n\n## Expected output (`tools/list`)\n\n```json\n{\"result\":{\"tools\":[{\"name\":\"chat_completions\",\"title\":\"Chat completions with x402 payment\",\"description\":\"Send a chat completion request to any supported model. Paid tool: x402 payment (Solana USDC) is required — the first call returns 402 with the exact price; retry with _meta[\\\"x402/payment\\\"]. ...\",\"inputSchema\":{...},\"x-x402\":{\"scheme\":\"exact\",\"network\":\"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\",\"amount\":\"2000\",\"asset\":\"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\"payTo\":\"<BridgeNode wallet>\"}}]}}\n```\n\n- The `x-x402` amount is **indicative** (floor); the exact amount is in the 402 response — always check it before signing.\n\n## Troubleshooting\n\n- **`tools/call` returns payment required** — expected on the first call; that is the x402 challenge, not an error.\n- **Client can't connect** — use the one-command wrapper (`npx -y @bridgenode/mcp@latest`) or point the client at `https://bridgenode.cc/mcp` with `streamable-http`.\n- **`503 Service busy`** — retry with backoff.\n- **Empty answer from reasoning models** — use `max_tokens >= 200`.\n\n## Notes\n\n- Solana mainnet, real USDC. Minimum charge: $0.002 per request.\n- Gas sponsored by BridgeNode — the agent only needs USDC, no SOL.\n- Free tools (e.g., model list) skip payment."},{"path":"examples/python/README.md","content":"# BridgeNode Python example\n\nBuyer-side example: AI agent pays for and calls BridgeNode with the official\nx402 Python SDK (`x402[svm,httpx]`).\n\n## Setup\n\n```bash\npip install \"x402[svm,httpx]\" \"solana==0.39.0\" python-dotenv\ncp .env.example .env\n# fill SVM_PRIVATE_KEY (agent's Solana keypair, must have USDC ATA)\n```\n\n## Run\n\n```bash\npython main.py\n```\n\n## What it does\n\n1. `GET /v1/models` — free, lists models and prices.\n2. `POST /v1/chat/completions` — x402 payment handled automatically:\n   request → 402 → sign partial TX (USDC TransferChecked + Memo) →\n   retry with `PAYMENT-SIGNATURE` → 200 + `PAYMENT-RESPONSE`.\n\n## Expected output\n\n```\nInitialized SVM account: <your wallet address>\nModels & prices: {\"object\":\"list\",\"data\":[{\"id\":\"deepseek-v4-flash\",\"pricing\":{\"prompt\":2e-07,\"completion\":4e-07},...}]}\n\nPOST https://bridgenode.cc/v1/chat/completions\nStatus: 200\nBody: {\"id\":\"...\",\"object\":\"chat.completion\",\"model\":\"deepseek-v4-flash\",\"choices\":[...],\"usage\":{...}}\n\nPayment response: {\n  \"success\": true,\n  \"payer\": \"<your wallet address>\",\n  \"transaction\": \"<signature>\",\n  \"network\": \"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\",\n  \"amount\": \"2000\"\n}\n```\n\n- The exact `amount` comes from the 402 response (minimum charge: 2000 atomic units = $0.002).\n- Live prices always: `GET https://bridgenode.cc/v1/models`.\n\n## Troubleshooting\n\n- **`SVM_PRIVATE_KEY missing`** — copy `.env.example` to `.env` and fill in the keypair.\n- **`InsufficientFunds` / payment rejected** — the wallet needs a USDC ATA with balance on Solana mainnet.\n- **`Invalid account`** — the agent must have an existing USDC ATA (it is derived from the wallet address automatically when funded).\n- **`402` spam / timeout** — the server rate-limits 402 responses per IP; wait a moment and retry.\n- **Empty answer from reasoning models** — use `max_tokens >= 200`; too-small limits can produce an empty response (service was provided, no refund).\n\n## Notes\n\n- Solana mainnet, real USDC. Minimum charge: $0.002 per request.\n- Gas is sponsored by BridgeNode — the agent only needs USDC, no SOL.\n- The agent must have an existing USDC ATA (associated token account).\n- Funding: send USDC on Solana mainnet to the agent's own wallet — BridgeNode never holds balances; every request is paid individually via x402 (exact amount in the 402 response). The USDC ATA is derived from the agent's wallet address; no manual token account setup needed."},{"path":"examples/README.md","content":"# BridgeNode Examples\n\nBuyer-side examples: how an AI agent pays for and calls BridgeNode via x402.\n\nAll examples are **client-side only** — they use the public x402 SDKs and the\npublic BridgeNode endpoint (`https://bridgenode.cc/v1`). No server code.\n\n> ⚠️ **Mainnet warning:** BridgeNode runs on Solana mainnet with real USDC.\n> Use a wallet with a small balance. Minimum charge per request: $0.002 USDC.\n> Check the 402 `amount` before signing.\n\n## Contents\n\n| Example | Stack | What it shows |\n|---|---|---|\n| [curl/](curl/README.md) | curl + x402curl | Manual x402 flow: request → 402 → sign → retry |\n| [python/](python/README.md) | Python + `x402[svm,httpx]` | OpenAI-compatible call with automatic payment |\n| [typescript/](typescript/README.md) | TypeScript + `@x402/svm` | Fetch wrapper with automatic payment |\n| [mcp/](mcp/README.md) | MCP client | Paid tool call through the BridgeNode MCP server |\n\n## Flow (x402 V2, exact scheme)\n\n1. `POST /v1/chat/completions` without payment → server responds `402` with a\n   `PAYMENT-REQUIRED` header (base64 JSON: amount, payTo, memo).\n2. Client signs a partial transaction: USDC `TransferChecked` + Memo.\n3. Client retries with `PAYMENT-SIGNATURE` header.\n4. Server verifies, settles (gas sponsored by BridgeNode), returns `200` with a\n   `PAYMENT-RESPONSE` header (settlement receipt).\n\nNetwork: `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` (mainnet) · Asset: USDC\n`EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`\n\nModels and live prices: `GET https://bridgenode.cc/v1/models` (free)."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":2228,"uniquenessScore":33,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T22:02:04.098Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T22:02:04.098Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T03:52:42.309Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}