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 /v1 on the instance root — https://web.synaplan.com/v1 (not /api/v1, which is Synaplan's own REST API). Point an existing OpenAI SDK at that baseURL with a Synaplan API key and it works.

Key OpenAI Endpoints

  • POST /v1/chat/completions: Chat completions with streaming, client-side function calling, and — when enabled for the key — server-side tools (your MCP servers, web search).
  • GET /v1/models: List the AI models enabled on the instance (OpenAI, Anthropic, Google, Groq, Mistral, xAI, TrustedTokens, A2Agent, HuggingFace, Ollama, Cloudflare, and more). This is the live, authoritative model list. For the per-model token prices behind that list, call GET /api/v1/config/models, which returns priceIn and priceOut alongside each entry.
  • POST /v1/audio/transcriptions: Audio-to-text transcription (Whisper and the other catalog speech-to-text models), plus streaming transcription sessions under /v1/audio/transcriptions/sessions.

There is no /v1/images/generations: image, video and audio generation run through Synaplan's own chat pipeline (see Code Examples). The Anthropic-compatible sibling — POST /v1/messages for Claude Code — is documented on Claude Code (Anthropic API). The complete reference with request bodies, error format and SDK snippets is OPENAI_COMPATIBLE_API.md in the main repository.

Core Synaplan Endpoints

Beyond OpenAI compatibility, Synaplan offers deep integration features under /api/v1:

  • Auth: /api/v1/auth/login, /api/v1/auth/me, /api/v1/auth/token (short-lived SSE token).
  • Chat: /api/v1/messages/send + /api/v1/messages/stream (SSE), /api/v1/messages/history, /api/v1/chats.
  • Files & knowledge: /api/v1/files (list), /api/v1/files/upload (multipart files[], group_key, process_level), /api/v1/rag/search.
  • Widgets: /api/v1/widgets — manage your embeddable chat widgets; /api/v1/widget/{widgetId}/… is the public visitor API the widget script uses.
  • Assistants, tools, sharing, groups: /api/v1/agents, /api/v1/tools, /api/v1/shares, /api/v1/groups/mine, /api/v1/admin/groups.
  • Realtime: /api/v1/realtime/token, /api/v1/realtime/subscribe — Centrifugo connection and subscription JWTs.

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.