OpenAPI Endpoints

Synaplan's API is fully documented using the OpenAPI (Swagger) specification. This ensures that you always have access to the latest endpoint definitions, request/response schemas, and the ability to test calls directly from your browser.

Interactive Swagger UI

Visit the interactive documentation to explore all available endpoints:

👉 https://web.synaplan.com/api/doc

OpenAI-Compatible Endpoints

For developers familiar with the OpenAI API, Synaplan provides compatible endpoints under /api/v1/chat/completions, /api/v1/images/generations, etc. This allows you to use existing OpenAI libraries by simply changing the baseURL and apiKey.

Key OpenAI Endpoints

  • POST /api/v1/chat/completions: Chat completions with support for streaming.
  • GET /api/v1/models: List available AI models (Ollama, OpenAI, Anthropic, Groq, Gemini).
  • POST /api/v1/images/generations: Image generation.
  • POST /api/v1/audio/transcriptions: Audio-to-text transcription (Whisper.cpp).

Core Synaplan Endpoints

Beyond OpenAI compatibility, Synaplan offers deep integration features:

  • Auth: /api/v1/auth/login, /api/v1/auth/me, /api/v1/auth/token.
  • Widgets: /api/v1/widgets - Manage your embeddable chat widgets.
  • Messages: /api/v1/messages - Direct access to chat messages and history.
  • Documents: /api/v1/documents - Upload and manage files for the RAG system.

Schema Generation for Developers

If you are developing a frontend in TypeScript, you can generate type-safe Zod schemas directly from our OpenAPI spec:

# In the Synaplan frontend directory
make generate-schemas

This fetches the latest spec from /api/doc.json and generates src/generated/api-schemas.ts.