API Reference
Complete REST API reference for the Lelantos sandbox platform.
Overview
The Lelantos REST API gives you programmatic control over sandboxes, templates, and account management. All endpoints follow standard REST conventions and return JSON responses.
For most use cases, we recommend using the TypeScript SDK (@lelantos-ai/sdk) which wraps the API with a convenient client interface. The REST API is available for direct integration, automation scripts, or languages without an SDK.
Base URL
https://api.lelantos.aiAll API endpoints are relative to this base URL.
Authentication
Every request must include an API key in the X-API-Key header. API keys use the lel_ prefix.
curl https://api.lelantos.ai/sandboxes \
-H "X-API-Key: lel_your_key_here"Create and manage API keys in the Lelantos Dashboard under API Keys.
For detailed authentication options (API key, bearer token, admin token), see the Authentication page.
Endpoint Groups
Sandboxes
Manage sandbox lifecycle -- create, list, get details, pause, resume, kill, set timeout, and retrieve logs and metrics.
| Method | Endpoint | Description |
|---|---|---|
POST | /sandboxes | Create a new sandbox. |
GET | /sandboxes | List all sandboxes. |
GET | /sandboxes/{id} | Get sandbox details. |
DELETE | /sandboxes/{id} | Kill a sandbox. |
POST | /sandboxes/{id}/pause | Pause a sandbox. |
POST | /sandboxes/{id}/resume | Resume a paused sandbox. |
POST | /sandboxes/{id}/timeout | Set sandbox timeout. |
POST | /sandboxes/{id}/refresh | Extend sandbox lifetime. |
GET | /sandboxes/{id}/logs | Get lifecycle events. |
GET | /sandboxes/{id}/metrics | Get resource metrics. |
Templates
Build and manage sandbox templates.
| Method | Endpoint | Description |
|---|---|---|
POST | /templates | Create a new template. |
GET | /templates | List all templates. |
GET | /templates/{id} | Get template details. |
DELETE | /templates/{id} | Delete a template. |
GET | /templates/{id}/builds/{buildId} | Get build status. |
Snapshots
Capture and restore sandbox state.
| Method | Endpoint | Description |
|---|---|---|
POST | /sandboxes/{id}/snapshot | Capture a snapshot. |
POST | /sandboxes/{id}/restore | Restore from a snapshot. |
API Keys
Manage API keys for your team.
| Method | Endpoint | Description |
|---|---|---|
POST | /api-keys | Create a new API key. |
GET | /api-keys | List all API keys. |
DELETE | /api-keys/{id} | Revoke an API key. |
Teams
Manage team settings and members.
| Method | Endpoint | Description |
|---|---|---|
GET | /teams | Get current team. |
POST | /teams/members | Invite a team member. |
GET | /teams/members | List team members. |
DELETE | /teams/members/{id} | Remove a team member. |
Response Format
All endpoints return JSON. Successful responses use HTTP 200 or 201. Error responses include a message:
{
"error": "sandbox not found"
}Rate Limits
| Endpoint Type | Limit |
|---|---|
| General API | 200 requests/second |
| Authentication endpoints | 3 requests/second |
Interactive API Docs Coming Soon
Full interactive API documentation with request/response examples is planned. It will be auto-generated from the OpenAPI specification. In the meantime, use this reference and the SDK documentation for integration.