Lazarus AI — Developer Documentation

Welcome. This is the reference for the Lazarus REST API. Every endpoint returns the same JSON envelope, authenticates the same way, and is generated from a single OpenAPI 3.1 spec so this page can never drift from the implementation.

Base URL

/

Auth

Authorization: Bearer lz_live_…

Version

v1.0.0

Introduction

The API exposes the same shared AI engine that powers the Telegram bot. You can list characters, start a conversation, send a message, and read the reply — all via JSON over HTTPS.

Authentication

Every request must include an Authorization: Bearer <api-key> header. Contact the Lazarus operator to obtain an API key. Keys use the format LZ-RAGE-XXXXXXXXXX-XXXXXXXXXX (two 10-character blocks of uppercase alphanumeric characters) and are shown only once at creation; only a preview (LZ-RAGE-AB…WX) is stored afterwards.

Quick Start

curl -X POST "$BASE/api/v1/chat" \
  -H "Authorization: Bearer $LAZARUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "character_id": "b7c9e21e-7f19-4a41-8b4c-4b8c8c2d3e00",
    "message": "Hello!"
  }'
const res = await fetch(`${BASE}/api/v1/chat`, {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.LAZARUS_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    character_id: "b7c9e21e-7f19-4a41-8b4c-4b8c8c2d3e00",
    message: "Hello!",
  }),
});
const { success, data, error } = await res.json();
if (!success) throw new Error(error.message);
console.log(data.reply);
import os, requests

r = requests.post(
    f"{BASE}/api/v1/chat",
    headers={"Authorization": f"Bearer {os.environ['LAZARUS_API_KEY']}"},
    json={
        "character_id": "b7c9e21e-7f19-4a41-8b4c-4b8c8c2d3e00",
        "message": "Hello!",
    },
)
body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["message"])
print(body["data"]["reply"])
<?php
$ch = curl_init("$BASE/api/v1/chat");
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_POST => true,
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer " . getenv("LAZARUS_API_KEY"),
    "Content-Type: application/json",
  ],
  CURLOPT_POSTFIELDS => json_encode([
    "character_id" => "b7c9e21e-7f19-4a41-8b4c-4b8c8c2d3e00",
    "message" => "Hello!",
  ]),
]);
$body = json_decode(curl_exec($ch), true);
if (!$body["success"]) { throw new Exception($body["error"]["message"]); }
echo $body["data"]["reply"];

Response Envelope

Every response follows one of two shapes.

// Success
{
  "success": true,
  "data": { /* endpoint-specific payload */ }
}

// Error
{
  "success": false,
  "error": {
    "code": "validation_error",
    "message": "Request validation failed",
    "status": 422,
    "details": { "fields": [{ "field": "message", "message": "Required non-empty string" }] }
  }
}

Error Codes

CodeHTTPMeaning
unauthorized401Missing or invalid API key
forbidden403Key disabled, revoked, or expired
not_found404Resource not found
method_not_allowed405Wrong HTTP method for the endpoint
invalid_json400 / 415Body was not valid JSON, or wrong Content-Type
validation_error422One or more fields failed validation
upstream_error502AI provider unavailable
internal_error500Unexpected server error

Rate Limits

Rate limiting is not currently enforced at the API layer. Provider-side quotas still apply. Please contact the operator for high-volume usage.

Changelog

v1.0.0 — Initial public release

API Reference

The interactive reference below is generated from the OpenAPI spec. Every endpoint, request body, response, and status code is documented there.