Galliun lets developers monetize APIs with per-call blockchain payments. The Galliun SDK lets clients call paid endpoints, handle HTTP 402 payment requirements, pay with a connected wallet, retry the original request, and receive the final API response.
What is Galliun?
Galliun is x402 payment infrastructure for APIs, tools, MCP servers, and agent workflows. Developers register APIs and endpoints on the platform; each call can require a small USDC payment on Sui or Solana before the request executes.
All paid traffic flows through https://api.galliun.com — there is no separate gateway domain.
What does the SDK do?
The @galliun/sdk package handles the full client-side payment flow:
- Send the original API request
- Parse the
402 Payment Requiredresponse - Select the payment option for your configured chain
- Request payment from your wallet adapter
- Encode the payment proof in the
X-PAYMENTheader - Retry the identical request
- Return the final response (or throw a typed error)
You never need to manually parse 402 bodies or construct payment proofs in application code.
When to use the SDK
Use the SDK when you are building:
- A client app that calls protected API endpoints (
/p/:projectSlug/*) - A wallet-connected demo or production app with per-call billing
Use GalliunClient for generic paid API calls.
Client
| Client | Use case |
|---|---|
GalliunClient |
Generic paid fetch for any protected route |