Responses API output items
Output sequence
A response can contain different item types. In an original delivery-support fixture, the first item asks for a shipment lookup and a later item contains the customer message. Selecting output[0] as the answer loses the lookup and may expose an internal request to the customer.
Check the item type first. Dispatch accordingly, preserving the items needed for the next turn. Before presenting text, inspect completion status and the content blocks you support. Treat a refusal or incomplete response as its own outcome, not as an empty successful answer.
Contract practice
The official Responses reference, checked November 14, 2026, defines the live API contract. This notebook uses a small original mock envelope so every learner gets the same edge cases. It does not call the API, measure latency or reproduce every item type.
Continue with function-result correlation and output validation.