Skip to main content
Base URL: http://localhost:8080 Version: 0.16.1 License: Apache 2.0

Endpoints

EndpointMethodDescription
/healthGETHealth check (always public)
/statusGETGraph statistics
/stageGETDevelopmental stage
/signalPOSTIngest a signal
/signalsPOSTIngest a sequence of signals (creates edges)
/signal/retractPOSTRetract a signal (decrement edge weight)
/queryPOSTExecute a query
/exportPOSTExport graph
/hashGETBLAKE3 cryptographic hash of graph
/metricsGETPrometheus-compatible metrics
The HTTP server holds an exclusive lock on the redb database. CLI commands (ingest, status, export) cannot run while the server is active.

Authentication

Authentication is optional, controlled by the KREMIS_API_KEY environment variable.
export KREMIS_API_KEY="your-secret-api-key"
When enabled, include the key in requests:
Authorization: Bearer <your-api-key>
The /health endpoint is always accessible without authentication.

Rate Limiting

  • Default: 100 requests per second (global, not per-client)
  • Configure: KREMIS_RATE_LIMIT=200
  • Exceeded: returns 429 Too Many Requests

Log Format

Control the server log output format with KREMIS_LOG_FORMAT:
ValueDescription
text (default)Human-readable log lines
jsonMachine-parseable JSON — one object per line, compatible with Loki, Datadog, etc.
KREMIS_LOG_FORMAT=json kremis server
Structured log fields (present in both modes, separately filterable in JSON):
FieldEvents
event="server_start"Server bind success
event="cors_insecure"KREMIS_CORS_ORIGINS=* detected
event="auth_failure"Invalid or missing API key
event="rate_limit_exceeded"Request rejected by rate limiter

Input Validation

FieldLimit
attributeMax 256 bytes
valueMax 64 KB (65,536 bytes)
depthMax 100
nodes (intersect)Max 100 items

Error Codes

StatusDescriptionResponse Type
200SuccessJSON
400Bad Request — invalid inputJSON with error field
401Unauthorized — missing or invalid API keyPlain text
429Too Many Requests — rate limit exceededPlain text
500Internal Server ErrorJSON with error field

Query Response: Grounding Field

Every query response includes a grounding field that classifies the result:
ValueMeaningQuery types
"fact"Data retrieved directlylookup, properties
"inference"Result derived via graph traversaltraverse, traverse_filtered, strongest_path, intersect, related
"unknown"No data foundAny query when found: false
{
  "success": true,
  "found": true,
  "path": [0],
  "edges": [],
  "grounding": "fact",
  "error": null
}

Query Response: Diagnostic Field

When found is false, an optional diagnostic field explains why:
ValueMeaning
"entity_not_found"lookup: entity ID does not exist
"node_not_found"traverse, traverse_filtered, related, properties: node ID does not exist
"start_not_found"strongest_path: start node does not exist
"end_not_found"strongest_path: end node does not exist
"no_path"strongest_path: both nodes exist but no path connects them
"no_common_neighbors"intersect: no node is reachable from all inputs
The diagnostic field is omitted when found is true.
Last modified on March 14, 2026