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.
Available endpoints
Section titled “Available endpoints”/api/chat- Main chat endpoint using Claude/api/summarize-messages- Message summarization/api/persona-generator- Persona generator
Less interesting
Section titled “Less interesting”/api/scenariosfrom noco/api/personasfrom 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.
External dependencies
Section titled “External dependencies”Most endpoints depend on external services.
External Services The API integrates with several third-party 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.
Deprecated
Section titled “Deprecated”/api/fal- Experimental ultra fast image generation/api/feedbackstores the user’s feedback in a private noco. Don’t use?/api/chat-openai- useapi/chatinstead