API Design Prompt Template
Design a RESTful API with endpoints, request/response schemas, error codes, and versioning strategy for any application.
The Prompt
Make it specific to you
PromptITIN asks a few questions and builds a version tailored to your use case.
How to use this template
Copy the template
Click the copy button to grab the full prompt text.
Fill in the placeholders
Replace anything in [BRACKETS] with your specific details.
Paste into any AI tool
Works with ChatGPT, Claude, Gemini, Cursor, and more.
Or enhance with AI
Sign in to PromptITIN and let AI tailor the prompt to your exact situation in seconds.
Why this prompt works
The '[TRADEOFF:] note' requirement forces the AI to acknowledge design decisions rather than presenting one approach as obvious — this is what distinguishes a thoughtful design from a formulaic one. The error schema requirement per endpoint prevents the common failure of designing success paths only.
Tips for best results
- Give the AI your existing data models before running this — an API designed around your actual entities is far more accurate than one built from scratch
- Ask for OpenAPI 3.0 YAML output after the design is agreed — it becomes immediately usable in Swagger UI and code generators
- The pagination strategy decision (cursor vs offset) is the most commonly under-specified — add your expected data volume to SCALE_EXPECTATION so the AI recommends correctly
- Run this for one resource group at a time for complex applications — you'll get more detailed schemas and catch edge cases earlier