IsraelGPT API Docs Get an API key

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–10. See Personas & Models.
selectedModelstring"israelbot-2""israelbot-1" | "israelbot-1.5" | "israelbot-2". See Personas & Models.
effortstring"medium"low | medium | high | xhigh — 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-2",
  "model_id": "sao10k/l3-lunaris-8b",
  "persona": { "id": 1, "name": "Normal" },
  "reply": "...",
  "media": {
    "images": [{ "url": "https://...", "tags": [] }],
    "cars": [{ "url": "https://..." }],
    "podcast": { "url": "https://www.israelgpt.site/api/random-podcast" },
    "music": { "url": "https://www.israelgpt.site/api/serve-music?i=3" }
  },
  "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 (may differ from what you asked for if a fallback model kicked in after a primary-model failure).
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], [car], [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], [car], [podcast], [music] — into real URLs in media, but leaves the raw tags in reply too.

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.