Documentation Index
Fetch the complete documentation index at: https://docs.maximem.ai/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
The SDK authenticates with an API key generated when you create an Instance in the Synap Dashboard. One key per Instance; rotate or revoke at any time.See Authentication for a detailed walkthrough of API key generation and the credential lifecycle.
SDK versioning
The SDK and the underlying wire protocol are versioned. Non-breaking additions (new fields, new optional parameters) may be added within a major version without notice. Breaking changes ship in new major versions of the SDK; the upgrade path is documented in the Changelog.Pagination
List methods on the SDK return paginated results. Passpage and page_size to control the window:
Page number to retrieve. Defaults to
1.Number of items per page. Defaults to
20. Maximum 100.Rate Limiting
Requests are rate-limited per API key. When the limit is exceeded, the SDK raisesRateLimitError. Tier limits:
| Tier | Requests per minute | Burst |
|---|---|---|
| Free | 60 | 10 |
| Pro | 600 | 50 |
| Enterprise | Custom | Custom |
Correlation IDs
Every SDK call records a correlation ID — a unique identifier propagated through the full request lifecycle, including background jobs like ingestion. Access it from any SDK response:Always include the
correlation_id when contacting support. It allows the team to trace the exact request path and identify issues quickly.Error handling
The SDK raises typed exceptions for different failure classes. Each exception exposes acode (machine-readable), a message (human-readable), and a details object with context:
SynapError and split into two branches: SynapTransientError (the SDK auto-retries) and SynapPermanentError (your code must handle). Common exceptions:
| Exception | Branch | When raised |
|---|---|---|
AuthenticationError | Permanent | API key missing, invalid, or revoked |
InvalidInputError | Permanent | Request parameters invalid or missing required fields (see details) |
InvalidInstanceIdError | Permanent | Provided instance_id does not match a real instance |
InvalidConversationIdError | Permanent | Provided conversation_id is malformed |
ContextNotFoundError | Permanent | Requested instance, conversation, or memory does not exist |
SessionExpiredError | Permanent | Session expired; re-authenticate |
InsufficientCreditsError | Permanent | Wallet has insufficient credits for this operation |
ListeningAlreadyActiveError | Permanent | instance.listen() called while another stream is open |
ListeningNotActiveError | Permanent | instance.send_message() called without an active stream |
RateLimitError | Transient | Rate limit exceeded — SDK auto-retries with backoff |
NetworkTimeoutError | Transient | Request timed out — SDK auto-retries with backoff |
ServiceUnavailableError | Transient | Synap temporarily unavailable — SDK auto-retries with backoff |
AgentUnavailableError | Transient | Internal agent unavailable — SDK auto-retries with backoff |
code field), see Error Codes.
SDK installation
The official Python SDK is the primary customer interface.The JavaScript SDK is a thin Node.js wrapper around the Python SDK and requires a Python 3.11+ runtime on the host. Edge Runtime, Cloudflare Workers, Bun, Deno Deploy, and AWS Lambda Node-only runtimes are not supported on the JS SDK — those platforms need a separate backend with Python 3.11+. See Installation → JavaScript / TypeScript SDK.
See the Installation guide for full setup instructions for both SDKs.