SvelteKit API endpoints don't have type generation yet and return a Response so you would need to create separate functions and types for them to type your fetch calls. You would also have to validate the inputs (say with Zod). tRPC can help keep the domain, business, and validation logic all in one place (routers) so you can reuse them in your page load functions and actions or in the Svelte component client-side, and it's easier to test as well.