- Base URL —
https://<platform>/v1/openai - API key — your ZWRM API key
- Model — the agent’s name
Endpoints
Streaming works the usual way (
stream: true) — text arrives as chat.completion.chunk frames, and token usage is reported from the underlying session.
Conversation continuity
The conversation is server-side state — the workspace transcript. The caller never manages history:- Continuity is keyed by the
X-Session-Keyheader, or the request’suserfield if no header is set. - No key means the agent’s default workspace — the same conversation the dashboard chat uses.
- Only the last user message of each request is injected; prior messages in the
messagesarray are ignored because the server already has the transcript.
Semantics and limits
- One reply per turn.
n,tools, andfunctionsare rejected — an agent brings its own tools and produces a single reply. - Sampling params are ignored.
temperature,top_p, etc. are accepted but the agent’s own configuration governs the model call. - Turns serialize per conversation. Concurrent completions on the same session key queue behind each other.
- Busy conversations return
409— e.g. while a run is executing on the workspace, or while the session waits on an escalation. Retry when it finishes. - Turn deadline. A completion request is bounded at 30 minutes; on timeout the HTTP request fails but the turn itself finishes into the transcript.
- Errors use the OpenAI wire shape (
invalid_request_error,authentication_error,rate_limit_error,server_error).