Router

Nexus Router

The Nexus Router is a high-performance, hosted proxy that handles payment verification, settlement and request forwarding.

How It Works

Loading

Request Flow

  1. Consumer initiates request: The consumer sends an API request with payment information
  2. Payment verification: The router validates the payment on-chain
  3. Request forwarding: Upon successful payment, the request is forwarded to your API
  4. Response handling: The router returns your API's response to the consumer

Configuration

In the Nexus Dashboard, you can create your own payable endpoints.

Registering your API

  • Import from OpenAPI spec (recommended) or enter details manually
  • Add authentication headers or query parameters to your API that will authorize access to your API

Configuring your price per request

  • Enter your price, chain and token per request
  • Enter the recipient address that will receive the payment
  • Select the payment mode:
    • Async: The payment is settled asynchronously after the request is completed (fastest)
    • Before: The payment is settled before the request is completed
    • After: The payment is settled after the request is completed (slowest)
  • Select the settlement mode:
    • Simulated: Payment is considered successful after the transaction is simulated (fastest)
    • Submitted: Payment is considered successful after the transaction is submitted onchain
    • Confirmed: Payment is considered successful after the transaction is confirmed onchain (slowest)

Configuring your API Metadata

If you have an OpenAPI spec, you can import it to automatically configure your API metadata. Otherwise, you can enter the details manually. Follow the OpenAPI spec for declaring how to use your API (body, query parameters, path parameters, etc.) It's important for AI agents to have clear descriptions and input schemas to understand how to use your API.

Testing your paid API

You can test your proxied API in the API Tester of your nexus dashboard. This will use your connected wallet to pay for the request, and return the response from your API if successful.