API Reference

Base URL: https://catalyst-brain-api.strategic-innovations.workers.dev

Authentication: x-api-key: cb_your_key header on all protected endpoints.

Authentication

Get API Key

# Create a free key
POST /api/v1/key
{"email": "you@company.com", "tier": "free"}

# Response
{
  "api_key": "cb_xxxx_xxxxxx_xxxxxxxx_xxxxxxxx",
  "tier": "free",
  "max_calls": 1000,
  "endpoints": { ... }
}

Check Usage

GET /api/v1/usage
x-api-key: cb_your_key

Product 1: RAIN Evidence

Seal Evidence

POST /api/v1/evidence/seal
x-api-key: cb_your_key

{
  "agent_id": "loan-agent-001",
  "workflow_id": "loan-workflow-001",
  "decision": "approve",
  "step_index": 0,
  "capability_scope": ["loan-approval"],
  "metadata": {"amount": 50000, "credit_score": 720}
}

Verify Evidence (PUBLIC — no auth)

POST /api/v1/evidence/verify
{"packet": { ... rain packet from seal ... }}

Product 2: KV Cache

Calculate Compact Cache

POST /api/v1/cache/compact
x-api-key: cb_your_key

{
  "model": "Qwen/Qwen2.5-0.5B",
  "seq_length": 131072,
  "dim": 4096
}
→ { "standard_cache_mb": 3072, "catalyst_cache_mb": 0.19, "advantage": "16384x" }

Product 3: Agent Memory

Store Memory

POST /api/v1/memory/store
x-api-key: cb_your_key

{
  "agent_id": "support-agent",
  "key": "customer-123",
  "value": {"text": "prefers email contact"},
  "namespace": "default"
}

Retrieve Memory

GET /api/v1/memory/retrieve?key=customer-123&namespace=default
x-api-key: cb_your_key

Memory Stats

GET /api/v1/memory/stats
x-api-key: cb_your_key
→ { "memory_type": "O(1) holographic", "bounded": true, "memory_mb": 0.016 }

Image Generation (Workers AI)

POST /api/v1/generate/image
x-api-key: cb_your_key  # Pro tier required

{"prompt": "A futuristic brain logo, indigo and violet, dark background"}
→ PNG image (FLUX.2 model)

Public Endpoints

EndpointMethodAuth
/api/v1/healthGETNo
/api/v1/docsGETNo
/api/v1/benchmarkGETNo
/api/v1/evidence/verifyPOSTNo
/api/v1/keyGET/POSTNo

← Back to home