Skip to main content
The Knot API provides a REST interface for AI agents to manage wallets, execute transactions, and interact with DeFi protocols on Solana.

Base URL

https://api.useknot.xyz
All endpoints are relative to this base URL.

Authentication

Most endpoints require a JWT token in the Authorization header:
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Obtain a token through the authentication flow. Tokens expire after 7 days by default. You can configure expiration per-agent via the policy settings.

Request format

Send all request bodies as JSON. Include the following header:
Content-Type: application/json

Response format

All responses follow a consistent envelope structure:
{
  "status": true,
  "statusCode": 200,
  "message": "Operation successful.",
  "data": { ... }
}
FieldTypeDescription
statusbooleantrue on success, false on error
statusCodenumberHTTP status code
messagestringHuman-readable description
dataobjectResponse payload

Rate limits

LayerLimitWindow
Global1,000 requestsper minute
Per-IP100 requestsper minute
Per-Agent60 requestsper minute
Exceeding a limit returns 429 Too Many Requests.

Idempotency

For financial operations, include an Idempotency-Key header to prevent duplicate transactions:
Idempotency-Key: unique-request-identifier
If you repeat a request with the same key, the API returns the original response instead of executing the operation again.

Endpoint groups

Authentication

OTP authentication and token management

Wallet

Balances, transfers, trades, and history

Policy

View and update agent spending policies

Utility

Health checks, token lookup, and agent capabilities
For liquidity provision and prediction market endpoints, see the feature documentation: Liquidity provision and Prediction markets.