ทุกอย่างที่คุณต้องการเพื่อผสานรวม Seizn เข้ากับแอปพลิเคชันของคุณ เพิ่มหน่วยความจำถาวรให้กับ AI ของคุณด้วยโค้ดเพียงไม่กี่บรรทัด
รับคีย์ API ของคุณจาก แดชบอร์ด จากนั้นเริ่มส่งคำขอ:
# 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 header
curl -H "Authorization: Bearer szn_your_api_key_here" \
https://seizn.com/api/memories?query=testความปลอดภัย: เก็บรักษาคีย์ API ของคุณเป็นความลับ อย่าเปิดเผยในโค้ดฝั่ง client ใช้ตัวแปรสภาพแวดล้อมหรือ backend proxy
/api/memoriesเพิ่มความทรงจำใหม่ลงในที่เก็บของผู้ใช้
content-string (required)memory_type-string - fact, preference, experience, relationship, instructiontags-string[]namespace-string (default: "default")scope-string - user, session, agentsession_id-stringagent_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"
}
}/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
}/api/memoriesลบความทรงจำตาม ID
ids-string (required) - comma-separated{
"success": true,
"deleted": 3
}/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": [...]
}/api/queryรับการตอบกลับจาก AI โดยใช้ความทรงจำที่เกี่ยวข้องเป็นบริบท (RAG)
query-string (required)model-string - haiku | sonnet (default: haiku)top_k-number (default: 5)namespace-stringinclude_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,000 | 100 | 2 |
| Starter | 50,000 | 5,000 | 3 |
| Plus | 500,000 | 50,000 | 5 |
| Pro | 2,000,000 | ไม่จำกัด | 10 |
| องค์กร | ไม่จำกัด | ไม่จำกัด | 100 |
เมื่อคุณเกินขีดจำกัด API จะส่งคืน 429 Too Many Requests การตอบกลับ
| รหัส | คำอธิบาย |
|---|---|
200 | สำเร็จ |
400 | Bad Request - ขาดหรือพารามิเตอร์ไม่ถูกต้อง |
401 | Unauthorized - คีย์ API ไม่ถูกต้องหรือขาด |
429 | Too Many Requests - เกินขีดจำกัด |
500 | Internal Server Error - เกิดข้อผิดพลาด |
pip install seiznfrom 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="...")npm install seiznimport { 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: '...' });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.
# 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" }
}
}
}Seizn exports your memories as editor-specific configuration files. Your AI preferences follow you across every tool.
| File | AI Tool | Method |
|---|---|---|
| CLAUDE.md | Claude Code | MCP + File |
| AGENTS.md | OpenAI Codex | File Sync |
| .cursor/rules | Cursor | MCP + File |
| .windsurfrules | Windsurf | MCP + File |
| .github/copilot-instructions.md | GitHub Copilot | File Sync |
| .clinerules | Cline | MCP + File |
| CONVENTIONS.md | Aider | File Sync |
No more copying API keys. The MCP server supports RFC 8628 Device Authorization Grant for browser-based authentication.
Run auth_login tool
Enter code ABCD-1234 in browser
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.