Skip to main content
Server chat is the conversational app surface in @anonymous-dev/0x0-server. Use it for normal assistant chat, inline edit instructions, agent turns in an isolated worktree, cancellation, and accepting or discarding generated changes.

HTTP Chat

POST /chat sends a stateless chat request to a configured provider. It streams SSE by default and can return a single JSON response when stream is false.
curl -N -X POST http://localhost:4096/chat \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "codex",
    "model": "gpt-5.4-mini",
    "messages": [{ "role": "user", "content": "Explain this module." }]
  }'

Inline Edits

POST /inline-edit converts an instruction plus a selected range into replacement text. Editor clients use it for focused changes where the checkout should stay under user control.

WebSocket Sessions

/ws is the session surface for long-running work:
MessagePurpose
session.createCreate a git-backed agent session
session.openReopen an existing session
chat.turnRun an agent turn in the session worktree
run.cancelCancel an active run
changes.statusRead changed files
changes.accept_allApply all agent changes
changes.discard_allDrop all agent changes
changes.accept_fileApply one changed file
changes.discard_fileDrop one changed file
The Neovim chat client and TUI both build on this surface.