
Generate API keys and integrate with short memory endpoints.
The API Setup tab provides your authentication credentials and endpoint reference for integrating short memory into your application.
Your API key authenticates all requests to the short memory API. Keys are prefixed with mk_ to distinguish them from RAG project keys.
Key management:
Security: Store your API key in environment variables or a secrets manager. Never commit keys to version control or expose them in client-side code.
All requests require the X-Memory-Api-Key header:
X-Memory-Api-Key: mk_your_key_here
Store one or more messages in a session.
curl -X POST https://api.guidedmind.ai/api/v1/memory/short/messages \
-H "Content-Type: application/json" \
-H "X-Memory-Api-Key: mk_your_key_here" \
-d '{
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"messages": [
{
"role": "user",
"content": "Hello, I need help with my order",
"metadata": {"source": "chat"}
},
{
"role": "assistant",
"content": "I'd be happy to help. Can you provide your order number?",
"metadata": {"model": "claude-3"}
}
]
}'Response:
{
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"messages": [
{
"role": "user",
"content": "Hello, I need help with my order",
"timestamp": "2024-01-15T10:30:00Z",
"metadata": {"source": "chat"}
}
],
"total_count": 1
}Retrieve all active messages for a session.
curl https://api.guidedmind.ai/api/v1/memory/short/messages/550e8400-e29b-41d4-a716-446655440000 \
-H "X-Memory-Api-Key: mk_your_key_here"Response:
{
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"messages": [
{
"role": "user",
"content": "Hello, I need help with my order",
"timestamp": "2024-01-15T10:30:00Z",
"metadata": {"source": "chat"}
},
{
"role": "assistant",
"content": "I'd be happy to help. Can you provide your order number?",
"timestamp": "2024-01-15T10:30:05Z",
"metadata": {"model": "claude-3"}
}
],
"total_count": 2
}| Status | Meaning |
|---|---|
| 401 | Invalid or missing API key |
| 404 | Session not found or project disabled |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
pip install guidedmind-rag-sdk-pythonYour short memory project is ready. Start storing and retrieving conversation context in your AI agent.