API Integration Scaffold
Copilot Chat generates more accurate API clients when it knows the auth method, base URL, and specific endpoints upfront. Specifying typed errors and retry logic avoids the most common follow-up edits developers make to generated API code.
Create a typed API client for the {{apiName}} API in #file:{{filePath}}. Requirements: - Base URL: {{baseUrl}} - Auth: {{authMethod}} ({{authDetails}}) - Endpoints to implement: {{endpoints}} - Use fetch with proper error handling (throw typed errors) - Add request/response TypeScript interfaces for each endpoint - Include retry logic with exponential backoff (max {{maxRetries}} retries) - Add JSDoc with example usage for each method
Variables to customize
Why this prompt works
Copilot Chat generates more accurate API clients when it knows the auth method, base URL, and specific endpoints upfront. Specifying typed errors and retry logic avoids the most common follow-up edits developers make to generated API code.
What you get when you save this prompt
Your workspace unlocks powerful tools to iterate and improve.
AI Optimization
One-click improvement with structure analysis and pattern suggestions.
Version History
Track every edit. Compare versions side-by-side with word-level diffs.
Folders & Tags
Organize your library with nested folders, tags, and drag-and-drop.
$ npm i -g @promptingbox/mcpUse Everywhere
Access prompts from Claude, Cursor, ChatGPT & more via MCP integration.
Your prompts, organized
Save, version, and access your best prompts across ChatGPT, Claude, Cursor, and more.