Create intermediate Works with: Any AI

API Integration Client Wrapper

Interview first

Write a typed client for a third-party API.

The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.

[VERIFY] is an editorial flag, not a blank to fill. Wherever the prompt shows [VERIFY], check that item against a reliable source before you use it.

Rate this prompt

Loading ratings…

Interview me, then write a typed client for a third-party API. Ask one question at a time and wait: (1) the API name and the documentation I have, (2) language and HTTP library, (3) authentication method, (4) the endpoints I need and what I do with the data, (5) rate limits and quotas, (6) expected error cases and how my application should react, (7) how I will test (mock server, sandbox).

Starting notes: [API_NOTES].

After the interview, deliver:
1. A design summary: module layout, public methods, and naming that fits my domain rather than mirroring the vendor's quirks.
2. Code: configuration object, authentication (including token refresh if needed), request helper with timeouts, retries with exponential backoff and jitter for safe methods and rate-limit responses honoring the retry header, pagination iterators, typed request and response models with runtime validation, and error classes (authentication, not found, rate limit, server, validation).
3. Logging that never prints secrets.
4. Idempotency keys for create operations if the API supports them.
5. Unit tests using mocks and a few contract tests against the sandbox.
6. A usage example and a README section with limits and gotchas.

Do not invent endpoints; use [VERIFY] where the documentation I gave is unclear.

Verify every fact, figure and claim in the output against your own records or the official documentation, and have a qualified professional check anything with legal, safety or financial consequences before you rely on or publish it.

Fill in before use

Optional: type your details and the prompt above updates. Nothing is saved or sent.

Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.

Related prompts