Setup in 5 Minutes

Three steps. No SDK required. Just HTTP.

1

Get Your API Key

Sign up at tokyobrain.ai or call the signup API directly:

# Sign up
curl -X POST https://onboarding.tokyobrain.ai/api/signup \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]"}'

# Response:
{
  "api_key": "tb-a1b2c3d4e5f6...",
  "email": "[email protected]",
  "tier": "free"
}
Save your key. You'll need it as a Bearer token for all API calls.
2

Store a Memory

Send any text. Tokyo Brain handles embedding, encryption, and indexing automatically.

# Store a memory
curl -X POST https://onboarding.tokyobrain.ai/v1/store \
  -H "Authorization: Bearer tb-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document": "User prefers dark mode and hates popups",
    "metadata": {"type": "preference", "emotional_salience": 0.7}
  }'

# Response:
{"stored": true, "id": "mem-abc123", "collection": "tenant_xxx_memories"}
3

Recall Memories

Query in natural language. The 10-layer pipeline finds the best match.

# Recall
curl -X POST https://onboarding.tokyobrain.ai/v1/recall \
  -H "Authorization: Bearer tb-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "what does the user prefer?", "topK": 5}'

# Response:
{
  "memories": [
    {
      "id": "mem-abc123",
      "document": "User prefers dark mode and hates popups",
      "score": 0.92
    }
  ],
  "count": 1
}

That's it. Your AI has memory now.

Everything below is optional — but it's what makes Tokyo Brain different.

+

Optional: BYOK Chat

Bring your own LLM key. Tokyo Brain auto-injects memories into the conversation.

# Chat with memory injection
curl -X POST https://onboarding.tokyobrain.ai/v1/chat \
  -H "Authorization: Bearer tb-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [{"role": "user", "content": "What do I prefer?"}],
    "provider": "anthropic",
    "llm_api_key": "sk-ant-YOUR_ANTHROPIC_KEY",
    "memory_enabled": true
  }'
+

Optional: Enable Night Systems

Set your Anthropic key once. Tonight, your AI starts dreaming.

# Enable DMN dreaming + Night Cycle (Fleet tier)
curl -X POST https://onboarding.tokyobrain.ai/api/settings \
  -H "Authorization: Bearer tb-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"anthropic_key": "sk-ant-YOUR_KEY"}'

# Check what's enabled:
curl https://onboarding.tokyobrain.ai/api/settings \
  -H "Authorization: Bearer tb-YOUR_KEY"
SystemFreePro $9Fleet $49
Consciousness Seeds
Active Forgetting
Subconscious Injection
Night Cycle Cleaning
DMN Dreaming
MRA Debate Tribunal
BYOA: Night systems run on YOUR Anthropic key. We never touch your LLM credits for our background processes.
+

Optional: Claude Code Integration

Add Tokyo Brain to your Claude Code CLAUDE.md for automatic memory:

# Add to your CLAUDE.md startup protocol:

## Startup
```bash
curl -s https://onboarding.tokyobrain.ai/v1/recall \
  -H "Authorization: Bearer $TOKYO_BRAIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"recent context important","topK":5}'
```

## Shutdown
```bash
curl -s https://onboarding.tokyobrain.ai/v1/store \
  -H "Authorization: Bearer $TOKYO_BRAIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{"document":"Session summary: ..."}'
```
Get Started Free Full API Docs