Quick Start
Get started with Zion in minutes.
Installation
Install the Zion SDK using your preferred package manager.
npm install @ziongateway/sdkpnpm add @ziongateway/sdkyarn add @ziongateway/sdkbun add @ziongateway/sdkBasic Usage
Protecting a route is as simple as adding the ZionGate middleware.
import { ZionGate } from "@ziongateway/sdk";
const zion = new ZionGate({
apiKey: "YOUR_API_KEY", // Get from Zion Dashboard
price: 0.1, // Price in USDC
network: "solana-devnet", // or "solana-mainnet"
resource: "ai-agent-api" // Optional label for the resource
});
// Use in your framework (see SDK Reference)Features
- Middleware Protection - Automatically blocks unpaid requests with a
402status - Flexible Pricing - Set prices in USDC (or other assets)
- Instant Settlement - Verifies and settles payments via the Facilitator
- Framework Agnostic - Works with Express, Next.js, NestJS, and more