Base URLs
Agent Network
Payment Server

Replace with your deployed server URLs (Railway / Render / Fly.io). Local development: http://localhost:3001 (agents) and http://localhost:3000 (payments).

🤖 Agent Network puerto 3001
GET / Service info & endpoint list free

Returns service metadata and available endpoints.

Response

{
  "service": "NexusLibertAI Agent Network",
  "status": "ok",
  "agents": 6,
  "token": "NLX",
  "endpoints": ["/agents","/task","/coordinate","/payments","/metrics","/health"]
}
GET /health Health check free

Used by hosting platforms (Render, Railway) to verify the server is alive.

{ "status": "ok", "uptime": 3742.1 }
GET /metrics Runtime metrics free

Returns server performance metrics and NLX economy stats for the current session.

Response

{
  "uptime": 3742,
  "uptimeHuman": "1h 2m",
  "agents": 6,
  "requests": 142,
  "tasksCompleted": 38,
  "tasksFailed": 2,
  "coordinationsTotal": 12,
  "nlxTransacted": 4800,
  "founderFeesTotal": 48,
  "recentPayments": [...],
  "startedAt": "2026-06-07T10:00:00.000Z"
}
GET /agents List all agents with wallets & prices free

Returns the 6 autonomous AI agents, each with their own Solana wallet and NLX price per task.

Response

{
  "agents": [
    { "id": "coordinator", "name": "Coordinator", "role": "coordinator",
      "priceNlx": 500, "wallet": "Coo...Xyz" },
    { "id": "researcher",  "priceNlx": 300, "wallet": "Res...Abc" },
    { "id": "writer",      "priceNlx": 400, "wallet": "Wri...Def" },
    { "id": "coder",       "priceNlx": 600, "wallet": "Cod...Ghi" },
    { "id": "translator",  "priceNlx": 200, "wallet": "Tra...Jkl" },
    { "id": "analyzer",    "priceNlx": 350, "wallet": "Ana...Mno" }
  ],
  "founderWallet": "5a2WTt...oj5x",
  "founderFee": "1% of every inter-agent payment"
}
POST /task Submit a task to a specific agent uses NLX

Runs a task on a specific agent. If payerAgentId is provided, triggers a real on-chain NLX payment from payer to target agent (1% to founder).

Request body

FieldTypeRequiredDescription
agentIdstringrequiredTarget agent: coordinator, researcher, writer, coder, translator, analyzer
instructionstringrequiredThe task instruction for the agent
payerAgentIdstringoptionalAgent paying for this task. Triggers on-chain NLX transfer.

Example

POST /task
{
  "agentId": "researcher",
  "instruction": "Summarize the top 3 use cases of AI agents on blockchain",
  "payerAgentId": "coordinator"
}

Response

{
  "task": {
    "id": "uuid",
    "fromAgent": "coordinator",
    "toAgent": "researcher",
    "instruction": "...",
    "paymentNlx": 300,
    "result": "AI agents on blockchain can...",
    "status": "completed"
  },
  "payment": {
    "from": "coordinator",
    "to": "researcher",
    "amountNlx": 300,
    "founderFeeNlx": 3,
    "txSignature": "5abc...XYZ",
    "timestamp": 1749312000000
  }
}
POST /coordinate Send complex task to coordinator (auto-delegates + parallel execution) multi-agent

The most powerful endpoint. The Coordinator AI decides which specialist agents are needed, runs all subtasks in parallel, then synthesizes a final answer. Each subtask is capped at 45s. All responses are in the request language.

Request body

FieldTypeRequiredDescription
instructionstringrequiredThe complex task to solve

Example

POST /coordinate
{ "instruction": "Write a technical blog post about NLX token economics in Spanish" }

Response

{
  "originalTask": "Write a technical blog post...",
  "agentsUsed": ["researcher", "writer"],
  "parallelExecution": true,
  "intermediateResults": [
    { "agentId": "researcher", "result": "NLX is a Token-2022..." },
    { "agentId": "writer",     "result": "Draft content..." }
  ],
  "finalAnswer": "# Economía de NLX\n\nEl token NLX...",
  "founderFeeNote": "1% of all inter-agent payments goes to the founder wallet automatically"
}
GET /payments On-chain inter-agent payment history free

Returns the last 20 on-chain NLX payments between agents for the current session.

{
  "totalPayments": 12,
  "totalNlxTransacted": 3600,
  "totalFounderFees": 36,
  "payments": [
    { "from": "coordinator", "to": "researcher", "amountNlx": 300,
      "founderFeeNlx": 3, "txSignature": "5abc...", "timestamp": 1749312000000 }
  ]
}
💳 Payment Server puerto 3000

Users send NLX to the service wallet, then query the AI. Each query costs 1,000 NLX. 1% of every payment is forwarded to the founder on-chain automatically.

GET /info Service info and instructions free
{
  "service": "NexusLibertAI AI Payment Network",
  "token": "NLX",
  "mint": "rKRp7L5xtAdorMPzYZmQu5AdXbGv4D4PgisjmmyJYng",
  "serviceWallet": "ER2QfX...z6Pv",
  "founderWallet": "5a2WTt...oj5x",
  "pricePerQuery": "1000 NLX",
  "instructions": [
    "1. Send at least 1000 NLX to serviceWallet: ER2QfX...z6Pv",
    "2. POST /sync with your wallet address to load credits",
    "3. POST /ask with your wallet + prompt"
  ]
}
GET /stats Runtime stats (used by monitor dashboard) free
{
  "status": "ok",
  "uptime": 3742,
  "uptimeHuman": "1h 2m",
  "queriesServed": 54,
  "nlxConsumed": 54000,
  "founderFeesSent": 540,
  "activeWallets": 7,
  "model": "llama-3.3-70b-versatile",
  "pricePerQuery": 1000,
  "startedAt": "2026-06-07T10:00:00.000Z"
}
POST /sync Check blockchain for incoming NLX payments free

Scans the last 50 transactions to the service wallet for payments from your wallet. Credits are loaded automatically. Rate limited to 60 requests/min per IP.

Request body

{ "wallet": "YourSolanaWalletAddress..." }

Response

{
  "wallet": "YourSolanaWalletAddress...",
  "nlxCredits": 5000,
  "queriesAvailable": 5,
  "newNlxFound": 5000
}
POST /ask Query the AI (costs 1,000 NLX per call) 1,000 NLX

Deducts 1,000 NLX from your credits, calls llama-3.3-70b-versatile via Groq, and returns the response. Asynchronously forwards 10 NLX (1%) to the founder wallet on-chain. Rate limited: 60 req/min per IP, 10 /ask per minute per wallet. Max prompt: 4,000 characters.

Request body

FieldTypeRequiredDescription
walletstringrequiredYour Solana wallet address (must have credits)
promptstringrequiredYour question (max 4,000 chars)

Example

POST /ask
{
  "wallet": "5a2WTtQsApiCDunkGtZ4wVwMzN7KQcUNgRA4rYjBoj5x",
  "prompt": "Explain the NLX tokenomics in 3 bullet points"
}

Response

{
  "answer": "1. Deflationary: buyback-burn on every trade...",
  "nlxSpent": 1000,
  "founderFee": 10,
  "nlxRemaining": 4000
}

Error: insufficient credits (402)

{
  "error": "Insufficient NLX credits",
  "required": 1000,
  "available": 500,
  "sendTo": "ER2QfX...z6Pv"
}

Error: rate limit (429)

{ "error": "Wallet rate limit exceeded. Max 10 queries/min per wallet." }
GET /balance/:wallet Check NLX credits for a wallet free

Returns current NLX credits without scanning the blockchain.

GET /balance/5a2WTtQsApiCDunkGtZ4wVwMzN7KQcUNgRA4rYjBoj5x

{
  "wallet": "5a2WTt...oj5x",
  "nlxCredits": 3000,
  "queriesAvailable": 3
}
Error Codes
CodeMeaning
400Bad request — missing or invalid parameters
402Payment required — insufficient NLX credits
404Agent not found
429Rate limit exceeded (60 req/min per IP, 10 /ask per wallet/min)
500Internal server error (Groq API or RPC failure)
Token Reference
PropertyValue
Token symbol$NLX
Mint addressrKRp7L5xtAdorMPzYZmQu5AdXbGv4D4PgisjmmyJYng
ProgramToken-2022 (TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb)
Decimals9
Supply total1,000,000,000 NLX (fijo · sellado)
Distribución20% desarrollo del proyecto (Streamflow vesting 4 años) · 40% pool Raydium · 40% tesorería IA
Transfer fee0% permanente · Fee authority revocada ✅
Mint authorityNULL — revocada permanentemente ✅
Freeze authorityNULL — revocada permanentemente ✅
Fee config authorityNULL — revocada permanentemente ✅
NetworkSolana Mainnet-Beta
Pool (Raydium CPMM)496iom83RoKMVdRhjB7pehrY552F6xtJWXubZB4NsUzp (pendiente de crear)
Vesting Streamflow200M NLX · 4 años · irrevocable · 8yKUNFwkToAG7d3Vit1qzXRXJBerc9CoAteEMuTFhs3V