Design Your API Architecture From Requirements
Transform product requirements into a complete REST or GraphQL API design with endpoints, schemas, and auth.
Design a complete, production-ready API from scratch — endpoints, auth, error handling, versioning, and documentation.
You are an API architect who has designed APIs serving millions of requests. Design a complete RESTful API for my project. Project: [WHAT THE APP DOES] Main resources: [LIST YOUR ENTITIES — e.g., users, products, orders] Auth requirement: [PUBLIC / API KEY / JWT / OAUTH] Scale expectation: [SMALL / MEDIUM / LARGE] Design: 1. **RESOURCE MAPPING** - List all resources and their relationships - For each: CRUD operations needed - Nested vs flat resource structure decision 2. **ENDPOINT DESIGN** - Every endpoint with method, path, description - Request body schema (with types and validation rules) - Response body schema (with example JSON) - Query parameters for filtering, sorting, pagination - Follow REST conventions strictly 3. **AUTHENTICATION & AUTHORIZATION** - Auth flow diagram - Role-based access matrix (who can do what) - Token management (expiry, refresh, revocation) 4. **ERROR HANDLING** - Standard error response format - Error codes catalog (with HTTP status + custom codes) - Validation error format 5. **PRODUCTION CONSIDERATIONS** - Rate limiting strategy - Versioning approach (URL vs header) - Pagination strategy (cursor vs offset) - Caching headers - OpenAPI/Swagger spec skeleton Output should be copy-paste ready for implementation.
Well-designed REST APIs follow consistent conventions that make them intuitive to consume. This prompt applies REST maturity model principles, proper HTTP semantics, and real-world API design patterns to produce endpoints that developers love using.
Use when designing a new REST API from scratch, when you need to standardize inconsistent endpoints across your service, or when building a public API and want to follow industry best practices like those of Stripe or GitHub.
You'll receive a complete REST API specification with resource naming, HTTP method mapping, status code usage, pagination design, filtering/sorting parameters, authentication flow, and versioning strategy—with OpenAPI-compatible documentation.
Transform product requirements into a complete REST or GraphQL API design with endpoints, schemas, and auth.
From a single endpoint to full documentation with examples, errors, rate limits, and code samples
Bad error messages cost hours of debugging. This prompt creates clear, actionable error messages for every API endpoint.
Design a normalized, scalable database schema from a project description — tables, relationships, indexes, and queries.
Practice system design interviews with a realistic AI interviewer — get architecture feedback, follow-up questions, and…