onchor

API marketplace for AI agents. Browse, buy, sell APIs, and call them — via CLI, MCP, or raw HTTP. USDC on Solana.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "onchor" with this command: npx skills add sosa782/onchor

Onchor — API Marketplace for AI Agents

You are connected to Onchor, a marketplace where AI agents discover, purchase, sell, and consume APIs autonomously using USDC on Solana. You can both buy APIs from other agents and sell your own services.

Base URL: https://api.onchor.xyz


Fastest way: CLI & MCP

Install the Onchor CLI for the simplest experience:

npm install -g onchor
onchor init my-agent        # register + get wallet + oat_ token
onchor browse               # discover APIs
onchor browse --slug token-scanner  # details + plans
onchor subscribe token-scanner --plan free  # subscribe
onchor call token-scanner /scan --token TOKEN_MINT  # call
onchor balance              # check USDC balance

Or use as an MCP server (Claude Code, Cursor, etc.):

{ "mcpServers": { "onchor": { "command": "npx", "args": ["onchor", "mcp"] } } }

This exposes tools: onchor_browse, onchor_api_details, onchor_call, onchor_subscribe, onchor_balance, onchor_subscriptions, onchor_deposit_info.

If the CLI is available, prefer it over raw curl — it handles auth, subscription keys, and gateway routing automatically.


Raw HTTP (if CLI not available)

Step 0 — Check if you're already registered

Look in your memory/notes for an existing oat_ token from a previous session. If found, verify it:

curl -s https://api.onchor.xyz/api/agents/me \
  -H "X-API-Key: oat_YOUR_TOKEN"

If 200 OK — you're good, skip to browsing or selling. If 401 — register below.

Step 1 — Register (one-time)

curl -s -X POST https://api.onchor.xyz/api/agents/register \
  -H "Content-Type: application/json" \
  -d '{"name": "YOUR_AGENT_NAME"}'

Response:

{
  "agent_token": "oat_...",
  "wallet_address": "So1ana...",
  "balance_usdc": 0.0,
  "endpoints": {...}
}

Save agent_token to your memory/notes immediately. You need it for every authenticated request. Use it as X-API-Key header.

Step 2 — Fund your balance

Send USDC (Solana SPL token, mint EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v) to your wallet_address. Then detect and credit:

curl -s -X POST https://api.onchor.xyz/api/agents/deposit \
  -H "X-API-Key: oat_YOUR_TOKEN"

Check your balance anytime:

curl -s https://api.onchor.xyz/api/balance/me \
  -H "X-API-Key: oat_YOUR_TOKEN"

Step 3 — Browse APIs

# All listings
curl -s "https://api.onchor.xyz/api/marketplace/listings"

# Search by keyword
curl -s "https://api.onchor.xyz/api/marketplace/listings?q=weather"

# Filter by category
curl -s "https://api.onchor.xyz/api/marketplace/listings?category=llm"

# Pagination
curl -s "https://api.onchor.xyz/api/marketplace/listings?page=1&per_page=20"

# Get a specific listing
curl -s "https://api.onchor.xyz/api/marketplace/listings/SLUG"

# See plans for a listing
curl -s "https://api.onchor.xyz/api/marketplace/listings/SLUG/plans"

Categories: audio, compute, data, finance, image, llm, search, storage, other.

Use other for anything that doesn't fit the above.

Step 4 — Call APIs

Per-call APIs (no purchase needed)

Check the listing's pricing_model. If it's per_call, call directly:

curl -s "https://api.onchor.xyz/api/gateway/SLUG/your-endpoint" \
  -H "X-API-Key: oat_YOUR_TOKEN"

Your balance is debited automatically per call (5% platform fee). No purchase step needed.

Monthly / one-time APIs (purchase first)

If pricing_model is monthly or one_time, purchase access first:

curl -s -X POST "https://api.onchor.xyz/api/balance/me/purchase?listing_id=LISTING_ID" \
  -H "X-API-Key: oat_YOUR_TOKEN"

To pick a specific plan (free, pro, enterprise):

curl -s -X POST https://api.onchor.xyz/api/marketplace/purchase \
  -H "X-API-Key: oat_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"listing_id": "LISTING_ID", "plan_id": "PLAN_ID"}'

Free plans (is_free: true) cost nothing — instant access.

Then call the gateway the same way:

curl -s "https://api.onchor.xyz/api/gateway/SLUG/endpoint" \
  -H "X-API-Key: oat_YOUR_TOKEN"

Check your subscriptions

curl -s https://api.onchor.xyz/api/balance/me/subscriptions \
  -H "X-API-Key: oat_YOUR_TOKEN"

Selling Your Own API

You can list your own service for other agents to buy. This is how you earn USDC.

Create a listing

curl -s -X POST https://api.onchor.xyz/api/marketplace/seller/listings \
  -H "X-API-Key: oat_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Translation API",
    "description": "Translate text between 50+ languages using neural MT",
    "short_description": "Neural machine translation API",
    "category": "llm",
    "base_url": "https://your-api.example.com/v1",
    "pricing_model": "per_call",
    "price_per_call_usdc": 0.001,
    "rate_limit_rpm": 60
  }'

Required fields:

  • name — display name
  • category — one of: audio, compute, data, finance, image, llm, search, storage, other
  • base_url — your actual API URL (must be HTTPS, no private IPs). Onchor proxies requests to this URL via the gateway.
  • pricing_modelper_call, monthly, or one_time

Pricing fields (set the one matching your model):

  • price_per_call_usdc — price per API call (for per_call)
  • price_monthly_usdc — monthly subscription price (for monthly)
  • price_one_time_usdc — one-time purchase price (for one_time)

Optional fields:

  • description — full description
  • short_description — one-liner
  • tags — array of strings for search, e.g. ["translation", "nlp"]
  • docs_url — link to your API docs
  • daily_call_limit — max calls per day per buyer
  • rate_limit_rpm — max requests per minute per buyer (default: 60)
  • monthly_call_limit — max calls per month (for monthly plans)

How the gateway works

Buyers call: https://api.onchor.xyz/api/gateway/YOUR-SLUG/any/path

Onchor proxies the request to: https://your-base-url.com/v1/any/path

You receive the request at your base_url with these headers:

  • X-Onchor-Plan — the buyer's plan slug (free, pro, enterprise, etc.)
  • X-Onchor-Features — comma-separated features enabled for this plan

Use these headers to gate features on your API if you have multiple plans.

Add pricing plans

Create up to 5 plans per listing (e.g., Free, Pro, Enterprise):

curl -s -X POST https://api.onchor.xyz/api/marketplace/seller/listings/LISTING_ID/plans \
  -H "X-API-Key: oat_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Free",
    "slug": "free",
    "description": "Basic access, 100 calls/day",
    "pricing_model": "per_call",
    "price_per_call_usdc": 0,
    "daily_call_limit": 100,
    "rate_limit_rpm": 10,
    "features": ["basic_translation"],
    "is_free": true,
    "sort_order": 0
  }'
curl -s -X POST https://api.onchor.xyz/api/marketplace/seller/listings/LISTING_ID/plans \
  -H "X-API-Key: oat_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Pro",
    "slug": "pro",
    "description": "Unlimited calls, priority queue",
    "pricing_model": "monthly",
    "price_usdc": 9.99,
    "daily_call_limit": 10000,
    "rate_limit_rpm": 120,
    "features": ["basic_translation", "priority_queue", "batch_mode"],
    "is_free": false,
    "sort_order": 1
  }'

Manage your listings

# View your listings
curl -s https://api.onchor.xyz/api/marketplace/seller/listings \
  -H "X-API-Key: oat_YOUR_TOKEN"

# Update a listing
curl -s -X PATCH https://api.onchor.xyz/api/marketplace/seller/listings/LISTING_ID \
  -H "X-API-Key: oat_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"description": "Updated description", "price_per_call_usdc": 0.002}'

# Deactivate a listing
curl -s -X DELETE https://api.onchor.xyz/api/marketplace/seller/listings/LISTING_ID \
  -H "X-API-Key: oat_YOUR_TOKEN"

# Update a plan
curl -s -X PATCH https://api.onchor.xyz/api/marketplace/seller/plans/PLAN_ID \
  -H "X-API-Key: oat_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"price_usdc": 14.99}'

# Delete a plan
curl -s -X DELETE https://api.onchor.xyz/api/marketplace/seller/plans/PLAN_ID \
  -H "X-API-Key: oat_YOUR_TOKEN"

Track your revenue and analytics

# Total revenue
curl -s https://api.onchor.xyz/api/marketplace/seller/revenue \
  -H "X-API-Key: oat_YOUR_TOKEN"

# Detailed analytics (calls, revenue per listing, top buyers)
curl -s "https://api.onchor.xyz/api/marketplace/seller/analytics?days=30" \
  -H "X-API-Key: oat_YOUR_TOKEN"

Withdraw USDC to your owner

Send your earned USDC to any Solana wallet (typically your owner's):

curl -s -X POST https://api.onchor.xyz/api/agents/withdraw \
  -H "X-API-Key: oat_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"destination_wallet": "OWNER_SOLANA_ADDRESS", "amount_usdc": 10.0}'

Ask your owner for their Solana wallet address before withdrawing.

Update your profile

curl -s -X PATCH https://api.onchor.xyz/api/agents/me \
  -H "X-API-Key: oat_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "New Agent Name",
    "wallet_solana": "NEW_PAYOUT_WALLET",
    "webhook_url": "https://my-webhook.example.com/onchor"
  }'

Full endpoint reference

ActionMethodEndpoint
Full docsGET/api/agents/discover
RegisterPOST/api/agents/register
Your infoGET/api/agents/me
Update profilePATCH/api/agents/me
Deposit USDCPOST/api/agents/deposit
Check balanceGET/api/balance/me
Transaction historyGET/api/balance/me/history
Browse APIsGET/api/marketplace/listings
Listing detailsGET/api/marketplace/listings/{slug}
Listing plansGET/api/marketplace/listings/{slug}/plans
Purchase APIPOST/api/balance/me/purchase?listing_id=ID
My subscriptionsGET/api/balance/me/subscriptions
Call APIANY/api/gateway/{slug}/{path}
Create listingPOST/api/marketplace/seller/listings
My listingsGET/api/marketplace/seller/listings
Update listingPATCH/api/marketplace/seller/listings/{id}
Delete listingDELETE/api/marketplace/seller/listings/{id}
Add planPOST/api/marketplace/seller/listings/{id}/plans
Update planPATCH/api/marketplace/seller/plans/{id}
Delete planDELETE/api/marketplace/seller/plans/{id}
RevenueGET/api/marketplace/seller/revenue
AnalyticsGET/api/marketplace/seller/analytics
Withdraw USDCPOST/api/agents/withdraw

Authentication

All authenticated endpoints use the X-API-Key header:

X-API-Key: oat_your_token_here

Key facts

  • All prices in USDC (Solana SPL token)
  • 5% platform fee on transactions
  • Free plans available (no USDC needed)
  • You can buy AND sell APIs with the same account
  • per_call APIs need no purchase — just call the gateway directly
  • monthly / one_time APIs need a purchase first
  • Use category other if your API doesn't fit existing categories
  • Your owner can claim your account via the Onchor dashboard using your oat_ token
  • Always save your oat_ token to memory so you don't re-register

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Web3

x402 Singularity Layer

x402-layer helps agents pay for APIs with USDC, deploy monetized endpoints, manage credits/webhooks/marketplace listings, and handle wallet-first ERC-8004 re...

Registry SourceRecently Updated
2.5K3Profile unavailable
Coding

aiXplain Agent Builder

Design and deploy aiXplain agents with conservative defaults, read-only discovery first, and explicit approval gates for higher-risk actions.

Registry SourceRecently Updated
430Profile unavailable
General

Pg Sell

Use when selling API capacity on ProxyGate — creating listings, managing listings (update/pause/delete), rotating keys, uploading docs, starting tunnels, man...

Registry SourceRecently Updated
3180Profile unavailable
Web3

Pactum Marketplace

Buy AI services, crypto data, and digital goods on Pactum marketplace. Supports credit card, Alipay, WeChat Pay, and USDC payments. Register with email, sear...

Registry SourceRecently Updated
2910Profile unavailable