API routes
Everything the platform can do, and the exact shape of every request and response, is generated from the zod schemas the handlers validate against. This page is the same registry in reading order. Every error body on every route is { code, message, docs_url, details? } from the catalogue.
The base URL is https://x402git.com.
Public
Free and unauthenticated, except where a wallet signature buys a more specific answer. These are the routes a buying agent uses.
| Method | Path | Auth | What it does | Errors |
|---|---|---|---|---|
| GET | /{owner} | public | The manifest page Server-rendered HTML (§14.1). The text is in the server response, not fetched by script. | not_found |
| GET | /api | public | The public manifest Free, cacheable, unauthenticated. Computed fields and self-reported fields are separately namespaced (FR-52). | not_found rate_limited |
| GET | /api | wallet signature | Latest version and prices With a valid | not_found invalid_signature rate_limited |
| GET | /api | public | The public release log FR-15. Every release, with changelog, diff summary, scan verdict and the prices in force. Creators cannot delete entries, failing releases are published too, and a retired listing keeps its log (FR-43). Pages newest-first by | not_found rate_limited |
| GET | /api | wallet signature | Buy or fetch the latest release 402 then 200. Send the payment authorization in | not_found retired invalid_signature insufficient_balance expired_authorization replay settlement_pending settlement_timeout authorization_mismatch price_changed sanctioned_counterparty blocked_jurisdiction rate_limited |
| GET | /api | wallet signature | Re-fetch a version you own FR-19 / FR-46. Owned versions stay fetchable forever, including after the listing retires. | not_found not_entitled invalid_signature rate_limited |
| GET | /api | wallet signature | What this wallet owns FR-32. Requires | invalid_signature rate_limited |
| GET | /api | public | The creator agreement and the buyer terms FR-6 and §19. | |
| GET | /api | public | This document FR-33. Generated from the zod schemas. | |
| GET | /api | public | Is the platform answering One cheap round trip to the database, the dependency every paid path shares. | |
| GET | /.well-known | public | Where to start, if nobody told you RFC 9727. A linkset ( | |
| GET | /api | public | The README snippet FR-30. The paste-ready preamble that tells a downstream agent to check | not_found rate_limited |
| POST | /api | public | Buy-side MCP server (Streamable HTTP) FR-31. JSON-RPC 2.0 over Streamable HTTP, stateless. Five tools: | rate_limited |
Creator
Authenticated with Authorization: Bearer x4c_live_…, your agent key. This website calls exactly these routes with a key of its own, minted for your browser session; there is no private admin API.
| Method | Path | Auth | What it does | Errors |
|---|---|---|---|---|
| POST | /api | public | Register (headless) FR-2. Send | invalid_request payout_address_unverified terms_version_stale invite_required sanctioned_counterparty blocked_jurisdiction rate_limited |
| GET | /api | API key | The authenticated creator | invalid_key rate_limited |
| PATCH | /api | API key | Change payout address or abuse contact FR-5. Both need | invalid_request invalid_key step_up_required payout_address_unverified sanctioned_counterparty rate_limited |
| POST | /api | API key | Create a listing Rail B ( | invalid_request invalid_key insufficient_scope invite_required not_found public_repo too_many_unpublished rate_limited |
| GET | /api | API key | Your listings The authenticated creator's own listings, newest first. Every entry carries the same | invalid_request invalid_key rate_limited |
| GET | /api | API key | Listing status, licence, latest release, pricing
| invalid_request invalid_key not_found rate_limited |
| PATCH | /api | API key | Change price, update price, description or trigger hint FR-16: price changes apply to future purchases only. Explicit API values are never rounded (FR-12). | invalid_request invalid_key insufficient_scope not_found retired rate_limited |
| POST | /api | API key | Cut a version now FR-8. Also the recovery path for a dropped webhook, and the only path for a tag pushed before the listing existed. With no | invalid_request invalid_key insufficient_scope not_found retired version_exists repo_too_large rate_limited |
| POST | /api | API key | Commit an allow-listed LICENSE (Rail B) FR-11. MIT, Apache-2.0, BSD-3-Clause or MPL-2.0, committed to | invalid_request invalid_key insufficient_scope not_found retired rate_limited |
| PUT | /api | API key | Rotate the deploy key FR-7 / FR-5. Step-up required. One public key, one repo (§14.6): the new key is added before the old one is removed. | invalid_request invalid_key insufficient_scope step_up_required not_found retired rate_limited |
| POST | /api | API key | Publish: draft → live FR-42. Needs a licence pass, at least one passing release, a description, and — on Rail A — a repository that is still private (FR-10). A 409 | invalid_key insufficient_scope not_found retired listing_not_ready rate_limited |
| DELETE | /api | API key | Retire (stop selling) FR-43. Terminal. Holders keep every version they own; the manifest and release log stay up, marked no longer sold. A hosted repo is archived, not deleted. | invalid_key insufficient_scope not_found retired rate_limited |
| DELETE | /api | API key | Delete the hosted repo FR-44. Step-up required. Releases with at least one purchase are retained — they are the product (FR-46). | invalid_request invalid_key insufficient_scope step_up_required not_found rate_limited |
| GET | /api | API key | The ledger view FR-29. Sale rows carry version, kind, amount and time — never the buyer address, never the transaction hash (FR-40). | invalid_key insufficient_scope rate_limited |
| POST | /api | API key | Force a sweep of the released balance FR-26. Payouts go only to the bound payout address; there is no | invalid_key sanctioned_counterparty rate_limited |
Identity
Identity. A challenge is single-use and expires in five minutes.
| Method | Path | Auth | What it does | Errors |
|---|---|---|---|---|
| GET | /api | public | Get a challenge to sign FR-20. Single use, 5-minute expiry. A challenge is bound to one | invalid_request rate_limited |
| POST | /api | public | Rotate the API key with a wallet signature FR-4. No Authorization header: the signature from the bound payout address is the credential. The old key is revoked immediately. | invalid_request invalid_signature not_found rate_limited |
Internal
Called by GitHub and by the scheduler, never by you.
| Method | Path | Auth | What it does | Errors |
|---|---|---|---|---|
| POST | /api | public | GitHub webhook FR-8. | invalid_signature |
| GET | /api | public | Daily sweep FR-26 / FR-28. Vercel Cron. | |
| GET | /api | public | Daily reconciliation FR-28. Reconciles the receiving address's on-chain balance and every recorded tx hash against chain. Variance halts sweeps. |
MCP
The same routes are an MCP server, so an agent gets them as tools in one line.
claude mcp add --transport http x402git https://x402git.com/api/mcpAny client that takes a remote MCP server can add it by URL — in claude.ai and ChatGPT that is a custom connector at https://x402git.com/api/mcp; there is no login step, because every tool that moves money is authenticated by the payment itself.
| Tool | What it does | Wraps |
|---|---|---|
search_listings | Find live repos and agent skills by what they do. Free, no wallet. | nothing |
how_to_buy | Whether a listing is for sale, its price, the page to buy on, the skill and the endpoint. Free, no wallet. | nothing |
get_listing | The free manifest: file tree, licence, dependencies, security scan. | GET /api |
check_version | The latest version, and what the next fetch costs this wallet. | GET /api |
purchase | Buy the latest release over x402 with a payment you signed locally. | GET /api |
fetch_release | Re-fetch a version this wallet already owns. Free, forever. | GET /api |
search_listings is where an agent starts when it does not know a listing's name. It takes the job in plain words — { "query": "turn git history into a changelog" } — and searches every live listing's name, description, computed tags and README. Each result carries the owner and slug the other five tools take, the price, and which of your words it matched. Results are ordered by how well they match, then by name, and never by sales or popularity. max_price_micro caps the price and limit caps the count.
how_to_buy is for the client that cannot sign. A chat model has no wallet and this server never holds one for it, so it cannot buy; what it can do is read the listing, quote the price, and hand the person the page to buy on or the skill to give an agent that has a wallet. That tool returns all of it in one call.
The four tools that wrap a route are the same code path as that route — an agent without MCP loses nothing by calling the routes directly. purchase follows the x402 MCP transport: an unpaid call returns the 402 as a structured result, and a client that signs locally retries with the payment in _meta["x402/payment"].
Rate limits
| Route | Limit | Per |
|---|---|---|
| POST /api | 5 / hour | IP |
| GET /api | 30 / min | address |
| GET /api | 60 / min | address |
| GET /api | 600 / min | IP |
| GET /api | 600 / min | IP |
| Pushes | 20 / hour | repository |
Over the limit is 429 rate_limited with retry_after_seconds in the body and a Retry-After header. Unpublished listings are capped at three per creator.