Low-Level Endpoint Reference
WARNING
The following endpoints are provided only as a reference for advanced debugging and integration scenarios where Luker.getContext() cannot be used. They are same-origin web application routes, not the primary plugin API contract. Normal plugin development should use the Context API described in the other Extension API pages.
Plugins can also read and write World Info entries through the context API; the raw HTTP routes for World Info are listed below.
Character Chats
| Method | Path | Description |
|---|---|---|
| POST | /api/chats/save | Save chat (patch-first) |
| POST | /api/chats/get | Get chat list |
| POST | /api/chats/delete | Delete chat |
| POST | /api/chats/rename | Rename chat |
| POST | /api/chats/export | Export chat |
Group Chats
| Method | Path | Description |
|---|---|---|
| POST | /api/chats/group/save | Save group chat |
| POST | /api/chats/group/get | Get group chat list |
| POST | /api/chats/group/delete | Delete group chat |
Chat State
| Method | Path | Description |
|---|---|---|
| POST | /api/chats/state/get | Batch read state |
| POST | /api/chats/state/patch | Incrementally update state |
| POST | /api/chats/state/delete | Delete state |
Settings
| Method | Path | Description |
|---|---|---|
| POST | /api/settings/save | Save settings (patch-first) |
| POST | /api/settings/get | Get settings |
World Info
| Method | Path | Description |
|---|---|---|
| POST | /api/worldinfo/save | Save World Info (patch-first) |
| POST | /api/worldinfo/get | Get World Info |
Search
| Method | Path | Description |
|---|---|---|
| POST | /api/search/query | Unified search. Recommended path for plugins. |
| POST | /api/search/serpapi | Upstream: SerpApi (raw provider JSON) |
| POST | /api/search/searxng | Upstream: SearXNG (raw HTML) |
| POST | /api/search/tavily | Upstream: Tavily (raw provider JSON) |
| POST | /api/search/koboldcpp | Upstream: KoboldCpp (raw provider JSON) |
| POST | /api/search/serper | Upstream: Serper (raw provider JSON) |
| POST | /api/search/zai | Upstream: Z.AI (raw provider JSON) |
| POST | /api/search/ddg | DuckDuckGo scrape |
| POST | /api/search/brave | Brave Search |
| POST | /api/search/visit | Visit a URL and extract content |
| POST | /api/search/transcript | YouTube transcript |
/api/search/query takes { provider, query, max_results, safe_search, time_range, region, options } and returns { provider, query, result_count, results: [{ title, url, snippet }] }. Providers: ddg, searxng, brave, tavily, exa, serper, serpapi, zai. /api/search/query, /api/search/ddg, and /api/search/brave return the unified shape above. The Upstream routes return raw provider responses.
Patch Operation Format
Message patches use the RFC 6902 JSON Patch format:
[
{ "op": "replace", "path": "/4/mes", "value": "New content" },
{ "op": "add", "path": "/4/extra/note", "value": "Note" },
{ "op": "remove", "path": "/4/extra/old_field" }
]Object patches (meta/patch, state/patch, settings/patch, worldinfo/patch) also use the same RFC 6902 format.
Patch Conflicts and Integrity Semantics
- The server validates whether the path in a patch operation exists
replaceoperations require the target path to already existaddoperations create paths that do not exist- On conflict, an error is returned; the client should retry or fall back to a full save
Chat-Completions Request Body
{
"messages": [...],
"model": "gpt-4o",
"secret_id": "optional-override"
}The secret_id field allows overriding the API key used at the request level, suitable for scenarios such as multi-agent orchestration that require different keys.