IsraelGPT API Docs Get an API key

Sizes, safety and errors

The rest of the OpenAI-compatible API: how big a request may be, what is checked before the model sees it, the errors, and what isn't offered.

Prompt size and reply size

Nothing is ever trimmed for you. A request whose messages and tool definitions come to more than your plan’s prompt limit is refused, with OpenAI’s wording so tools that shorten their own history when they see it (Cline, Roo Code) do:

HTTP 400
{ "error": {
  "message": "This API's maximum context length for your plan is 12,000 tokens. However, your messages resulted in about 13,750 tokens. Please reduce the length of the messages.",
  "type": "invalid_request_error",
  "code": "context_length_exceeded",
  "param": null
} }
PlanLargest promptLongest replyLargest request body
Free12,000 tokens2,000 tokensabout 200 KB
Pro, Standard64,000 tokens8,000 tokensabout 500 KB
Pro, otherWhatever your plan grants: GET /models and the dashboard show it

For this check a token is estimated as 4 characters, so it can be a little off either way. The real counts are in usage. max_tokens can only lower your reply limit. A coding agent’s system prompt alone is often 10,000 tokens or more, so the free plan is for chat tools; agents need a Pro API plan.

Safety

Requests are checked on the server before the model sees them, with the same detectors as the web chat. A refusal is a normal 200 whose only choice has finish_reason: "content_filter", a fixed message, and zero usage; it is not an error.

  • yahoobot-1: only the most serious class of the child-safety check is applied, the wording that asks for the material and has no innocent reading. Code and shell commands are full of words the broader rules misread, so those are not applied here. A match is refused and the account is suspended for review, as everywhere else on the site.
  • israelbot-1: the full check, as on the web chat. A broader match gets a polite refusal and a flag for review.
  • A message that reads as someone in crisis, when it is the newest message and comes from the user, is answered with support resources instead of the model: finish_reason: "stop" and the resources as the content. Tool results aren’t treated as a person speaking.
  • A very long request is checked newest text first, up to 48,000 characters, with your system message last. Older text was checked when it was new; an agent resends its history every turn.
  • The model’s replies aren’t checked, only what is sent.

See the native API for the personas’ own endpoint, and Safety & Crisis Resources.

Errors

Errors are OpenAI’s shape plus our code: {"error":{"message","type","code","param":null}}, with retry_after_seconds on rate limits.

StatuscodetypeMeaning
400invalid_requestinvalid_request_errorThe body or a field is malformed. `message` says which.
400invalid_jsoninvalid_request_errorThe body is not valid JSON.
400context_length_exceededinvalid_request_errorThe messages (and tools) are longer than the plan's context limit. Shorten them; nothing is ever trimmed for you.
400unsupported_parameterinvalid_request_errorA field with a value this API refuses (n above 1, functions, function_call).
400unsupported_contentinvalid_request_errorA message has image or audio content. Text only.
400tools_not_supportedinvalid_request_errortools, tool_choice or tool messages sent to israelbot-1.
400invalid_toolsinvalid_request_errorA tool definition or tool-call message is malformed or over a limit.
401missing_api_keyauthentication_errorNo "Authorization: Bearer igpt_..." header.
401invalid_api_keyauthentication_errorNot a key, revoked, or from before the rebuild.
403suspendedauthentication_errorThe account is suspended; the message says how to appeal.
404model_not_foundinvalid_request_errorThe model is not "yahoobot-1" or "israelbot-1".
413payload_too_largeinvalid_request_errorThe body is over the plan's size limit.
415unsupported_media_typeinvalid_request_errorSend Content-Type: application/json.
429rate_limitedrate_limit_errorOver the requests-per-minute or per-day allowance. Retry-After says when.
429token_limitrate_limit_errorThe account used its tokens for today (UTC). They return at 00:00 UTC.
502upstream_unavailableserver_errorThe model did not answer. Try again.
503capacity_exceededrate_limit_errorEveryone's shared capacity is used up right now.
503maintenanceserver_errorThe API is switched off.

See Errors for the rest, Rate limits for the headers, and honour Retry-After.

What isn't here, and what is kept

  • Only /chat/completions and /models: no /completions, /embeddings, /images, /audio, /responses, assistants, files, fine-tuning or /models/{id}.
  • No image or audio input, no n above 1, no log probabilities, no structured-output mode.
  • Nothing is stored for you to fetch later, and there are no memories or About Me.
  • Model names are ours: the OpenAI names (gpt-4o...) get 404 model_not_found.

Each request leaves a row in the key’s log on the dashboard: when, the result, the model, token counts, how long it took, and what the caller said it is (never the text, never the address). The newest user message and the reply, clipped to 2,000 and 4,000 characters, are kept in the chat log, encrypted, and read only if something needs looking into. See the Privacy Policy.