http://127.0.0.1:7777 by default.
The API binds to
127.0.0.1 only and is never exposed to the network. It is intended for local use by the TUI and scripts running on the same machine.Base URL
API_PORT in ~/.max/.env and restart the daemon.
Authentication
All endpoints exceptGET /status require a Bearer token. The token is generated automatically on first run and stored at ~/.max/api-token with mode 0600.
Read the token:
401 Unauthorized response:
Endpoints
GET /status
Health check. Returns the daemon status and a snapshot of active workers. No authentication required.Always
"ok" when the daemon is running.List of active worker sessions.
GET /stream
Open a Server-Sent Events (SSE) connection to receive real-time streaming responses. You must obtain aconnectionId from this endpoint before calling POST /message.
:ping) to keep it alive.
Initial event (on connect)
Opaque identifier for this SSE connection. Pass this value as
connectionId when calling POST /message.| Type | Description |
|---|---|
connected | Sent once on connect. Contains connectionId. |
delta | Partial streamed content. content is the full accumulated text so far. |
message | Final response. content is the complete text. May include a route field if auto-routing is enabled. |
cancelled | Sent when a message is cancelled via POST /cancel. |
POST /message
Send a message to the orchestrator. Requires an active SSE connection — responses stream back over/stream.
The message to send to the orchestrator.
The
connectionId obtained from GET /stream. The response will be streamed back to that connection."queued" — the message has been accepted and will be processed. The actual response arrives over the SSE stream.GET /sessions
List all active worker sessions with their current status and recent output.Unique name of the worker session.
Filesystem path the worker is operating in.
Current status:
"idle" or "running".Up to 500 characters of the most recent output from the worker.
GET /memory
Retrieve all stored memories. Memories are long-term facts, preferences, and context that Max carries across conversations.Unique memory ID.
Memory category:
"preference", "fact", "project", "person", or "routine".The memory content.
GET /skills
List all installed skills. Skills are loaded from three directories: the package bundled skills,~/.max/skills/ (local), and ~/.agents/skills/ (global).
URL-safe identifier for the skill. Used with
DELETE /skills/:slug.Human-readable skill name.
Short description of what the skill provides.
Where the skill was loaded from:
"bundled", "local", or "global".Filesystem path to the skill directory.
DELETE /skills/:slug
Remove a locally installed skill. Only skills withsource: "local" (installed in ~/.max/skills/) can be removed. Bundled and global skills cannot be deleted via this endpoint.
The slug of the skill to remove. URL-encode slugs that contain special characters.
true on success.Confirmation message.
GET /model
Get the currently active Copilot model.The model identifier currently in use (e.g.
"claude-sonnet-4.6").POST /model
Switch to a different Copilot model. The new model is validated against the list of models available from the Copilot CLI and persisted to~/.max/.env.
The model identifier to switch to. Run
copilot listModels to see available options.The model that was active before the switch.
The newly active model.
GET /auto
Get the current auto model routing configuration and the last routing decision.Whether auto-routing is currently active.
Map of tier names (
"fast", "standard", "premium") to model identifiers.Number of messages before the router re-classifies intent after a switch.
The model currently active.
The most recent routing decision, or
null if none has occurred.POST /auto
Update the auto model routing configuration.Enable or disable auto model routing.
Map of tier names to model identifiers. Partial updates are merged.
Number of messages before the router re-classifies after a model switch.
GET /auto).
POST /cancel
Cancel the current in-flight message. Acancelled event is broadcast to all connected SSE clients.
"ok"true if there was an active message to cancel, false if the orchestrator was idle.POST /restart
Restart the Max daemon. The current process spawns a replacement and exits. The API responds before the restart completes."restarting"The orchestrator session ID is preserved across restarts. Max resumes its previous session automatically.
POST /send-photo
Send a photo to the configured Telegram user. Requires Telegram to be configured in~/.max/.env.
Absolute filesystem path or URL to the image to send.
Optional caption text for the photo.
"sent" on success.