⌨️ Codingadvancedsdkapi-clienttypescripttooling

Build an API Client / SDK

Generate a well-designed API client library with authentication, error handling, and TypeScript types.

The Prompt

prompt.txt
Build an API client/SDK for the following API. Include: typed client class with config, authentication handling, typed response models, error class hierarchy, automatic retry with backoff, request logging. Show usage examples.

API details:
- Base URL: [YOUR API URL]
- Auth: [API KEY / BEARER TOKEN]
- Endpoints: [LIST YOUR ENDPOINTS]
Language: TypeScript

Example Output

Typed SDK with LLMClient class, ApiError hierarchy (AuthError, RateLimitError, ServerError), generic request<T> method with route type inference, automatic retry on 429 and 5xx, debug interceptor via environment variable.

FAQ

Which AI model is best for Build an API Client / SDK?

Claude Sonnet 4 — excellent at TypeScript SDK design with proper generics.

How do I use the Build an API Client / SDK prompt?

Copy the prompt, replace the [BRACKETED] placeholders with your specific information, and paste into your preferred AI assistant (ChatGPT, Claude, Gemini, etc.). Typed SDK with LLMClient class, ApiError hierarchy (AuthError, RateLimitError, ServerError), generic request<T> method with route type inference, automatic retry on 429 and 5xx, debug interceptor via environment variable.