Create chat completion
Runs one RavChat agent turn. OpenAI-compatible request and response, plus the x_ravchat extension and usage.cost in RavChat credits.
Stateless by default — each call starts a fresh conversation in your key’s project and auto-creates any missing project/session (ids returned in x_ravchat). Pass metadata.ravchat.session_id to continue a live session.
Requires the chat:write scope.
Authorizations
A RavChat API key: Authorization: Bearer sk-rav-...
Body
A RavChat model id. See the Models catalog.
"ravchat"
The conversation. system/developer become agent context; the final user message is the query.
Stream chat.completion.chunk SSE. Strongly recommended — turns can take minutes.
text, json_object, or a strict json_schema. Schema is enforced natively; non-conforming output is charged, not retried.
- Text
- JSON object
- JSON schema
metadata.ravchat.mode = "fast" selects fast mode (equivalent to the top-level mode field).
Output budget hint where the runtime can honor it.
Must be 1.
Accepted.
Accepted and ignored — the agent controls generation.
Accepted, logged for abuse attribution only.
Answering mode. fast runs the quick-answer lane: the agent performs one bounded source search (the local Chabad corpus index, or a direct reference lookup) and returns a concise, sourced answer in your language — same guardrails (verified citations, hashkafa frame, never a halachic ruling), a fraction of the latency. standard (default) runs the full study agent. Also selectable via fast: true or metadata.ravchat.mode = "fast" (the metadata form passes through every OpenAI SDK without extra_body).
standard, fast Alias for mode: "fast". If both are present, mode wins.
Response
A chat completion. When stream:true, a text/event-stream of chat.completion.chunk objects terminated by data: [DONE].