Skip to main content
Prism exposes a set of HTTP API routes under the /api path. These are Next.js Route Handlers that run on the server. All endpoints are co-located with the application — there is no separate API service.
Prism uses Appwrite for authentication. All endpoints rely on a valid Appwrite session. There are no API keys or bearer tokens — the browser sets a session cookie after login, and the server verifies it server-side. Automated clients must replicate the Appwrite session cookie.

Base URL

All paths below are relative to your Prism deployment origin.
https://<your-prism-domain>
For local development the origin is http://localhost:3000.

Request format

  • POST requests must send a JSON body with Content-Type: application/json.
  • GET requests pass parameters as URL query strings.

Response format

Most endpoints return JSON. The chat endpoint returns a Server-Sent Events (SSE) stream.

Errors

All errors follow the same shape:
{ "error": "Human-readable error message" }
Common HTTP status codes:
StatusMeaning
400Bad request — a required field is missing or invalid
500Internal server error — upstream service (Gemini, Qdrant, Appwrite) failed

Rate limits

Prism does not impose its own rate limits. Upstream services (Google Gemini, Qdrant) apply their own quotas.

Endpoint groups

Chat

Stream AI responses with RAG context, manage chat sessions, and generate session titles.

Documents

Index, delete, rename, and retrieve document content. Fetch similar-document recommendations.

Search

Run semantic vector searches across your document library.

Analytics

Retrieve UMAP-projected vector graph data for visualising document relationships.

Build docs developers (and LLMs) love