All APIs

v1 · deterministic · rate-limited

ELIZA API

ELIZA is the very first chatbot, written by Joseph Weizenbaum at MIT in 1966 — and this API serves a modern, layered re-implementation of it. It is not a large language model. Every reply is produced by deterministic symbolic rules: intent classification, keyword decomposition, persona templates, memory with salience decay, and a humanization pass. Read about ELIZA on Wikipedia.

Try it

A minimal demo wired to /api/publicapi/eliza/v1.

  • Say hi — the demo posts to /api/apis/eliza/v1.

Request

POST a JSON body containing the last few user turns and the persona you want. The endpoint runs the same engine as the in-OS ELIZA app.

curl -X POST https://yasirarfat.com/api/publicapi/eliza/v1 \
  -H 'Content-Type: application/json' \
  -d '{
    "persona": "therapist",
    "history": [
      { "role": "user", "text": "I have been feeling tired lately." }
    ]
  }'

Fields

persona
One of therapist, friendly, philosopher, mentor, analyst, skeptic, romantic, mystic, minimalist. Default therapist.
history
Array of { role, text } turns. Roles: user | eliza. Most recent last. Max 24 entries, 1500 chars each.
seed
Optional string. Same seed + history = same reply. Defaults to a hash of the history.

Response

{
  "ok": true,
  "reply": "It sounds like \"i have been feeling tired lately\" is weighing on you.",
  "persona": "therapist",
  "debug": {
    "intent": { "kind": "self-disclosure", "confidence": 0.75 },
    "mood": "negative",
    "strategy": "reflect-disclosure"
  }
}

On rate-limit, returns 429 with { ok: false, error, retryAfterMs }.

Be kind. This is a free hobby endpoint. Rough limits: 20 requests/min/IP, ~50/hour. If you need more, write to hi@yasirarfat.com.