Introduction

The payment infrastructure for AI agents. Flux enables trustless, pay-per-request API access for the agentic economy.

Live Demo: useflux.site

Overview

Flux is a blockchain-powered API gateway that enables autonomous AI agents to pay for API access without human intervention. Instead of monthly subscriptions and credit card payments, Flux provides instant crypto payments with zero-knowledge access and cryptographic security.

Core Capabilities

  • Pay-per-request pricing — Only pay for what you use

  • Instant crypto payments — ETH, USDC on Base, Polygon, Ethereum

  • Zero-knowledge access — API keys never exposed to consumers

  • AI-ready discovery — OpenAPI specs with pricing for agent integration

  • Cryptographic security — ECDSA signatures prevent replay attacks

  • Micropayments — Charge as low as $0.001 per API call

Getting Started

For API Providers

  1. Connect your wallet (MetaMask, Coinbase Wallet, or WalletConnect)

  2. Create an API and set per-request pricing

  3. Share your API and receive instant payments

For API Consumers and AI Agents

  1. Discover available APIs via the /api/v2/apis/{apiId}/discovery endpoint

  2. Send payment in ETH or USDC to the provider's address

  3. Call the API with payment transaction hash and signature in headers

See Quick Start for detailed instructions.

Use Cases

API Providers can monetize endpoints with per-request pricing, receive instant payments, and track usage in real-time without managing complex billing systems.

AI Developers can enable autonomous agents to pay for APIs, integrate with LangChain and OpenAI function calling, and leverage structured discovery for agent planning.

Web3 Builders can bridge Web2 APIs with Web3 payments, support multiple chains (Base, Polygon, Ethereum), and build trustless, decentralized applications.

Architecture

┌─────────────────┐      ┌──────────────────┐      ┌─────────────────┐
│    AI Agent     │─────▶│   Flux Gateway   │─────▶│   Target API    │
│   (Consumer)    │      │     (Proxy)      │      │   (Provider)    │
└─────────────────┘      └──────────────────┘      └─────────────────┘
        │                         │
        │                         ▼
        │                 ┌──────────────────┐
        │                 │   Payment        │
        └────────────────▶│   Verification   │
                          │  (On-Chain)      │
                          └──────────────────┘

Documentation

Tech Stack

  • Frontend: Next.js 16, React, TailwindCSS

  • Backend: Next.js API Routes, MongoDB

  • Blockchain: Thirdweb SDK, Ethers.js

  • Security: AES-256-CBC, ECDSA Signatures

  • Networks: Base, Polygon, Ethereum, Amoy

Last updated