API Reference

ContextStream API

RESTful API for memory, search, knowledge graphs, and code intelligence. Integrate ContextStream into any application.

Quick Start

1. Get your API key

Create an account and generate an API key from your dashboard.

2. Make your first request

curl -X GET "https://api.contextstream.io/v1/workspaces" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

3. Search your content

curl -X POST "https://api.contextstream.io/v1/search/semantic" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "how do we handle authentication",
    "workspace_id": "your-workspace-id",
    "limit": 10
  }'

API Endpoints

Authentication

POST/v1/auth/register

Create a new user account

POST/v1/auth/login

Authenticate and get tokens

GET/v1/auth/me

Get current user profile

POST/v1/auth/api-keys

Create a new API key

Workspaces

GET/v1/workspaces

List all workspaces

POST/v1/workspaces

Create a new workspace

GET/v1/workspaces/:id

Get workspace details

GET/v1/workspaces/:id/overview

Get workspace summary

Search

POST/v1/search/semantic

Semantic vector search by meaning

POST/v1/search/hybrid

Combined semantic + keyword search

POST/v1/search/keyword

Traditional keyword search

POST/v1/search/pattern

Regex pattern search

Memory

POST/v1/memory/events

Store a memory event

GET/v1/memory/events/workspace/:id

List memory events

POST/v1/memory/search

Search memory

GET/v1/memory/search/timeline/:id

Get memory timeline

POST/v1/memory/nodes

Create knowledge node

GET/v1/memory/search/decisions

Get decision summaries

Graph & Analysis

POST/v1/graph/dependencies

Query code dependencies

POST/v1/graph/impact-analysis

Analyze change impact

POST/v1/graph/call-paths

Trace call paths

POST/v1/graph/knowledge/related

Find related knowledge nodes

AI Integration

POST/v1/ai/context

Build context for LLMs

POST/v1/ai/context/enhanced

Enhanced context with memory

POST/v1/ai/embeddings

Generate embeddings

POST/v1/ai/plan/generate

Generate development plan

MCP Server

For AI tools like Claude, Cursor, and Windsurf, use our MCP server for direct integration.

Installation

npm install -g @contextstream/mcp

Configuration (Claude Desktop)

{
  "mcpServers": {
    "contextstream": {
      "command": "npx",
      "args": ["-y", "@contextstream/mcp"],
      "env": {
        "CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
        "CONTEXTSTREAM_API_KEY": "your-api-key"
      }
    }
  }
}

Ready to integrate?

Get started with a free account and API key.

© 2025 ContextStream Inc. All rights reserved.