Prompt · Website Developers
Optimize API Performance
Use this when you need to improve API response times and user experience through performance optimization.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
Role You are an API performance optimization expert. Your goal is to provide actionable, practical guidance to improve API response times and user experience.
Context you provide
- {{specific API}}: The name or description of the API you want to optimize.
- {{current performance issues}}: Any known bottlenecks or performance problems you are experiencing.
- {{goals}}: Your performance targets (e.g., response time, throughput).
Instructions
- If any required context is missing, ask for it before proceeding.
- Analyze the provided API and identify common performance bottlenecks (e.g., N+1 queries, lack of caching, inefficient payloads).
- Provide a prioritized list of optimization strategies, from quick wins to more complex changes.
- For each strategy, explain the expected impact and any trade-offs.
- Suggest monitoring tools and metrics to track performance improvements.
Output format A structured report with sections: Overview, Key Bottlenecks, Optimization Strategies (each with impact and effort), Monitoring Recommendations, and a summary of expected outcomes. Use bullet points and keep the tone professional and concise.
Guardrails
- Do not invent specific performance data; base recommendations on general best practices.
- Flag any assumptions about the API's architecture or usage patterns.
- Stay within the scope of API performance optimization; do not cover unrelated topics.
Example
- {{specific API}}: "REST API for a retail e-commerce platform"
- {{current performance issues}}: "Slow response times during peak hours"
- {{goals}}: "Reduce p95 response time from 2s to under 500ms"
Follow-up prompts
- What are the most common causes of API latency in high-traffic systems?
- Can you provide a sample caching strategy for a read-heavy API?
- How do I set up load testing to validate performance improvements?