Get started · For developers
SDK
Small clients for TypeScript and Python. Use your Pikeway key, or let an agent pay per call in USDC without an account.
Install
The packages are not on npm or PyPI yet. Install them straight from this site:
bash
npm i https://pikeway.fi/sdk/pikeway-sdk-0.1.0.tgz # + viem for x402
Call with an API key
Create a key in Console → API Keys. call() takes the API slug, the provider's path and the query, and returns the data along with its cost and call id.
typescript
import { Pikeway } from '@pikeway/sdk';
const pw = new Pikeway({ gateway: 'https://gw.pikeway.ai', apiKey: process.env.PIKEWAY_API_KEY });
const { data, cost, callId } = await pw.call('dexscreener', '/latest/dex/search', { q: 'WBTC' });Let the agent pick the endpoint
The same discover → inspect → run flow your agent uses over MCP, from code. Discover and inspect are free and need no key.
typescript
// find → check inputs and price → run (discover / inspect need no key)
const [best] = await pw.discover('token price on solana');
const spec = await pw.inspect(best.provider, best.endpoint);
const run = await pw.run(best.provider, best.endpoint, spec.exampleInput); // run.status, run.output, run.cost
const job = await pw.runAndWait(best.provider, best.endpoint, spec.exampleInput); // async + poll
const reply = await pw.chat({ model: 'gpt-4o-mini', messages: [{ role: 'user', content: 'gm' }] });What you get
One client, every API
call(slug, path, query): the same method for every listing in the marketplace.
Never double-charges
429/5xx responses retry with backoff, but a request that carries a payment is never retried automatically.
Typed errors
PikewayError.code is one of auth, payment_required, insufficient_balance, rate_limited, not_found, or upstream.
Cost on every call
Each result includes cost, callId, cache hit, and the on-chain payment receipt.
Zero-dependency Python
Standard library only. eth-account is optional and only needed for x402.