How to use Anthropic prompt caching to cut Claude API costs by up to 90% in a Next.js SaaS -- where to put cache breakpoints, how to verify cache hits, and what belongs in system vs messages.
How to build a streaming AI chat endpoint in Next.js App Router -- Server-Sent Events, token-by-token output from the Claude API, and a client hook that reads the stream without EventSource.