API Overview
Overview of the Amento Labs backend API.
The Amento Labs backend exposes a REST API for wallet management and card operations.
Base URL
https://api.amentolabs.com/apiEndpoints
Wallets
| Method | Endpoint | Description |
|---|---|---|
POST | /wallets/ensure | Create or retrieve a deposit wallet |
GET | /wallets/balance | Get wallet SOL balance |
GET | /wallets/transactions | List wallet transactions |
POST | /wallets/withdraw | Withdraw SOL to an external address |
Cards
| Method | Endpoint | Description |
|---|---|---|
POST | /cards/orders/from-wallet | Create a new card order (pays from wallet) |
GET | /cards/orders/:id | Get order status and card details |
GET | /cards/orders | List all card orders for a client |
Authentication
All requests require a clientId parameter (sent in the request body or as a query parameter). This is the anonymous identifier generated in the browser.
{
"clientId": "your-anonymous-client-id"
}Example: Create a Deposit Wallet
curl -X POST https://api.amentolabs.com/api/wallets/ensure \
-H "Content-Type: application/json" \
-d '{"clientId": "your-client-id"}'Response:
{
"success": true,
"data": {
"publicKey": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"
}
}WebSocket
Real-time SOL/USD price updates are delivered via Socket.IO:
import { io } from 'socket.io-client';
const socket = io('https://api.amentolabs.com');
socket.on('sol-usd', (data) => {
console.log('SOL price:', data.price);
console.log('Updated at:', data.updatedAt);
});The API is in beta. Endpoints, authentication, and rate limits are subject to change.