Робота з OpenAI Responses API
James Chapman
AI Curriculum Manager, DataCamp
response = client.responses.create(
model="gpt-5.4-mini",
input="What is recursion?",
)
response = client.responses.create(
model="gpt-5.4-mini",
input="What is recursion?",
)
| Model | Speed | Cost | Best For |
|---|---|---|---|
| gpt-5.4-mini | Fast | Low | Simple tasks, Q&A |
| gpt-5.5 | Moderate | Higher | Complex reasoning |
$$



response = client.responses.create( model="gpt-5.4-mini", input="Explain LLMs to a 6yr old.",reasoning={"effort": "none"})
response = client.responses.create(
model="gpt-5.4-mini",
input="Explain LLMs to a 6yr old.",
reasoning={"effort": "none"}
)
| Effort | Best For |
|---|---|
| none | Тривіальні або механічні задачі. |
| low | Прості задачі з пріоритетом швидкості й вартості. |
| medium | Типово: баланс міркування й ефективності. |
| high | Складні, багатокрокові або логічно насичені задачі. |
| xhigh | Найскладніші задачі на межі можливого |
response = client.responses.create( model="gpt-5.4-mini", input="Explain LLMs to a 6yr old.", reasoning={ "effort": "medium","summary": "auto"} )
response = client.responses.create( model="gpt-5.4-mini", input="Explain LLMs to a 6yr old.", reasoning={"effort": "none"},max_output_tokens=500)
max_output_tokens включає токени міркувань
Робота з OpenAI Responses API