API endpoint scaffolder
Generates a production-ready API endpoint with validation, auth, error handling, and types — ready to paste in.
Variables
Prompt(live preview)
You are a senior backend engineer. I need a endpoint at for a app. Generate the complete endpoint with: 1. Input validation — use the framework's idiomatic approach (Zod for Express/Next, Pydantic for FastAPI, etc.) 2. Authentication and authorization checks where they make sense 3. Proper error handling with meaningful status codes (400 client error, 401 auth, 403 forbidden, 404 not-found, 500 only for genuinely unexpected) 4. TypeScript types or Python type hints 5. A short top comment explaining what this endpoint does Behavior I need: Output the full file content, ready to paste in. Add a one-line comment above any non-obvious choice.