ReferenceAPIREST API
REST API Reference
Complete REST API reference for GoodMem HTTP endpoints
GoodMem REST API Reference
This documentation is automatically generated from the GoodMem OpenAPI specification.
Authentication
All REST API requests require authentication via HTTP header:
- Header name:
x-api-key - Value: Your API key
Example:
curl -H "x-api-key: your_api_key_here" \
http://localhost:8080/v1/spacesError Handling
The REST API uses standard HTTP status codes:
400 Bad Request: Invalid request parameters401 Unauthorized: Invalid or missing API key403 Forbidden: Insufficient permissions for the operation404 Not Found: Requested resource does not exist429 Too Many Requests: Rate limits exceeded500 Internal Server Error: Server-side error503 Service Unavailable: Service temporarily unavailable
Endpoints
The following endpoint categories are available:
Core Operations
- API Keys - Create and manage API keys for authentication
- Spaces - Create and manage memory spaces
- Users - User management and permissions
AI/ML Services
- Embedders - Text and document embedding generation
- LLMs - Large language model integrations
- Rerankers - Result reranking for improved relevance
Data Operations
- Memories - Create, retrieve, and delete memories
System
Request Format
All requests use JSON for both request and response bodies:
// Request
POST /v1/spaces HTTP/1.1
Content-Type: application/json
x-api-key: your_api_key_here
{
"name": "My Space",
"description": "A new memory space",
"embedder_id": "embedder_123"
}
// Response
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "space_123",
"name": "My Space",
"description": "A new memory space",
"created_at": "2024-01-15T10:30:00Z"
}Getting Started
- Create an API key using Create API Key
- Set up authentication with the
x-api-keyheader - Create a space using Create Space
- Start adding memories using Create Memory
Base URL
All API endpoints are relative to:
http://localhost:8080/v1Rate Limiting
API requests are rate-limited per API key. Rate limit information is provided in the response headers:
X-RateLimit-Limit: Maximum requests per windowX-RateLimit-Remaining: Requests remaining in current windowX-RateLimit-Reset: Unix timestamp when the limit resets
Response Format
All responses return JSON with consistent structure:
Success Response:
{
"id": "resource_id",
"name": "Resource Name",
"created_at": "2024-01-15T10:30:00Z"
}Error Response:
{
"error": {
"code": "INVALID_REQUEST",
"message": "Invalid request parameters",
"details": "Field 'name' is required"
}
}Need gRPC Instead?
If you prefer high-performance binary protocols with streaming support, check out the gRPC API Reference which provides the same functionality using Protocol Buffers.