The Lyceum Cloud API enables you to programmatically execute code, manage files, monitor usage, and integrate our cloud compute platform into your applications.
Base URL
All API requests use this base URL:Authentication
JWT Tokens
Best for: Web applications, user sessions
- 24-hour expiration
- Automatic refresh support
- Obtained via login endpoint
API Keys
Best for: CI/CD, automation, services
- No expiration (configurable)
- Revocable anytime
- Created in dashboard
Quick Start Authentication
- Get JWT Token
- Use Token
- API Keys
API Endpoints
🚀 Code Execution
Execute Python code or Docker containers on cloud infrastructure.Python Execution
Python Execution
POST Response:
/execution/streaming/startDocker Containers
Docker Containers
POST
/execution/image/startExecution Management
Execution Management
- GET
/execution/streaming/{id}/status- Check status - POST
/execution/streaming/abort/{id}- Stop execution - POST
/execution/streaming/complete/{id}- Mark complete
📁 File Storage
Manage files in cloud storage with S3-compatible API.Upload Files
Upload Files
POST
/storage/uploadList & Download
List & Download
- GET
/storage/list-files?prefix=datasets/- List files - GET
/storage/download/{file_key}- Download file - DELETE
/storage/delete/{file_key}- Delete file
S3 Credentials
S3 Credentials
POST
/storage/credentialsGet temporary S3 credentials for direct access:💳 Billing & Credits
Monitor usage and manage billing.Credit Balance
Credit Balance
GET
/billing/creditsUsage History
Usage History
GET
/billing/history?limit=50&offset=0Returns execution history with costs.Purchase Credits
Purchase Credits
POST
/billing/checkout🔐 Authentication & Users
Manage authentication and API keys.Authentication
Authentication
- POST
/auth/login- Login with email/password - POST
/auth/refresh- Refresh access token
API Key Management
API Key Management
- GET
/auth/api-keys/- List API keys - POST
/auth/api-keys/- Create new key - DELETE
/auth/api-keys/{id}- Delete key - PATCH
/auth/api-keys/{id}/toggle- Enable/disable
User Management
User Management
- DELETE
/user/delete- Delete account
🏥 System Health
Monitor API status and version.- GET
/health/ping- Health check - GET
/health/version- API version info
Quick Start Examples
- Python
- JavaScript
- cURL
Response Format
Success Response
Error Response
Rate Limits
Rate limits help ensure fair usage and platform stability. Headers indicate your current usage.
| Endpoint Category | Limit | Window |
|---|---|---|
| Authentication | 10 requests | per minute |
| Code Execution | 100 requests | per hour |
| File Storage | 1000 requests | per hour |
| Billing | 100 requests | per hour |
X-RateLimit-Limit: Maximum requests allowedX-RateLimit-Remaining: Requests remainingX-RateLimit-Reset: Unix timestamp when limit resets
HTTP Status Codes
| Code | Status | Description |
|---|---|---|
| 200 | OK | Request successful |
| 201 | Created | Resource created successfully |
| 400 | Bad Request | Invalid request parameters |
| 401 | Unauthorized | Authentication required or invalid |
| 403 | Forbidden | Access denied to resource |
| 404 | Not Found | Resource doesn’t exist |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Error | Server error occurred |
| 503 | Service Unavailable | Service temporarily down |
Error Handling
Best Practices
1
Use Environment Variables
Store API credentials securely:
2
Implement Retry Logic
Handle transient failures gracefully with exponential backoff.
3
Monitor Rate Limits
Check rate limit headers and implement appropriate throttling.
4
Clean Up Resources
Stop unnecessary executions and delete temporary files.
5
Validate Inputs
Check parameters before making API calls to avoid errors.
6
Use Appropriate Timeouts
Set reasonable timeouts for long-running operations.
SDK & Tools
Python SDK
Official Python client library
CLI Tool
Command-line interface
VS Code Extension
Execute code directly from VS Code
Postman Collection
Interactive API testing

