Skip to content

API Reference

The LoomBrain API is a REST API hosted on Cloudflare Workers.

https://api.loombrain.com/api/v1

All endpoints (except auth routes) require authentication via one of:

  • Bearer token: Authorization: Bearer <access_token> — JWT with 15-minute expiry
  • API key: Authorization: ApiKey <key> — HMAC-verified, no expiry

See Authentication for details.

  • Content-Type: application/json for most endpoints
  • Content-Type: multipart/form-data for file uploads
  • All request bodies are validated with Zod schemas

Successful responses return JSON. List endpoints return paginated results:

{
"data": [...],
"total": 42,
"page": 1,
"per_page": 20
}

Errors return JSON with an error field:

{
"error": "NOT_FOUND",
"message": "Node not found"
}

Common HTTP status codes:

StatusMeaning
200Success
201Created
204No content (successful deletion)
400Validation error
401Unauthorized — missing or invalid credentials
404Resource not found
413Payload too large
415Unsupported media type
426Upgrade required — CLI version too old
429Rate limited
500Internal server error

The CLI sends an X-CLI-Version header with every request. The API may:

  • Return 426 Upgrade Required if the CLI version is below the minimum
  • Set X-Recommended-CLI-Version response header if a newer version is available

See CLI Upgrade for details.

GroupDescription
NodesKnowledge graph node CRUD and search
CapturesContent capture, upload, and lifecycle
PARAPARA item management
ContextSession context and graph health
LinksNode relationships and suggestions
GraphGraph visualization data
StatsUsage statistics