Skip to content

Latest commit

 

History

History
88 lines (61 loc) · 2.71 KB

File metadata and controls

88 lines (61 loc) · 2.71 KB

Surf

Pay-per-use API gateway for AI agents. Inference, Twitter data, Reddit data, and web crawling - no API keys, no subscriptions. Pay per request via x402 (USDC on Solana/Base) or MPP (Tempo).

Live at surf.cascade.fyi

Services

All endpoints live under surf.cascade.fyi. Unified MCP server at /mcp.

Service Endpoints Price Networks
Inference - 15 LLM models (Kimi K2.5, Grok 4.20, GLM-5, Claude, MiniMax, Qwen) /api/v1/inference/v1/chat/completions $0.001 - dynamic Solana, Base, Tempo
Twitter - Search tweets, fetch users and tweets /api/v1/twitter/{search,tweet,user} $0.005/call Solana, Base, Tempo
Reddit - Search posts, subreddits, users, comments /api/v1/reddit/{search,post,subreddit,user} $0.005/call Solana, Base, Tempo
Web - Semantic search (Exa) + page crawling /api/v1/web/{search,crawl} $0.002 - 0.01 Solana, Base, Tempo

Quick start

Test any endpoint with x402-proxy:

# Twitter user profile + recent tweets ($0.005)
npx x402-proxy https://surf.cascade.fyi/api/v1/twitter/user/cascade_fyi

# Chat with Kimi K2.5 ($0.004)
npx x402-proxy -X POST -H "Content-Type: application/json" \
  -d '{"model":"moonshotai/kimi-k2.5","messages":[{"role":"user","content":"Hello"}]}' \
  https://surf.cascade.fyi/api/v1/inference/v1/chat/completions

Or integrate directly with @x402/fetch:

import { wrapFetch } from "@x402/fetch";

const x402Fetch = wrapFetch(fetch, walletClient);

const res = await x402Fetch(
  "https://surf.cascade.fyi/api/v1/inference/v1/chat/completions",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      model: "moonshotai/kimi-k2.5",
      messages: [{ role: "user", content: "Hello!" }],
    }),
  },
);

const data = await res.json();

MCP Server

Unified MCP server with 9 tools. Supports tool filtering via ?tools= query param.

npx x402-proxy mcp add surf https://surf.cascade.fyi/mcp

Or add a filtered subset:

npx x402-proxy mcp add surf "https://surf.cascade.fyi/mcp?tools=surf_twitter_search,surf_web_crawl"

Claude Code skills

Surf ships Claude Code skills that teach the agent how to call each API:

npx skills add cascade-protocol/surf -g

Installs the unified surf skill with references for each service.

Development

pnpm install
pnpm dev        # Start dev server
pnpm check      # Type-check + lint

License

Apache-2.0