Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

build-x402-client

Skill by coinbase

Build A client that pays for HTTP APIs returning 402 Payment Required, using the x402 protocol and a CDP-managed wallet. It covers TypeScript and Python and is aimed at developers calling paid endpoints from their own app or agent.

  • Score 74
  • 211 stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install build-x402-client

Built from the published package, never by AI.

git clone --depth 1 https://github.com/coinbase/cdp-sdk /tmp/cdp-sdk && mkdir -p ~/.claude/skills && cp -r /tmp/cdp-sdk/skills/build-x402-client ~/.claude/skills/build-x402-client

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install build-x402-client in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This agent skill guides an assistant through writing code that pays for HTTP APIs that answer 402 Payment Required. It uses the x402 protocol and a wallet managed by Coinbase Developer Platform (CDP). The skill first detects the language, HTTP client and transport from the project, then confirms the CDP API key and wallet secret. It installs the matching packages and writes a client that answers 402 responses automatically.

The default network is Base testnet, and the skill says not to move to Base mainnet unless the user asks in the current turn. The client is then funded with testnet USDC from the CDP faucet, and a successful call returns HTTP 200. The source says it is for developers who want to call a paid endpoint from their own application or agent, add x402 payments to an HTTP client, or migrate off a raw private key.

Written from the project's SKILL.md and checked against it.

What it can do

  • Language and client detectionChooses TypeScript or Python and the HTTP client from the project's dependencies and files.
  • Credential checkConfirms CDP_API_KEY_ID, CDP_API_KEY_SECRET and CDP_WALLET_SECRET are set before installing.
  • Dependency installLists the x402 and CDP SDK packages to install for fetch, axios, MCP, httpx or requests.
  • TypeScript clientWrites a CdpX402Client setup wrapped around fetch, with a route to axios and MCP variants.
  • Python clientWrites an async CdpClient setup with x402Client and x402HttpxClient, plus a requests variant.
  • Testnet fundingRequests Base Sepolia USDC from the CDP faucet for the wallet address the client prints.
  • VerificationRe-runs the client and treats HTTP 200 as proof that the payment settled and the resource returned.
  • Troubleshooting tableLists common 402, TypeError, wallet authentication and network mismatch errors with fixes.

What you need

  • CDP API key
  • CDP wallet secret
  • Node.js 22 or later, or Python 3.10 or later
  • USDC on Base Sepolia for testing

Try asking

  • Write a TypeScript client that pays for https://x402.vercel.app/protected
  • Add x402 payments to my Python httpx client using a CDP wallet
  • Migrate my x402 client off a raw private key to CdpX402Client

Good to know

  • The skill is for server-side code; end users paying from their own wallets need a different flow.
  • Mainnet payments spend real USDC, so the default is testnet.
  • There is no CdpX402Client in Python, so the client is assembled by hand.
  • Node.js 22 or later or Python 3.10 or later is required.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/build-x402-client/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to build-x402-client

All alternatives →

Compare with meme-rush, okx-market or saas-metrics-coach

build-x402-client: common questions

Does this skill work with a CDP-managed wallet?

Yes. The skill is built around a CDP-managed wallet, and the TypeScript client provisions the wallet through CdpX402Client. The source says there is no key to store.

Which languages are covered?

The source covers TypeScript and Python. It tells the assistant to read only the subsection for the language it detected, because the two paths differ.

Is this skill for building a paid API instead?

No. The source says that a user who is charging for an API should use the build-x402-server skill instead.

How do I install build-x402-client?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is build-x402-client free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is build-x402-client safe to use?

It scores 74 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to build-x402-client?

Similar skills: meme-rush, okx-market, saas-metrics-coach, sec-edgar.

build-x402-client Install

Add to stack

Loading.