Skip to main content

Overview

Satori provides a type-safe tRPC API for all memory operations. This API is used internally by the @usesatori/tools package and can also be called directly for custom integrations.

Base URL

For self-hosted deployments, use your own server URL.

Authentication

All API requests require authentication via the x-api-key header:
Never expose your API key in client-side code. Always make API calls from your server.

API Structure

The Satori API is organized into two main routers:

Memory Router

Operations for managing memories:
  • memory.add - Save a new memory
  • memory.search - Search for relevant memories
  • memory.getAll - Get all memories for a user
  • memory.getById - Get a specific memory by ID
  • memory.delete - Delete a memory

Keys Router

Operations for managing API keys (dashboard use):
  • keys.list - List all API keys
  • keys.create - Create a new API key
  • keys.revoke - Revoke an API key

Using tRPC Client

TypeScript/JavaScript

Install the tRPC client:
Create a typed client:

React

Use with React Query:

Rate Limits

Rate limits are per API key. Contact support for higher limits.

Error Handling

All API errors follow this format:

Common Error Codes

Example Error Response

Request/Response Format

tRPC Queries (GET operations)

Queries use GET requests with query parameters:

tRPC Mutations (POST operations)

Mutations use POST requests with JSON body:

Batch Requests

tRPC supports batching multiple requests into one HTTP call:
This sends a single HTTP request with both operations.

Health Check

Check API health:
Response:

Next Steps

Memory Operations

Explore memory management endpoints

API Key Management

Learn about key management endpoints

Integration Guide

See the API in action

Direct Client

Use the MemoryClient wrapper