🧠 AI Memory

Your AI conversations, organized and searchable

Developer API

AI Memory API Documentation

REST API for conversation search, upload, and memory management. Integrate AI Memory into your apps with cURL, Python, or JavaScript.

Base URL & Authentication

Base URL

https://aimemory.pro/api

Authentication

The API uses session-based authentication (same as the web interface). After uploading conversations via the web UI, your browser session cookie allows API access.

Note: For AI tool integration (Claude Desktop, Cursor, Windsurf), use our MCP Server instead — it uses token-based auth and provides 12 tools for memory management.

Rate Limits

Free Tier
100 calls/mo
Pro Tier
10,000 calls/mo
Enterprise
Custom

Quick Start

1. Upload Your First Conversation

Use the web UI to upload a ChatGPT JSON export, or call the API directly:

# Upload via cURL (requires session cookie)
curl -X POST https://aimemory.pro/api/upload \
  -F "file=@conversations.json" \
  -F "platform=chatgpt" \
  -H "Cookie: session=YOUR_SESSION_COOKIE"

# Response: { "success": true, "conversationId": "abc123" }

2. Search Your Conversations

# Search via cURL
curl "https://aimemory.pro/api/search?q=machine+learning" \
  -H "Cookie: session=YOUR_SESSION_COOKIE"

# Response: { "results": [ { "id": "abc123", "title": "...", "snippet": "..." } ] }

3. Get Full Conversation

# Get full conversation by ID
curl "https://aimemory.pro/api/conversation/abc123" \
  -H "Cookie: session=YOUR_SESSION_COOKIE"

# Response: { "id": "abc123", "title": "...", "messages": [ ... ] }

API Endpoints

POST/api/upload

Upload conversations in JSON, ZIP, or plain text format.

Parameters

ParameterTypeDescription
fileFileConversation file (JSON, ZIP, or TXT)
platformStringOne of: chatgpt, claude, deepseek, gemini, kimi, grok

Response

{
  "success": true,
  "conversationId": "abc123",
  "title": "Machine Learning Discussion",
  "messageCount": 42
}
GET/api/search

Full-text search across all your saved conversations.

Query Parameters

ParameterTypeDescription
qStringSearch query (required)
platformStringFilter by platform (optional)
limitIntegerMax results (default: 20, max: 100)
GET/api/conversation/[id]

Retrieve a full conversation with all messages by ID.

Path Parameters

ParameterTypeDescription
idStringConversation ID (from /api/search)

Code Examples

Python: Search Conversations

import requests

# Search conversations
response = requests.get(
    'https://aimemory.pro/api/search',
    params={'q': 'machine learning'},
    cookies={'session': 'YOUR_SESSION_COOKIE'}
)
results = response.json()['results']
for r in results:
    print(f"{r['title']}: {r['snippet']}")

JavaScript: Fetch Full Conversation

// Fetch full conversation by ID
const conversationId = 'abc123';
const response = await fetch(
  `https://aimemory.pro/api/conversation/${conversationId}`,
  { credentials: 'include' } // sends session cookie
);
const data = await response.json();
console.log(data.title, data.messages.length);

Want Real-Time Memory Injection?

For AI tool integration (Claude Desktop, Cursor, Windsurf), use our MCP Server instead of the REST API. It provides 12 tools for real-time memory search and injection during your AI conversations.

MCP Server Docs →

Frequently Asked Questions

Is the AI Memory API free to use?

Yes! The API is free for all registered users. Free tier includes up to 50 conversations and 100 API calls/month. Pro tier ($9.99/mo) includes unlimited conversations and 10,000 API calls/month.

What authentication method does the API use?

The API uses session-based authentication (same as the web interface). After uploading conversations via the web UI, your session cookie allows API access. MCP Server (Model Context Protocol) uses a separate token-based auth for Claude Desktop, Cursor, and other AI tools.

How many API calls can I make per month?

Free tier: 100 API calls/month. Pro tier ($9.99/mo): 10,000 API calls/month. Enterprise tier: custom rate limits. All responses include rate limit headers (X-RateLimit-Limit, X-RateLimit-Remaining).

Can I use the API to upload conversations programmatically?

Yes! Use the POST /api/upload endpoint to upload conversations in ChatGPT JSON format, ZIP exports, or plain text. You can also use the MCP Server's add_memory tool for real-time memory injection during AI conversations.

What data formats does the API support?

The API supports: (1) ChatGPT JSON exports (conversations.json), (2) ZIP files containing multiple JSON files, (3) Plain text (one conversation per file), (4) MCP Protocol (for AI tool integration). All platforms (ChatGPT, Claude, DeepSeek, Gemini, Kimi, Grok) are supported.

Is there an official Python or JavaScript SDK?

Currently, we provide REST API endpoints that you can call directly with any HTTP client (fetch, axios, requests, curl). An official Python SDK and JavaScript/TypeScript client are planned for Q3 2026. For AI tool integration, use our MCP Server (available on PyPI).

Ready to Get Started?

Upload your AI conversations and start searching with our API. Free tier includes 50 conversations and 100 API calls/month.