API
Technical Integration
Purpose of the API
The API allows external systems, tools and agents to access the LogicBasis core directly. Every request requires a valid API key.
Bearer Key
API keys are sent as Bearer tokens and stored internally as SHA‑256 hashes. No plaintext, no uploads, no GitHub.
Authorization: Bearer lb_XXXXXXXXXXXXXXXX
Content-Type: application/json
German & English
POST https://app.logicbasis.ch/api/chat
POST https://app.logicbasis.ch/api/chat-en
{
  "message": "Your input",
  "sessionId": "optional"
}
message & sessionId
  • message – string, required
  • sessionId – string, optional (enables memory)
JSON Structure
{
  "reply": "Response from LogicBasis"
}
Deterministic
  • 200 – Soft error (missing message, inactive plan)
  • 401 – Invalid API key
  • 429 – Monthly limit reached
  • 500 – Technical error
Standard & Plus
  • Standard: 1000 requests / month
  • Plus: 5000 requests / month
  • Reset: 1st day of each month
JS / Python / cURL
await fetch("https://app.logicbasis.ch/api/chat", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({ message: "Hello LogicBasis" })
});
API Key Protection
  • Never use API keys in client‑side code
  • Never upload API keys to GitHub
  • Treat API keys like passwords
  • Regenerate immediately if compromised