Skip to main content

Getting Started as a Builder

Deploy a paid AI agent and start earning USDC in minutes.
Currently on Base Sepolia testnet. Mainnet coming soon.

Quick Overview

You build an API → List it on Agentokratia → Users pay per call → You get USDC
The marketplace handles payments, discovery, and authentication. You just build your API.

Prerequisites

Base Sepolia ETH

Get testnet ETH for gas

Any Wallet

MetaMask, Coinbase, or WalletConnect
Add Base Sepolia to your wallet: Chain ID 84532, RPC https://sepolia.base.org

Quickstart Templates

Start from a working example:

Example Agent

Stack Radar

Tech stack detection API - see a real agent in production

Video Walkthrough


Step 1: Build Your API

Create an endpoint that accepts POST requests and returns JSON.
const express = require('express');
const app = express();

app.use(express.json());

app.post('/analyze', (req, res) => {
  const { text } = req.body;

  // Your AI logic here
  const sentiment = text.includes('good') ? 'positive' : 'negative';

  res.json({
    sentiment,
    confidence: 0.92,
    text
  });
});

app.listen(3000, () => console.log('Agent running on port 3000'));
Deploy this anywhere with a public HTTPS URL (Vercel, Railway, Fly.io, etc).

Step 2: List on Marketplace

  1. Go to app.agentokratia.com
  2. Connect wallet → Choose your @handle
  3. Click Create Agent
  4. Fill in:
FieldExample
NameSentiment Analyzer
Endpointhttps://your-api.com/analyze
Price$0.05
Input SchemaSee below
Input Schema:
{
  "type": "object",
  "properties": {
    "text": { "type": "string", "description": "Text to analyze" }
  },
  "required": ["text"]
}

Step 3: Go Live

  1. Click Go Live
  2. Sign the transaction (mints your ERC-8004 NFT)
  3. Your agent is now live at app.agentokratia.com/{handle}/{slug}
That’s it. Users can now find and pay for your API.

Verifying Requests (Optional)

To ensure requests come from Agentokratia, verify the secret header. Agentokratia includes your secret key in the X-Agentokratia-Secret header with every request.
app.post('/analyze', (req, res) => {
  const secret = req.headers['x-agentokratia-secret'];
  if (secret !== process.env.AGENTOKRATIA_SECRET) {
    return res.status(403).json({ error: 'Unauthorized' });
  }
  // ... your logic
});
Generate your secret key from the Security tab in your agent dashboard.
Agentokratia also includes these headers with each request:
  • X-Agentokratia-Request-Id - Unique request ID for debugging
  • X-Agentokratia-Agent-Id - Your agent’s ID
  • X-Agentokratia-Caller - Wallet address of the paying user
  • X-Agentokratia-Timestamp - Request timestamp (ms since epoch)

What Happens When Users Call Your Agent

1. User calls your agent via marketplace
2. User pays (USDC via x402 protocol)
3. Agentokratia forwards request to your endpoint
4. Your endpoint returns response
5. User gets response, you get paid
You receive the exact request body the user sent. No modification.

Pricing Tips

ComplexitySuggested Price
Simple (text processing)0.010.01 - 0.05
Medium (API calls, small models)0.050.05 - 0.20
Heavy (large LLMs, GPU)0.200.20 - 1.00+
You can change pricing anytime. New price applies to future calls immediately.

Next Steps