# Introduction

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

**Live Demo:** [useflux.site](https://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](/product-docs/getting-started/quick-start.md) 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

* [Quick Start](/product-docs/getting-started/quick-start.md) — Get up and running in 5 minutes
* [Using the UI](/product-docs/guides/using-the-ui.md) — Create and manage APIs via dashboard
* [API Integration](/product-docs/guides/api-guide.md) — Programmatic API usage
* [AI Agent Guide](/product-docs/guides/mcp-guide.md) — LangChain and MCP integration
* [API Reference](/product-docs/api-reference/endpoints.md) — Complete endpoint documentation
* [Authentication](/product-docs/api-reference/authentication.md) — Security and signature verification

## 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

## Links

* Live App: [useflux.site](https://useflux.site)
* GitHub: [Source Code](https://github.com/yourusername/flux)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://chirags-organization-7.gitbook.io/product-docs/getting-started/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
