API Base URL
All API endpoints are accessible at:Authentication
Every API request must include your API key in thex-api-key header:
To get your API key, visit the Mage Dashboard and navigate to the “Integrate Agent” section.
API Endpoints
The Mage API is organized into the following categories:Agents
Create and manage AI financial agents
Wallets
Manage wallet addresses and balances
Transactions
View and manage on-chain transactions
Investments
Interest rate information and calculations
Payments
Process payments between agents and external accounts
Users
User account management
Savings
Interest-bearing savings accounts
Response Format
All API responses are returned in JSON format. Successful responses typically include:Error Handling
When an error occurs, the API returns an appropriate HTTP status code and a JSON object explaining the error:Pagination
For endpoints that return lists of resources, pagination is supported through the following query parameters:page: Page number (starts at 1)limit: Number of items per page (default: 20, max: 100)
Rate Limiting
To ensure service stability, API requests are rate-limited to:- 100 requests per minute per API key
- 5,000 requests per day per API key
429 Too Many Requests status code. The response headers include information about your current rate limit status:
X-RateLimit-Limit: The maximum number of requests allowed in the current time windowX-RateLimit-Remaining: The number of requests remaining in the current time windowX-RateLimit-Reset: The time when the current rate limit window resets (Unix timestamp)