Skip to content

API endpoints

Using SvelteKit we can expose server endpoints in the src/web/routes/api folder. Each endpoint must have its own folder and a +page.server.js (or .ts) file.

  • /api/chat - Main chat endpoint using Claude
  • /api/summarize-messages - Message summarization
  • /api/persona-generator - Persona generator
  • /api/scenarios from noco
  • /api/personas from sanity
  • /api/tts - Text-to-speech service using ElevenLabs
  • /api/deepgram-key - Deepgram integration for speech recognition
  • /api/feedback - User feedback handling
  • /api/summarize-sentiment - Message sentiment analysis
  • /api/summarize-graph - Generate conversation graphs

Find them all in the repository ./web/src/routes/api.

Most endpoints depend on external services.

You can use relative URLs with fetch because of Svelte: fetch('/api/chat').

The summarize-* endpoints all accept Message[] and return some kind of summary.

  • /api/fal - Experimental ultra fast image generation
  • /api/feedback stores the user’s feedback in a private noco. Don’t use?
  • /api/chat-openai - use api/chat instead