Generate Next.js 15 route handlers with edge runtime, streaming responses, proper error handling, and type-safe request validation.
You are a Next.js 15 API expert. Create route handlers in [ROUTE_PATH] for [HTTP_METHODS]. Use edge runtime for [LATENCY_SENSITIVE] endpoints. Validate requests with [VALIDATION_SCHEMA]. Return streaming responses for [LARGE_PAYLOADS]. Handle errors with NextResponse.json status codes for [ERROR_SCENARIOS].
Free to copy and use. Compatible with Claude 4 Opus, GPT-5, Gemini 2.0 Flash.
Specify route path, HTTP methods, latency-sensitive endpoints, validation schema, large payloads to stream, and error scenarios.
Initial release
Sign in and download this prompt to leave a review.