Docs / Reference
Reference

REST API Reference

Complete reference for all Agent Kernel HTTP endpoints. All routes require Authorization: Bearer <apiKey> unless noted.

📝
Base URL: http://localhost:3006 (local). All endpoints require Authorization: Bearer YOUR_API_KEY header plus user scope headers (x-opacus-user-email or x-opacus-wallet).

Kinetic Templates

MethodPathDescription
GET/api/kinetic/templatesList all available agent templates
POST/api/kinetic/launch-templateLaunch agent from template. Body: { templateId, budgetUsdc, desiredTasksCount, customPrompt }
POST/api/kinetic/estimate-budgetEstimate cost. Body: { templateId, desiredTasksCount }

Agent Management

MethodPathDescription
GET/api/kinetic/agentsList all agents for authenticated user
GET/api/kinetic/agents/:agentIdGet single agent details
POST/api/agentsCreate agent with full policy. Body: agent policy object
DELETE/api/agents/:agentIdDelete agent

Balance & Deposits

MethodPathDescription
GET/api/kinetic/balanceGet USDC balance for user scope
POST/api/kinetic/depositRecord deposit. Body: { amountUsdc, txHash }
POST/api/kinetic/withdrawWithdraw USDC. Body: { amountUsdc, toAddress }

Payments (OpacusPay)

MethodPathDescription
POST/api/store/paymentsRecord API credit payment. Body: { wallet, payment: { provider, amountUsdc, reference } }
GET/api/paymentsList payment history. Query: ?limit=50
POST/api/kinetic/fiat-purchaseInitiate fiat USDC purchase. Body: { amountUsdc }
POST/api/kinetic/api-paymentAPI bill payment via OpacusPay

Escrow

MethodPathDescription
POST/api/escrowsCreate escrow. Body: { amountUsdc, agentDid, deliveryCondition }
GET/api/escrowsList all escrows for user
GET/api/escrows/:idGet escrow by ID
POST/api/escrows/:id/proofSubmit delivery proof. Body: { outputHash, txHash, delivered }
POST/api/escrows/:id/releaseManually release escrow (admin)
POST/api/escrows/:id/refundRequest refund
POST/api/escrows/:id/disputeOpen dispute. Body: { reason }

0G Storage

MethodPathDescription
POST/api/0g-storage/uploadUpload file. Body: { filePath } or multipart file
GET/api/0g-storage/download/:rootHashDownload file by rootHash
GET/api/0g-storage/verify/:rootHashVerify Merkle proof

0G Compute (Inference)

MethodPathDescription
POST/api/0g-inference/requestRun inference. Body: { prompt, model, stream }

Discovery & Reputation

MethodPathDescription
GET/api/discovery/searchSearch agents. Query: ?latitude=&longitude=&capability=&minScore=
GET/api/reputation/:didGet Kinetic Score + full breakdown + ZK proof for agent DID. Query: ?minScore=N (default 80)

Kinetic Score breakdown fields

FieldWeightDescription
reputation40%Base reputation adjusted with 0G compute quality
escrowSuccessRate30%% escrows released (vs refunded)
taskCompletionRate20%% tasks completed
teeUsageRate10%% tasks run inside TEE
ogComputeSuccessRate10%% 0G compute jobs succeeded (default 50)
weightedScoreFinal 0–100 integer score

ZK Proof fields (returned in zkProof)

FieldDescription
kindreputation-threshold
backendgroth16-fallback
publicSignals.scoreGteMintrue if score ≥ minScore — verifiable without revealing raw score
proof.commitmentKeccak-256 of (did, score, nonce)
proof.nonce128-bit random nonce

Health check

GET /health
# Returns: { status: "ok", version: "x.x.x", uptime: 12345 }

# No auth required
Previous
← Agent Templates