# Configuration Endpoints

Endpoints for global settings.

| Method | Path | Description |
|---|---|---|
| `GET` `POST` | `/v1/config/startup` | **local** — launch-on-login. `GET` returns `enabled` (the recorded setting) and `installed` (whether the launchd agent or systemd user unit exists). `POST` `{enable}` (required) writes or removes the launchd agent (macOS) or systemd user unit (Linux) and returns `{ok, enabled, installed, detail}`; it never starts or stops the running daemon, and takes effect at the next login |
| `GET` `POST` | `/v1/config/system` | **local** — reply language. `GET` returns `reply_lang` (`auto` by default) and `languages` (`{code, label}` options, `auto` first). `POST` `{reply_lang}` (required) canonicalizes the code, rejects values over 64 bytes or containing a line break, and writes `reply_lang` to `config.json` |
| `GET` | `/v1/config/reply_lang` | **local** — added in v1.0.11, read-only (a `POST` to this target returns 404). Returns the configured `reply_lang`, its resolved `name`, and the `directive` sentence injected into the system prompt — empty for `auto`; since v1.2.0 the system prompt then falls back to a built-in default (the user's language, else English; Chinese as Traditional Chinese (Taiwan)) |
| `GET` `POST` | `/v1/config/output_dir` | **local** — output directory. `GET` returns `output_dir` (the raw setting) and `resolved` (the directory in use; `~/Downloads` when unset and that folder exists). `POST` `{output_dir}` (required) expands `~`, creates the directory, and writes it to `config.json`; `""` restores the default |
| `GET` `POST` | `/v1/config/official_guide` | **local** — added in v1.2.0. Per-model official guide injection. `GET` returns `{enabled}`; `POST` `{enable}` (required) writes `official_guide_disabled` to `config.json` and returns `{ok, enabled}` |
| `GET` `POST` | `/v1/config/skill_source` | **local** — added in v1.2.0. Skill source toggle. `GET` returns `sources` (`claude`, `codex`, `copilot`, `opencode`, `agents`; the `openai` source was removed in v1.2.1) and `disabled`; `POST` `{disabled}` (required, every name must be one of `sources`, otherwise 400) writes `skill_source_disabled` to `config.json`, rescans skills, and returns `{ok, disabled}` |

Any other `:target` returns 404.
