Agent API Reference
Technical reference for AI agents calling monetized APIs programmatically. For a visual walkthrough, see Browse and Use APIs.
Discovery
Find APIs via Discovery Endpoint
Browse all published APIs from the platform's discovery endpoint. Returns a Markdown catalog with slugs, descriptions, and pricing.
curl https://monetize.fluxapay.xyz/api/discover?type=api# FluxA Discovery
## API Servers
**Access endpoints:** `curl https://proxy-monetize.fluxapay.xyz/api/{slug}`
**Integration guide:** `curl https://monetize.fluxapay.xyz/browse-servers/{slug}/skills.md`
| Slug | Name | Description | Price | Tags |
|------|------|-------------|-------|------|
| kling-video-generation | Kling Video Generation | AI video generation powered by Kling | $0.50 | video, ai, kling |
| nano-banana-pro-image-generation | Nano Banana Pro Image Generation | High-quality AI image generation | $0.01 | image, ai |
| video-generation-with-veo | Video Generation with Veo | Google Veo video generation | $0.50 | video, ai, veo |
| rapid-bird-api | Rapid Bird API | APIs for searching and viewing on Bird | $0.01-$0.10 | twitter, social |Query parameters:
| Param | Default | Description |
|---|---|---|
type | api | Filter by type: api, skill, or comma-separated api,skill |
limit | 50 | Results per page (max 100) |
offset | 0 | Pagination offset |
tags | — | Comma-separated tag filter |
For a specific API's integration guide:
curl https://monetize.fluxapay.xyz/browse-servers/{slug}/skills.mdDiscover Endpoints on a Specific API
Once you have a slug, GET the proxy root to see that API's endpoints and pricing. No authentication required.
curl https://proxy-monetize.fluxapay.xyz/api/{slug}{
"name": "Weather API",
"description": "Real-time weather data",
"endpoints": [
{
"path": "/forecast",
"method": "POST",
"description": "Get weather forecast for a city",
"price": 0.01,
"currency": "USDC",
"enabled": true,
"inputSchema": { ... }
}
],
"paymentRequired": true,
"networks": ["base", "fluxa-monetize-credits"],
"payTo": "0x1234..."
}Making Calls
Make a Paid Call
Include X-Agent-ID and X-Payment:
curl -X POST https://proxy-monetize.fluxapay.xyz/api/{slug}/forecast \
-H "X-Agent-ID: a6aa03b9-7228-47ca-b168-41c7166a9ea9" \
-H "X-Payment: <x402-payment-token>" \
-H "Content-Type: application/json" \
-d '{"city": "San Francisco"}'The proxy verifies your payment, calls the backend, and settles the payment only after the backend responds. If the backend errors, you're not charged.
Response
The backend's response is returned directly. On successful payment, a settlement header is added:
X-Payment-Settlement: {"success":true,"transaction":"0xabc...","network":"base","payer":"0x..."}Headers
Required
| Header | Description |
|---|---|
X-Agent-ID | Your agent ID (plain string) or JWT (if API requires agent auth). Get it from fluxa-wallet status |
Required for Paid Endpoints
| Header | Description |
|---|---|
X-Payment | x402 payment token. Generated by FluxA Agent Wallet or x402-fetch |
Optional
| Header | Description |
|---|---|
X-Creator-Uid | 8-char hex creator ID for revenue attribution. Can also be in URL path: /api/{slug}/{creatorUid}/path |
X-Skill-Name | Skill name for analytics tracking |
X-Task-Id | Task ID for execution tracing |
Agent Authentication
Some APIs require verified agent identity. If the API has agent auth enabled:
- Pass your full JWT (not plain agent ID) in
X-Agent-ID - Get your JWT from
fluxa-wallet statusor theAGENT_JWTenvironment variable - If your JWT is expired, refresh it with
fluxa-wallet refresh
# Plain agent ID (most APIs)
-H "X-Agent-ID: a6aa03b9-7228-47ca-b168-41c7166a9ea9"
# JWT (APIs with agent auth enabled)
-H "X-Agent-ID: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."If you're unsure, try the plain agent ID. The proxy returns 401 with a clear message if a JWT is required.
Payment
Paid endpoints return 402 Payment Required with x402 payment details when called without payment:
{
"x402Version": 1,
"error": "X-PAYMENT header is required",
"accepts": [
{
"scheme": "exact",
"network": "base",
"maxAmountRequired": "10000",
"payTo": "0x...",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"resource": "https://proxy-monetize.fluxapay.xyz/api/{slug}/forecast",
"description": "API access: /forecast"
}
]
}Payment amounts are in USDC smallest units (6 decimals). 10000 = $0.01 USDC.
Currently supported networks: Base (on-chain USDC) and FluxA Credits.
Pricing
Each endpoint has its own price set by the seller (minimum $0.01). Prices are shown in the discovery response and on the marketplace page.
Errors
| Status | Meaning |
|---|---|
400 | Missing X-Agent-ID header |
401 | Agent auth failed — JWT invalid, expired, or missing |
402 | Payment required or payment settlement failed |
404 | Endpoint not found or not published |
502 | Backend API error — no payment was taken |
