Skip to Content

API Reference

Base URL: https://loremind.peekgames.dev/api/loremind/v1

Last verified against LoreMind v1.0.67 (August 2026).

Authentication

LoreMind uses API keys for server-to-server authentication. Keys are created in Projects  under your project’s API Keys section, and each key is scoped to a single project.

Key TypePrefixUse Case
Server Keysk_server_Production server integration (NPC interactions)
Editor Keysk_editor_Game engine editor tooling (lore data, scanner, project settings)

Include your API key in the Authorization header:

Authorization: Bearer sk_server_your_key_here

Requests authenticated with an API key are automatically scoped to the key’s project — no projectId parameter is needed. JWT tokens are not accepted.

Stability Tiers

The runtime NPC endpoint (POST /npc/interact, Server Key) is the stable integration surface for your game. Editor-key endpoints are tooling APIs: they power the engine SDKs’ editor features and may change between SDK releases without notice.

Endpoints

NPC Interaction

Stable runtime surface — Server Key (sk_server_*). Full details: NPC Interaction.

EndpointDescription
POST /npc/interactGenerate an NPC response to player input

Lore Data

Tooling API — Editor Key (sk_editor_*). Full details: Lore Data.

EndpointDescription
GET /lore/mindsList Entity Minds
GET /lore/tagsList tags
GET /lore/locationsList locations
GET /lore/relationshipsList NPC-to-NPC relationships
GET /lore/relationship-typesList custom relationship types
GET /lore/documentsList Lore Documents (metadata)
GET /lore/documents/{documentId}Get one document with content
GET /lore/documents/exportBulk-export documents (powers Lore Sync)
GET /lore/project-settingsProject-level NPC configuration

Lore Scanner

Tooling API — Editor Key (sk_editor_*). Full details: Lore Scanner.

EndpointDescription
POST /scanner/estimateEstimate scan cost from file metadata
POST /scanner/submit-archiveCreate a scan job, get a signed upload URL
POST /scanner/submit-archive/confirmConfirm upload, reserve credits, queue job
GET /scanner/jobsList scan jobs
GET /scanner/jobs/{jobId}Poll job status and results
DELETE /scanner/jobs/{jobId}Cancel an unconfirmed job
POST /scanner/commitCreate Lore Documents from approved extractions
POST /scanner/rescanDiff file hashes against previous scans (true-up)

Rate Limits

NPC interactions (POST /npc/interact) are rate limited per minute, both per player (using playerId) and per project — defaults are 60 requests/minute per player and 200 requests/minute per project, configurable in Dashboard → Rate Limits. Full details, including 429 response headers, are in Errors & Rate Limits.

Credits

API usage consumes credits from your team balance: your subscription plan’s monthly credit allotment is used first, then top-up credits (which never expire). See Billing for how costs work, and manage your plan in the dashboard .

When the balance runs out, requests fail with 402:

{ "error": "Insufficient credits" }

Handle this gracefully in your game and top up (or enable auto-reload) in the dashboard.

SDK Integration

Game engine SDKs handle API calls automatically during editor testing. For production, you call the API from your backend - see Server Integration and the Unity SDK docs.

Last updated on