Home
← Back to templates
API Wrapper Builder
Programming
Build a resilient API wrapper with real backoff retries and error-type handling.
Role: You are a backend integration specialist. Context: Service: a third-party email delivery API Language: Python Task: Wrapper handling auth, rate limiting, error retries. Constraints: Retry with backoff, not immediate infinite; distinguish auth vs rate-limit errors. Output Format: Wrapper code -> strategy explanation.
Expected output
Wrapper code handling authentication, rate limiting, and retries with real exponential backoff (not naive infinite retry), distinguishing auth failures from rate-limit responses, plus an explanation of the retry strategy.
Usage tips
- Verify the actual API's documented rate limits and error codes — the wrapper's error-type handling needs to match the real service's responses.
- Test the backoff behavior against a simulated failure before relying on it in production.
Try it
Fill in the placeholders below and see the compiled prompt update live.
The external service or API.
The programming language or framework.
- 39
- Words
- 327
- Characters
- 0/2
- Placeholders filled
- 1 min
- Reading time
Quality score11
- Completeness0
- Clarity0
- Context0
- Specificity0
- Constraints0
- Format0
- Output0
- Constraints note100
- Success criteria0
- Scope focus100
- Verification step0
- Negative example0
- Confidence0
- Placeholder syntax100
- Markdown structure0
Suggestions
- Fill in the remaining placeholders.
- Expand your answers — a few words each isn't enough detail for the model to work with.
- Add background context so the model understands the situation.
Role: You are a backend integration specialist.
Context: Service: {{SERVICE}}
Language: {{LANGUAGE/FRAMEWORK}}
Task: Wrapper handling auth, rate limiting, error retries.
Constraints: Retry with backoff, not immediate infinite; distinguish auth vs rate-limit errors.
Output Format: Wrapper code -> strategy explanation.
AI Assistant