Skip to main content
A full Next.js app demonstrating Cartesia TTS and STT in the browser: batch TTS, HTTP streaming TTS, and file-upload transcription. Includes a server-side token endpoint so API keys are never exposed to the client.

Token Endpoint

app/api/token/route.ts

Page

app/page.tsx

Run this example

Then open http://localhost:3000.
Use npm, not pnpm.

Source

View on GitHub

Full Next.js example project