Endpoints

This reference documents all available endpoints in the Flux API Gateway.

Base URL

https://useflux.site/api/v2

API Management

List All APIs

GET /apis

Returns a paginated list of all available APIs.

Response:

{
  "apis": [
    {
      "id": "api_123",
      "name": "Weather API",
      "provider": "0x...",
      "pricePerRequest": "0.001",
      "currency": "ETH",
      "endpoint": "https://api.weather.example.com",
      "description": "Real-time weather data"
    }
  ],
  "total": 42,
  "page": 1
}

Get API Details

Retrieve detailed information about a specific API.

Parameters:

  • apiId (string, required) — The API identifier

Response:

Create API

Create a new API listing. Requires wallet authentication.

Request Body:

Response: Returns the created API object with ID.

Update API

Update an existing API. Only the provider can update their own API.

Parameters:

  • apiId (string, required) — The API identifier

Request Body: Same as Create API

Discovery

Get API Discovery Information

Retrieve structured discovery information for AI agents, including OpenAPI spec and pricing.

Parameters:

  • apiId (string, required) — The API identifier

Response:

Get Agent Info

Get agent-specific information for autonomous integration.

Parameters:

  • apiId (string, required) — The API identifier

Response:

Gateway

Call API Through Gateway

Route a request through the Flux gateway to the target API. Requires valid payment proof.

Parameters:

  • apiId (string, required) — The API identifier

  • path (string, required) — The target API path

Headers:

  • X-Payment-Tx (string, required) — Transaction hash proving payment

  • X-Signature (string, required) — ECDSA signature of the transaction

  • Content-Type (string) — Request content type

Response: Proxied response from the target API

History

Get Call History

Retrieve the call history for the authenticated user.

Query Parameters:

  • apiId (string, optional) — Filter by API

  • limit (number, optional) — Number of records to return (default: 50)

  • offset (number, optional) — Pagination offset (default: 0)

Response:

Error Responses

All endpoints return standard error responses. See Error Codes for details.

Standard Error Format:

Last updated