Skip to content

Get Stored Entity Graph

POST
/api/writing/entities/graph/stored

Build relationship graph from stored lore entries and their relationships.

Uses lore_entries as nodes and lore_page_relationships as edges. The original /entities/graph endpoint still exists for LLM-based extraction.

EntityGraphRequest

Entity relationship graph generation request model.

Request model for generating an entity relationship graph visualization with configurable depth and node limits.

Fields: center_entity: Optional center entity (None = all entities) depth: Relationship traversal depth (default: 2 hops) max_nodes: Maximum nodes to include in graph (default: 50) entity_type: Optional filter by entity type (character, location, etc.) content: Optional content to extract entities from

Used By: - POST /api/writing/entities/graph endpoint - Entity graph visualization UI - Relationship exploration - Worldbuilding visualization

object
centerEntity
Any of:
string
depth
Depth
integer
default: 2
maxNodes
Maxnodes
integer
default: 50
entityType
Any of:
string
content
Any of:
string

Successful Response

EntityGraphResponse

Entity relationship graph response model.

Provides nodes and edges for entity relationship graph visualization, compatible with graph visualization libraries (D3.js, Cytoscape, etc.).

Fields: nodes: List of graph nodes with entity data edges: List of graph edges with relationship data

Node Format: {“id”: “entity_name”, “type”: “character”, “label”: “Valko”}

Edge Format: {“source”: “entity1”, “target”: “entity2”, “type”: “allies”}

Used By: - POST /api/writing/entities/graph endpoint response - Graph visualization components - Interactive worldbuilding explorer - Relationship mapping visualization

object
nodes
required
Nodes
Array<object>
object
key
additional properties
Any of:
string
edges
required
Edges
Array<object>
object
key
additional properties
Any of:
string
status
Any of:
string
message
Any of:
string
nodeCount
Any of:
integer
edgeCount
Any of:
integer
maxDepth
Any of:
integer
centerEntity
Any of:
string
entityType
Any of:
string

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object