Lore Data

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

Read-only endpoints for fetching your project's lore data. These power the Unity SDK's editor tooling and Lore Sync, and can be called directly from your own tools.

Authentication: Editor Key (sk_editor_*) for all endpoints on this page.

Authentication and other common failures are covered in Errors & Rate Limits.

GET /lore/minds

List all Entity Minds for the key's project. Returns only minds with at least one knowledge tag configured.

Response

typescript
{
  minds: Array<{
    id: string;
    entityName: string;
    personality: string;
    backstory: string | null;
    backstorySummary: string | null;
    role: string | null;
    speakingStyle: string | null;
    hints: string[];
    restrictions: string[];
    locationId: string | null;
    location: { id: string; name: string } | null;
    knowledgeTags: string[];
    knowledgeDescription: string;
    computedFilter: object;
    responseConfig: object;
    buildCreditsUsed: number;
    interactionCount: number;
    relationshipCount: number;
    createdAt: string;
    updatedAt: string;
  }>;
}

Example

bash
curl https://loremind.peekgames.dev/api/loremind/v1/lore/minds \
  -H "Authorization: Bearer sk_editor_your_key"

GET /lore/tags

List all tags for the key's project.

Response

typescript
{
  success: true;
  tags: Array<{
    id: string;
    name: string;
    color: string | null;
    isDefault: boolean;
    documentCount: number;
  }>;
  defaultTags: Array<{ id: string; name: string; color: string | null; documentCount: number }>;
  customTags: Array<{ id: string; name: string; color: string | null; documentCount: number }>;
  totalCount: number;
}

GET /lore/locations

List all locations for the key's project, ordered by name.

Response

typescript
{
  success: true;
  locations: Array<{
    id: string;
    name: string;
    description: string | null;
    documentId: string | null;
    document: { id: string; name: string } | null;
    entityMindCount: number;
    createdAt: string;
    updatedAt: string;
  }>;
  totalCount: number;
}

GET /lore/relationships

List NPC-to-NPC relationships for the key's project.

Query Parameters:

  • entityMindId (optional): relationships involving this Entity Mind (either direction)
  • fromEntityId + toEntityId (optional, both required together): relationships between a specific pair, both directions
  • limit (optional): default 100, max 500
  • offset (optional): default 0

Response

typescript
{
  success: true;
  relationships: Array<{
    id: string;
    type: string | null;               // Built-in type (FRIEND, RIVAL, MENTOR, ...) or null for custom
    customTypeId: string | null;
    customType: { id: string; name: string; color: string } | null;
    description: string | null;
    fromEntity: { id: string; entityName: string; location: { id: string; name: string } | null };
    toEntity: { id: string; entityName: string; location: { id: string; name: string } | null };
    createdAt: string;
    updatedAt: string;
  }>;
  totalCount: number;
}

GET /lore/relationship-types

List the project's custom relationship types.

Response

typescript
{
  success: true;
  customTypes: Array<{
    id: string;
    name: string;
    description: string | null;
    color: string;
    isSymmetric: boolean;
    inverseTypeId: string | null;
    conflictsWithBuiltIn: string[];
    conflictsWithCustom: string[];
    usageCount: number;
    createdAt: string;
    updatedAt: string;
  }>;
}

GET /lore/documents

List Lore Documents for the key's project (metadata only; use the export endpoint for content).

Query Parameters:

  • status (optional): PENDING | PROCESSING | COMPLETED | FAILED
  • tag (optional): filter by tag name
  • search (optional): full-text search over name and content
  • limit (optional): default 50, max 100
  • offset (optional): default 0

Response

typescript
{
  success: true;
  documents: Array<{
    id: string;
    name: string;
    status: string;
    createdAt: string;
    updatedAt: string;
    processedAt: string | null;
    tags: Array<{ id: string; name: string; color: string | null; isDefault: boolean }>;
  }>;
  pagination: { total: number; limit: number; offset: number; hasMore: boolean };
}

GET /lore/documents/{documentId}

Get a single document, including its full content.

Response

typescript
{
  success: true;
  document: {
    id: string;
    name: string;
    content: string;
    status: string;
    tags: Array<{ id: string; name: string }>;
    location: { id: string; name: string } | null;
    createdAt: string;
    updatedAt: string;
    processedAt: string | null;
  };
}

GET /lore/documents/export

Bulk-export documents with their full content. This is the endpoint the Unity SDK's Lore Sync uses; page through it for backups or custom tooling.

Query Parameters:

  • limit (optional): default 20, max 50
  • offset (optional): default 0

Returns the same document shape as the single-document endpoint, plus a pagination object (total, limit, offset, hasMore), ordered newest first.


GET /lore/project-settings

Fetch project-level configuration relevant to NPC interactions.

Response

typescript
{
  success: true;
  settings: {
    projectName: string | null;
    longTermMemoryEnabled: boolean;   // true when Long-Term Memory is on for the project
    maxSessionLength: number;         // default 20 turns
    maxSessionTokens: number;         // default 50000
    enhancedMemoryRetrieval: boolean; // default false
  };
}

Next Steps