responses.create is the call every later lesson extends.
The smallest useful request has two parts:
model: which model answers, for examplegpt-6-astra.input: what you are asking. It can be a plain string, or a list of messages (next lesson).
The SDK returns a Response object. The quickest way to get the text is response.output_text, a convenience property that joins all the text the model wrote. Under it is a richer structure you will meet soon.
Optional settings you will use early:
instructions: guidance for the model's behaviour (a system-level message).max_output_tokens: an upper limit on how many tokens the model may produce, a safety net for cost.
Unlike Chat Completions, there is no choices list; and unlike the old Assistants API, there is nothing to create first. One call, one answer.
By default the response is stored on OpenAI's side for 30 days, so you can look it up later in the dashboard or chain a follow-up question to it. Pass store=False if you do not want that.
Model names change often. In October 2026 the docs use gpt-6-astra in their examples; keep the model id in a single constant so you can switch it in one place.
Example
from openai import OpenAI
MODEL = "gpt-6-astra" # model names change; check the models page
client = OpenAI()
response = client.responses.create(
model=MODEL,
input="Give me three names for a pet tortoise.",
max_output_tokens=500,
)
print(response.output_text)
print(response.id) # resp_... (stored for 30 days unless store=False)Remember
client.responses.create(model=..., input=...)response.output_textgives the text quickly- Responses are stored by default;
store=Falseopts out