Choose the interaction contract
The official text guide positions the Responses API as the preferred REST interaction for model responses. Decide whether your workload is a one-shot transformation, a multi-turn exchange, or a streamed interface before shaping the UI.
Make storage behavior an explicit product decision. Read the current retention controls in the official guide, document what your application retains, and avoid sending data you are not authorized to process.
- One-shot: supply all context and persist only your result.
- Multi-turn: track response identifiers and define expiration behavior.
- Streaming: design partial, complete, cancelled, and failed states.
Separate instructions, data, and display
Keep stable application rules separate from user content. Normalize input before it reaches the API, then render returned text as untrusted content. This boundary makes prompt changes reviewable and output handling safer.
For a streamed UI, buffer by semantic unit and expose a stop action. Never assume the final event arrives; network interruption is a normal state.
Measure quality at the task boundary
Evaluate the result against the job it must perform: completeness, groundedness, format, latency, and cost. A model upgrade is useful only when those measures improve on your own cases.
Keep a compact regression set with ordinary, ambiguous, adversarial, and empty inputs. Run it when instructions, model configuration, or surrounding code changes.