Advertising Disclosure: Some links may be affiliate links. This prompt library is informational and free to use. Read our methodology.

🤖 AI prompt

API Design Prompt

Design an API endpoint with request/response, errors, auth, and tests.

Copy-ready prompt

{feature}{users}{constraints}
Design an API for: {feature} Users: {users} Constraints: {constraints} Return endpoints, request/response examples, validation rules, error codes, auth considerations, rate limits, and test cases.

Variables

VariableHow to fill it
{feature}Replace with your real feature.
{users}Replace with your real users.
{constraints}Replace with your real constraints.

When to use it

Design an API endpoint with request/response, errors, auth, and tests.

Quality checks

  • Add real context before running the prompt.
  • Ask for examples if the first answer is too generic.
  • Verify facts, numbers, links, and sensitive advice.
Safety note: Do not paste passwords, private keys, confidential customer data, or regulated personal data into public AI tools.

Related prompt tools

FAQ

How do I use this prompt?
Copy it, replace the variables with real context, and ask follow-up questions to refine the output.
Can I change the structure?
Yes. Add constraints, examples, required format, and quality bar.
Is the output always correct?
No. AI output should be reviewed and verified before publishing or acting on it.