01 / DECIDE
Architecture decision
Use this pattern before the first production call or whenever multiple features share one credential and reliability policy.
Start with one server-owned adapter for authentication, request IDs, timeouts, and normalized errors instead of calling the platform throughout the UI. Map input, output, state, and side effects as one observable path before deciding which layer owns make the api request a product boundary.
02 / BUILD
Three-step implementation
- 01
Frame the contract
Write down the caller, data classification, success condition, timeout, cancellation, and ownership. Use this pattern before the first production call or whenever multiple features share one credential and reliability policy.
- 02
Build one narrow path
Implement one end-to-end path with request correlation, typed state, and reversible failure handling. Start with one server-owned adapter for authentication, request IDs, timeouts, and normalized errors instead of calling the platform throughout the UI.
- 03
Prove the outcome
Turn acceptance into a repeatable fixture, contract test, or browser test. A contract test proves redaction, timeout, retry classification, and propagation of the provider request identifier.
03 / BOUND
Production boundary
Keep long-lived API keys on the server, constrain outbound data, and expose cancellation and retry semantics to callers.
04 / PROVE
Acceptance evidence
A contract test proves redaction, timeout, retry classification, and propagation of the provider request identifier.
SOURCE / HTTP
Reproducible source probe
curl -fsSI 'https://developers.openai.com/api/docs/quickstart' | sed -n '1,5p'