Skip to main content

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 readwrite API key
  • Portfolio, Market, NFTs, Predictions, Bridge — require a readonly API key
  • Admin — require an admin API key
All API key-protected routes also enforce rate limiting.

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.
Returns server health status.Authentication: NoneResponse:
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.
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:
Response (202 Accepted):
If no threadId is provided, a new thread is created automatically.
Poll for the status and result of an agent job.Authentication: x402 paymentResponse (running):
Response (complete):
Status values: pending, running, complete, failed, cancelled
Cancel a running agent job. Only jobs in pending or running state can be cancelled.Authentication: x402 paymentResponse:
Retrieve the full conversation history for a thread.Authentication: x402 paymentResponse:
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 a swap quote from Uniswap V3 or Camelot.Authentication: readwrite API keyQuery parameters:Response:
Execute a token swap on Arbitrum.Authentication: readwrite API keyRequest body:
Response:

Portfolio routes

Read-only access to job history and aggregated DeFi positions.
List recent agent jobs. Results are scoped to the caller’s API key.Authentication: readonly API keyQuery parameters:Response:
Aggregated DeFi positions from Aave V3 and GMX V2.Authentication: readonly API keyResponse:

Market routes

Real-time market data from external price feeds.
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:

Automations routes

Create and manage automated DeFi strategies.
List automations for a wallet.Authentication: readwrite API keyQuery parameters:Response:
Create a new automation.Authentication: readwrite API keyRequest body:
Response (201 Created):
Update an automation’s status (pause, resume, etc.).Authentication: readwrite API keyRequest body:
Valid status values: active, paused, completed, failed
Delete an automation.Authentication: readwrite API keyResponse:

Admin routes

Operational endpoints for server administrators.
Revenue summary across all x402 payments.Authentication: admin API keyResponse:
Daily revenue breakdown.Authentication: admin API keyQuery parameters:Response:

Error responses

All endpoints return errors in a consistent format:
Common HTTP status codes: