API for interacting with LEIA instances.
- Node.js 16+
- PNPM
- Redis
npm startnpm devThe API provides the following endpoints:
POST /api/v1/leias
Headers:
Authorization: Bearer YOUR_RUNNER_KEY
Body:
{
"sessionId": "unique-session-id",
"leia": {
"spec": {
"persona": { ... },
"behaviour": { ... },
"problem": { ... }
}
},
"runnerConfiguration": {
"provider": "openai"
}
}Responses:
201 Created: LEIA created successfully400 Bad Request: Required parameters missing401 Unauthorized: Invalid authentication token409 Conflict: Session with the same ID already exists500 Internal Server Error: Internal server error
POST /api/v1/leias/:sessionId/messages
Headers:
Authorization: Bearer YOUR_RUNNER_KEY
Body:
{
"message": "Your message for LEIA"
}Responses:
200 OK: Message processed successfully400 Bad Request: Required parameters missing401 Unauthorized: Invalid authentication token404 Not Found: Session with the provided ID not found500 Internal Server Error: Internal server error
GET /api/v1/models
Headers:
Authorization: Bearer YOUR_RUNNER_KEY
Response:
{
"models": ["openai", "openai-responses", "openai-advanced"],
"default": "openai-advanced"
}Responses:
200 OK: List of models retrieved successfully401 Unauthorized: Invalid authentication token500 Internal Server Error: Internal server error
API documentation is available at:
http://localhost:5000/docs