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

Search / Visit

MethodPathDescription
POST/api/plugins/search/searchExecute search
POST/api/plugins/search/visitVisit a URL and extract content

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