Responses API workflow: send text in input and read text back from the response.
Start here if you want a plain text answer before adding tools, schema enforcement, or multimodal inputs.
Minimal Request
Minimal Response
response.output_text is the simplest accessor in the official OpenAI SDKs.
Response Shape At A Glance
response
status
output[]
message
role
content[]
output_text
reasoning
function_call
function_call_output
image-generation item
Instructions vs Input Items
Useinstructions for high-level developer guidance and input for the actual request payload.
message items when you need multiple turns, multimodal content, or fine-grained control over roles.
Important Mental Model
Do not assume the final answer always lives atoutput[0].content[0].text.
The output array may also contain:
- reasoning items
- function calls
- function call outputs
- image-generation items
output_text is the simplest convenience accessor when you only care about concatenated text output.
Common mistakes
- assuming
output[0]is always the final assistant answer - using
inputstring format when you actually need multiple messages or multimodal parts - mixing request instructions into user content when
instructionswould be clearer