Seizn.

API दस्तावेज़

अपने एप्लिकेशन में Seizn को एकीकृत करने के लिए आपको जो कुछ भी चाहिए। कोड की कुछ पंक्तियों के साथ अपने AI में स्थायी मेमोरी जोड़ें।

त्वरित शुरुआत

अपनी API कुंजी प्राप्त करें डैशबोर्ड से, फिर अनुरोध भेजना शुरू करें:

bash
# Add a memory
curl -X POST https://seizn.com/api/memories \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content": "User prefers dark mode interfaces"}'

# Search memories
curl "https://seizn.com/api/memories?query=user+preferences" \
  -H "Authorization: Bearer YOUR_API_KEY"

प्रमाणीकरण

सभी API अनुरोधों के लिए API कुंजी की आवश्यकता होती है x-api-key हेडर में।

bash
curl -H "Authorization: Bearer szn_your_api_key_here" \
  https://seizn.com/api/memories?query=test

सुरक्षा: अपनी API कुंजी गुप्त रखें। इन्हें क्लाइंट-साइड कोड में कभी उजागर न करें। पर्यावरण चर या बैकएंड प्रॉक्सी का उपयोग करें।

API एंडपॉइंट

POST/api/memories

उपयोगकर्ता के स्टोर में एक नई याद जोड़ें।

अनुरोध बॉडी

content-string (required)
memory_type-string - fact, preference, experience, relationship, instruction
tags-string[]
namespace-string (default: "default")
scope-string - user, session, agent
session_id-string
agent_id-string

प्रतिक्रिया

{
  "success": true,
  "memory": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "content": "User prefers dark mode interfaces",
    "memory_type": "preference",
    "tags": ["ui", "settings"],
    "namespace": "default",
    "created_at": "2026-01-08T10:30:00Z"
  }
}
GET/api/memories

अर्थ संबंधी समानता द्वारा यादें खोजें।

क्वेरी पैरामीटर

query-string (required)
limit-number (default: 10, max: 100)
threshold-number 0-1 (default: 0.7)
namespace-string

प्रतिक्रिया

{
  "success": true,
  "results": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "content": "User prefers dark mode interfaces",
      "memory_type": "preference",
      "tags": ["ui", "settings"],
      "similarity": 0.89
    }
  ],
  "count": 1
}
DELETE/api/memories

ID द्वारा यादें हटाएं।

क्वेरी पैरामीटर

ids-string (required) - comma-separated

प्रतिक्रिया

{
  "success": true,
  "deleted": 3
}
POST/api/extract

AI का उपयोग करके बातचीत से यादें निकालें और संग्रहीत करें।

अनुरोध बॉडी

conversation-string (required)
model-string - haiku | sonnet (default: haiku)
auto_store-boolean (default: true)
namespace-string (default: "default")

प्रतिक्रिया

{
  "message": "Extracted 3 memories, stored 3",
  "extracted": [
    {
      "content": "User is a software developer working with Python",
      "memory_type": "fact",
      "tags": ["profession", "programming"],
      "confidence": 0.95,
      "importance": 7
    }
  ],
  "stored": [...]
}
POST/api/query

संदर्भ (RAG) के रूप में प्रासंगिक यादों का उपयोग करके AI प्रतिक्रिया प्राप्त करें।

अनुरोध बॉडी

query-string (required)
model-string - haiku | sonnet (default: haiku)
top_k-number (default: 5)
namespace-string
include_memories-boolean (default: true)

प्रतिक्रिया

{
  "response": "Based on your preferences, I'd recommend using VS Code with a dark theme...",
  "memories_used": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "content": "User prefers dark mode interfaces",
      "similarity": 0.85
    }
  ],
  "model_used": "haiku"
}

सीमाएं

प्लानमासिक API कॉलअधिकतम यादेंAPI कुंजियां
मुफ्त1,0001002
स्टार्टर50,0005,0003
प्लस500,00050,0005
प्रो2,000,000असीमित10
एंटरप्राइज़असीमितअसीमित100

जब आप सीमा पार करते हैं, तो API लौटाता है 429 Too Many Requests प्रतिक्रिया।

त्रुटि कोड

कोडविवरण
200सफल
400Bad Request - गुम या अमान्य पैरामीटर
401Unauthorized - अमान्य या गुम API कुंजी
429Too Many Requests - सीमा पार
500Internal Server Error - कुछ गलत हो गया

सुरक्षा और शासन

डेटा सुरक्षा

  • रेस्ट पर एन्क्रिप्शन: सभी डेटा AES-256 के साथ एन्क्रिप्टेड
  • ट्रांजिट में एन्क्रिप्शन: सभी कनेक्शन के लिए TLS 1.3
  • टेनेंट अलगाव: खातों के बीच पूर्ण डेटा पृथक्करण

API कुंजी प्रबंधन

  • कुंजी रोटेशन: डैशबोर्ड से किसी भी समय कुंजियां घुमाएं
  • कुंजी समाप्ति: 90 दिनों के बाद स्वचालित रूप से समाप्त (कॉन्फ़िगर करने योग्य)
  • उपयोग ट्रैकिंग: प्रति-कुंजी रीयल-टाइम उपयोग निगरानी

डेटा प्रतिधारण और हटाना

  • निर्यात: API या डैशबोर्ड के माध्यम से किसी भी समय सभी डेटा निर्यात करें
  • हटाना: 30 दिनों के बाद कोई प्रतिधारण नहीं के साथ स्थायी हटाना
  • GDPR/CCPA: डेटा विषय अधिकारों के साथ पूर्ण अनुपालन

SDKs

Python

bash
pip install seizn
python
from seizn import Seizn

client = Seizn(api_key="your_api_key")

# Add memory
client.add("User prefers dark mode")

# Search
results = client.search("preferences")

# Extract from conversation
client.extract(conversation="...")

JavaScript

bash
npm install seizn
javascript
import { Seizn } from 'seizn';

const client = new Seizn({ apiKey: 'your_api_key' });

// Add memory
await client.add('User prefers dark mode');

// Search
const results = await client.search('preferences');

// Extract from conversation
await client.extract({ conversation: '...' });

MCP Server — Every Editor, One Memory

The Seizn MCP Server (seizn-mcp) bridges your Seizn memories to AI coding assistants via the Model Context Protocol. 40+ tools, MCP Resources, webhooks, OAuth device flow, and multi-editor config sync — all in one package.

bash
# Install globally or use npx
npx seizn-mcp@latest

# Or add to Claude Code settings (~/.claude/settings.json)
{
  "mcpServers": {
    "seizn": {
      "command": "npx",
      "args": ["-y", "seizn-mcp@latest"],
      "env": { "SEIZN_API_KEY": "your-api-key" }
    }
  }
}

Supported Editors

  • > Claude Code — native MCP
  • > Cursor — native MCP
  • > Windsurf — native MCP
  • > Cline — native MCP
  • ~ GitHub Copilot — via config sync
  • ~ Aider — via config sync
  • ~ OpenAI Codex — via config sync

Key Features

  • > 40+ MCP Tools — memories, knowledge graph, profile, webhooks, config sync
  • > MCP Resources — seizn://memories/recent, seizn://profile, seizn://context/{format}
  • > OAuth Device Flow — browser auth, no API key copy
  • > Auto Context — detects project from package.json, pyproject.toml, Cargo.toml
  • > UTF-8 Support — Korean, Japanese, Chinese, Arabic and 100+ languages

Multi-Editor Config Sync

Seizn exports your memories as editor-specific configuration files. Your AI preferences follow you across every tool.

FileAI ToolMethod
CLAUDE.mdClaude CodeMCP + File
AGENTS.mdOpenAI CodexFile Sync
.cursor/rulesCursorMCP + File
.windsurfrulesWindsurfMCP + File
.github/copilot-instructions.mdGitHub CopilotFile Sync
.clinerulesClineMCP + File
CONVENTIONS.mdAiderFile Sync

OAuth Device Flow

No more copying API keys. The MCP server supports RFC 8628 Device Authorization Grant for browser-based authentication.

1

Run auth_login tool

2

Enter code ABCD-1234 in browser

3

Token saved to ~/.seizn/

Zero-copy auth: The device flow generates a human-readable code, opens your browser, and saves credentials automatically. Works with any terminal or SSH session.