Skip to content

API Reference

N.E.K.O.'s main FastAPI server listens on port 48911 by default. These pages document the routes that exist in the current source tree; they do not mean that every route is a stable, public, or remotely safe API.

Compatibility boundary

SurfaceIntended consumerCompatibility expectation
Runtime Tools APILocal plugins and companion processesDocumented local integration contract
Main WebSocket protocolN.E.K.O. web, Electron, and mobile clientsDocumented client protocol; message families marked internal may change with the first-party UI
Cloud Save APILocal data-management clientsDocumented destructive data-operation contract; require explicit user action
Other main-server REST routesFirst-party N.E.K.O. pages and contributorsImplementation-facing; may evolve with the UI and are not a general public web API
Memory server and Agent serverMain-server-to-service trafficInternal only; use through the main server unless debugging N.E.K.O. itself

N.E.K.O. does not currently publish a separately versioned HTTP API with a blanket backward-compatibility guarantee. The stable extension surface is the plugin system; use the runtime-tools contract only when a plugin needs to expose model-callable callbacks.

Base URL and security

text
http://127.0.0.1:48911

There is no blanket authentication layer in front of the main API. Some sensitive integration routes, including /api/tools and /api/capture, enforce loopback access themselves; many first-party UI routes do not. Do not expose port 48911 to an untrusted LAN or the public Internet. Provider API keys are managed by the configuration system, not by an API bearer token.

Paths documented here do not end in / unless explicitly shown.

Main-server REST routes

Documented integration and data operations

RouterPrefixBoundary
Runtime tools/api/toolsLoopback-only plugin callback registration
Cloud save/api/cloudsaveCharacter-unit upload/download; destructive operations
Capture bridge/api/captureLoopback-only first-party Electron/GalGame bridge

First-party application routes

These pages are useful for contributors and alternative local clients, but the routes primarily serve N.E.K.O.'s own UI.

RouterPrefixScope
Config/api/configProvider settings, preferences, connectivity tests
Characters/api/charactersCharacter, persona, card, voice, and avatar operations
Live2D/api/live2dLive2D models and emotion mappings
VRM/api/model/vrmVRM models, configuration, animations, expressions
VMC output/api/vmcLocal OSC/UDP motion output for the active VRM
MMD/api/model/mmdMMD model and motion management
PNGTuber/api/model/pngtuberPNGTuber model management
Memory/api/memoryRecent-memory files, review/settings, rename, and legacy cleanup; recall uses the internal /query_memory route
Agent proxy/api/agentMain-server proxy, task state, flags, and diagnostics
Steam Workshop/api/steam/workshopWorkshop browsing, staging, publishing, and subscriptions
Music/api/musicMusic search and playback proxy
Jukebox/api/jukeboxSong and action library
Minigames/api/gameMinigame state and actions
GalGame/api/galgameGalGame reply option generation
Icebreaker/api/icebreakerNew-user onboarding flows
Proactive chat/api/proactiveProactive-chat mode and settings
System/apiStartup, prompts, screenshots, utilities, Steam and diagnostics

WebSocket

The main application socket is ws://127.0.0.1:48911/ws/{character_name}.

PageContents
ProtocolConnection lifecycle, session actions, and security boundary
Message TypesClient actions, input data, and server events
Audio StreamingJSON PCM input and binary-frame server audio output

Internal and unversioned surfaces

The main server also mounts first-party implementation routers that intentionally do not have public reference pages:

  • /api/storage/location — first-launch storage selection, migration, directory picker, restart, and retained-source cleanup.
  • /api/avatar-drop — composer document parsing helper whose output follows the current first-party UI.
  • /api/card-assist — character-card generation/refinement flows coupled to current prompts and configured LLM providers.
  • /api/auth — local cookie and QR-login state, including compatibility endpoints; credential-sensitive.
  • /api/debug — evolving diagnostic snapshots and browser health reports.
  • /health — lightweight launcher/process health probe.
  • /api/beacon/shutdown — browser-mode lifecycle control; not an application integration endpoint.
  • /market and /market/{path} — an opaque same-origin reverse proxy to the user-plugin server, not a schema owned by the main API.

Do not build third-party integrations against these surfaces unless you also control the matching N.E.K.O. version.

Internal service APIs

ServerDefault addressBoundary
Memory Serverhttp://127.0.0.1:48912Internal memory lifecycle, rendering, and recall
Agent Serverhttp://127.0.0.1:48915Internal Agent execution and ZeroMQ transport

Responses and content types

Response envelopes are router-specific. FastAPI/Pydantic validation commonly uses detail; several application routers instead return success, error/code, and message fields. Follow the contract on each page and branch on machine-readable codes rather than English messages.

Common request/response types include JSON, multipart/form-data for uploads, audio responses for voice previews, and binary WebSocket frames for server audio.