Skip to content
Sign in
Menu

Publish your first API

From signing in to a live gateway URL that agents can pay to call.

  • Tutorial
On this page

What you'll achieve

A live API in the NODRA directory, with a gateway URL that answers paid calls.

Prerequisites

  • A public https:// API that returns data on at least one path.
  • A Solana wallet in your browser that has received USDC at least once.
  • Your API's key and the header it reads it from, if it needs one.

1. Sign in

Go to Sign in, choose your wallet and sign the message. Your account is created on first sign-in.

2. Enter the details

Choose Register API. Fill in the name, slug, description, upstream URL, key and price. Choose a category.

TextIllustrative values
API name           Weather forecasts
Slug               weather-forecasts
Upstream URL       https://api.example.com/v1
Key header         X-API-Key
Price per request  0.010 USDC   →  agents pay 0.013 USDC

Choose Save and continue to test.

3. Run a test call

Choose a method and a path that returns real data, such as GET /forecast?city=Lisbon, then Run test call. Wait for Test passed.

4. Launch

Choose Continue to launch, review the prices, and choose Launch API. Wait for Live.

5. Check it from outside

Copy the gateway URL and ask it for a quote:

ShellIllustrative values
curl -i 'https://gateway.example.com/v1/weather-forecasts/forecast?city=Lisbon'

Expected result

The curl call returns 402 Payment Required with a PAYMENT-REQUIRED header, and the API appears in the directory. Usage numbers appear a few minutes after its first paid calls.

Common mistakes

MistakeFix
Using a staging or localhost upstreamNODRA only calls public https:// hosts. The upstream URL can't be changed later, so use the production base URL.
Testing a path that returns an empty 2xxThe default billing rule needs a body. Test a path that returns content.
Launching from a wallet with no USDC accountSend the wallet any amount of USDC once, then choose check again.
Choosing a slug you'll want to changeSlugs are permanent. Pick a short, descriptive one.