Code examples and usage patterns for the Archivist AI public REST API.
- Create an API key at app.myarchivist.ai/profile?section=dev
- Set your key as an environment variable:
export ARCHIVIST_API_KEY="your-api-key-here"
- Browse the examples below or explore the full API reference
| Example | Language | Description |
|---|---|---|
| quickstart.py | Python | List campaigns, characters, and sessions |
| quickstart.ts | TypeScript | Same flow using fetch |
| quests.py | Python | Create and manage quests |
| journals.py | Python | Create and list journal entries |
| ask.py | Python | RAG chat over campaign knowledge |
| pagination.py | Python | Iterate through all pages of large collections |
| error_handling.py | Python | Retry logic, rate limits, error parsing |
| types.ts | TypeScript | Importable response type definitions |
| curl/basics.sh | cURL | Common operations as shell commands |
https://api.myarchivist.ai
All endpoints require the x-api-key header for authentication.
MIT