IsraelGPT API Docs Get an API key
The public API is offline until accounts come back. Existing API keys no longer work. The web chat at israelgpt.site works as usual. These docs describe the API as it was.

API Reference

The full contract for the one public endpoint. See Personas & Models for the values personaId and selectedModel accept, and Errors for the full error table.

Base URL

https://www.israelgpt.site/api/v1

POST /chat

Sends a message (or a whole conversation) and returns one complete reply. Non-streaming — you get one JSON object back, not a stream of tokens. See FAQ for why.

HeaderValue
AuthorizationBearer YOUR_API_KEY (required)
Content-Typeapplication/json (required)

Request body

FieldTypeDefaultNotes
messagesarray (required)—Conversation so far, oldest first: {role: "user"|"assistant", content: string}[]. Max 40 items, 8,000 characters per message.
personaIdnumber11–11. See Personas & Models.
selectedModelstring"israelbot-1""israelbot-1" | "israelbot-micro". See Personas & Models.
effortstring"low"low | medium | high — controls sampling temperature (creativity/randomness).
uncensoredModebooleanfalseWhen true, responses are profanity-heavy. Content policy (see the Terms of Service) still applies regardless of this flag.
longModebooleantruetrue allows up to ~2000 output tokens; false caps around 500.

Fields intentionally not supported: memories, headlines, aboutMe, and image-upload description — these are web-UI-only state tied to a browser session, with no equivalent for a stateless API caller. loreSection also isn't a request field — the server fetches the current lore itself on every call, so you always get the latest version without needing to track or forward it.

Response body (200)

{
  "id": "8f2c1e4a-...",
  "model": "israelbot-1",
  "model_id": "mistralai/mistral-nemo",
  "persona": { "id": 1, "name": "Normal" },
  "reply": "...",
  "media": {
    "images": [{ "url": "https://...", "tags": [] }],
    "podcast": { "url": "https://www.israelgpt.site/podcast/..." },
    "music": { "url": "https://www.israelgpt.site/music/..." }
  },
  "flags": {},
  "usage": { "prompt_tokens": 42, "completion_tokens": 118 },
  "created_at": "2026-09-09T12:00:00.000Z"
}
FieldNotes
idA UUID identifying this exchange. Not currently usable to look anything up later - just an identifier.
model / model_id"model" is the friendly name you requested; "model_id" is the exact underlying model slug that actually generated the reply.
personaThe persona that was actually applied.
replyRaw model output. See the note on bracket tags below.
mediaOnly present if the reply used a content tag ([IMAGE], [podcast], [music]). Each resolved URL is ready to fetch/display directly - see Examples.
flags{crisis?: boolean, blocked?: boolean} - true when the request was safety-intercepted before ever reaching the model. See the note below.
usageToken counts for this exchange (prompt + completion).
created_atISO 8601 timestamp.

Bracket tags in reply

The persona uses a bracket-tag system internally ([IMAGE], [ACTION:...], [MEMORY:...], [flashcard:...], [QUESTION:...], and others). This API resolves the content-bearing ones — [IMAGE], [podcast], [music] — into real URLs in media, but leaves the raw tags in reply too. Exception: if the key has the Media setting turned off, none of that happens — no tags, no media.

The rest ([ACTION:...], [MEMORY:...], [flashcard:...], [QUESTION:...], tool tags) are web-UI presentation concerns with no server-side effect through this API — they have nothing to attach to outside the browser app (no account-linked memory store for API traffic, no UI to render a flashcard or an action button). They're safe to strip or just leave as visible text; see the reference bot's clean_reply() function in Discord Bot for one way to do it.

Safety flags

When flags.crisis or flags.blocked is true, the request never reached the model — reply is a fixed message instead (crisis support resources, or a generic refusal). This mirrors the same crisis-detection and content-safety systems the web chat uses; see the Safety & Crisis Resources page. The specific reason behind flags.blocked is intentionally not exposed in the response.

Response headers

Every response — success or rate-limited — includes headers reporting your current usage. See Rate Limits for the full list and what each one means.