Overview
The ouroborai API is a Hono-based REST server running on Arbitrum One. Routes are organized into groups with different authentication requirements:- Root — public, no authentication
- Agent — protected by x402 micropayments
- Swap, Automations, Launchpad, v1 Chat — require a
readwriteAPI key - Portfolio, Market, NFTs, Predictions, Bridge — require a
readonlyAPI key - Admin — require an
adminAPI key
Authentication
x402 Payment
Agent routes use the
X-PAYMENT header with a signed USDC micropayment. See the x402 payments guide for details.API Key
Other routes use the
Authorization: Bearer <api-key> header. Keys are tiered: readonly, readwrite, and admin. Higher tiers can access lower-tier routes.Root
Public endpoints for health checks and server metadata.GET /health
GET /health
Returns server health status.Authentication: NoneResponse:
GET /
GET /
Returns server metadata and version information.Authentication: NoneResponse:
Agent routes
All agent routes are protected by x402 micropayments ($0.01 USDC per request). The payer address is used as the owner ID for job and thread isolation.POST /agent/prompt
POST /agent/prompt
Submit a natural-language prompt to the AI agent. Returns a job ID for async polling and a thread ID for conversation continuity.Authentication: x402 paymentRequest body:If no
Response (202 Accepted):
threadId is provided, a new thread is created automatically.GET /agent/job/:id
GET /agent/job/:id
Poll for the status and result of an agent job.Authentication: x402 paymentResponse (running):Response (complete):Status values:
pending, running, complete, failed, cancelledDELETE /agent/job/:id
DELETE /agent/job/:id
Cancel a running agent job. Only jobs in
pending or running state can be cancelled.Authentication: x402 paymentResponse:GET /agent/thread/:id
GET /agent/thread/:id
Retrieve the full conversation history for a thread.Authentication: x402 paymentResponse:
GET /agent/skills
GET /agent/skills
List all available skills the agent can use.Authentication: x402 paymentResponse:
Swap routes
Swap routes provide direct access to DEX operations without going through the AI agent.GET /swap/quote
GET /swap/quote
Get a swap quote from Uniswap V3 or Camelot.Authentication:
readwrite API keyQuery parameters:Response:
POST /swap/execute
POST /swap/execute
Execute a token swap on Arbitrum.Authentication:
readwrite API keyRequest body:Response:
Portfolio routes
Read-only access to job history and aggregated DeFi positions.GET /portfolio/jobs
GET /portfolio/jobs
List recent agent jobs. Results are scoped to the caller’s API key.Authentication:
readonly API keyQuery parameters:Response:
GET /portfolio/positions
GET /portfolio/positions
Aggregated DeFi positions from Aave V3 and GMX V2.Authentication:
readonly API keyResponse:Market routes
Real-time market data from external price feeds.GET /market/prices
GET /market/prices
Token prices from CoinGecko for core Arbitrum assets (ETH, USDC, ARB, WBTC, PENDLE, GRAIL, LINK). Results are cached for 30 seconds.Authentication:
readonly API keyResponse:GET /market/trending
GET /market/trending
Trending pools on Arbitrum from GeckoTerminal. Returns the top 10 pools by activity. Results are cached for 30 seconds.Authentication:
readonly API keyResponse:Automations routes
Create and manage automated DeFi strategies.GET /automations
GET /automations
List automations for a wallet.Authentication:
readwrite API keyQuery parameters:Response:
POST /automations
POST /automations
Create a new automation.Authentication: Response (201 Created):
readwrite API keyRequest body:PATCH /automations/:id
PATCH /automations/:id
Update an automation’s status (pause, resume, etc.).Authentication: Valid status values:
readwrite API keyRequest body:active, paused, completed, failedDELETE /automations/:id
DELETE /automations/:id
Delete an automation.Authentication:
readwrite API keyResponse:Admin routes
Operational endpoints for server administrators.GET /admin/revenue
GET /admin/revenue
Revenue summary across all x402 payments.Authentication:
admin API keyResponse:GET /admin/revenue/history
GET /admin/revenue/history
Daily revenue breakdown.Authentication:
admin API keyQuery parameters:Response: