Complete reference for the Lilith API endpoints.
Base URL#
text
Production: https://api.lilith.app
Staging: https://staging-api.lilith.app
Mock: https://mock-api.lilith.app
Authentication#
All API requests require authentication via JWT tokens:
http
Authorization: Bearer YOUR_JWT_TOKEN
Endpoints#
Authentication#
POST /v1/auth/login#
javascript
const response = await fetch('https://api.lilith.app/v1/auth/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
email: 'user@example.com',
password: 'secure-password'
})
});
POST /v1/auth/refresh#
javascript
const response = await fetch('https://api.lilith.app/v1/auth/refresh', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
refresh_token: 'your-refresh-token'
})
});
Chat#
POST /v1/chat#
javascript
const response = await fetch('https://api.lilith.app/v1/chat', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
message: 'Your message here',
persona: 'zen_master',
options: {
stream: false,
cite: true
}
})
});
This reference was automatically generated from the OpenAPI specification.