Skip to content

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 ​

MethodPathDescription
POST/api/chats/saveSave chat (patch-first)
POST/api/chats/getGet chat list
POST/api/chats/deleteDelete chat
POST/api/chats/renameRename chat
POST/api/chats/exportExport chat

Group Chats ​

MethodPathDescription
POST/api/chats/group/saveSave group chat
POST/api/chats/group/getGet group chat list
POST/api/chats/group/deleteDelete group chat

Chat State ​

MethodPathDescription
POST/api/chats/state/getBatch read state
POST/api/chats/state/patchIncrementally update state
POST/api/chats/state/deleteDelete state

Settings ​

MethodPathDescription
POST/api/settings/saveSave settings (patch-first)
POST/api/settings/getGet settings

World Info ​

MethodPathDescription
POST/api/worldinfo/saveSave World Info (patch-first)
POST/api/worldinfo/getGet World Info
MethodPathDescription
POST/api/search/queryUnified search. Recommended path for plugins.
POST/api/search/serpapiUpstream: SerpApi (raw provider JSON)
POST/api/search/searxngUpstream: SearXNG (raw HTML)
POST/api/search/tavilyUpstream: Tavily (raw provider JSON)
POST/api/search/koboldcppUpstream: KoboldCpp (raw provider JSON)
POST/api/search/serperUpstream: Serper (raw provider JSON)
POST/api/search/zaiUpstream: Z.AI (raw provider JSON)
POST/api/search/ddgDuckDuckGo scrape
POST/api/search/braveBrave Search
POST/api/search/visitVisit a URL and extract content
POST/api/search/transcriptYouTube 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:

json
[
  { "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
  • replace operations require the target path to already exist
  • add operations 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 ​

json
{
  "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.

Built upon SillyTavern