Introduction
The Genie Helper API provides programmatic access to core platform features including:- User registration and authentication
- Encrypted credential storage (platform connections, download credentials, sessions)
- Media job queue management
- AI-powered caption generation
- Genie AI agent chat interface
Base URLs
AnythingLLM Server (API endpoints)3001 (configurable via SERVER_PORT env var)
Directus Backend
8055 (configured via DIRECTUS_URL env var)
Authentication Methods
Genie Helper uses multiple authentication strategies depending on the endpoint:1. Directus JWT (User Authentication)
Most user-facing endpoints require a Directus JWT token obtained via login:2. Shared Secret (Server-to-Server)
Internal endpoints like/api/credentials/store and /api/credentials/reveal use a shared secret header:
.env file and should never be exposed to clients.
3. Admin Token (Proxied Operations)
Some endpoints use the Directus admin token server-side to perform privileged operations (e.g., user registration). This token is never exposed to clients.Rate Limiting & Tiers
Certain operations (e.g., media job enqueuing) enforce subscription tier limits via thecanPerform() validator. Responses include:
Error Handling
All endpoints return consistent error structures: Success:200- Success400- Bad request (missing required fields)401- Unauthorized (invalid/missing token)403- Forbidden (tier limit or permissions)404- Not found500- Internal server error502- Upstream service error (Ollama, Directus)
CORS & Headers
The API server is configured with permissive CORS (origin: true) for development. All endpoints accept JSON bodies:
Next Steps
Authentication
Learn about Directus JWT flows and admin tokens
Credentials API
Encrypt and decrypt platform credentials
Queue Management
Manage BullMQ media job queues
Captions
Generate AI-powered social media captions
Genie Chat
Stream AI agent responses via SSE
