> For the complete documentation index, see [llms.txt](https://chirags-organization-7.gitbook.io/product-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chirags-organization-7.gitbook.io/product-docs/getting-started/readme.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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 following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

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.
