A tutorial uses openai.ChatCompletion.create, but the installed v1+ package rejects it.
Why this happens
The old pre-v1 module-level API and the modern client-based SDK use different interfaces. Code written for one major version should not be mixed with the other.
Answer 1: Migrate to a client instance and the Responses API
from openai import OpenAI
client = OpenAI()
response = client.responses.create(
model="gpt-5",
input="Hi",
)
print(response.output_text)
The current API reference recommends Responses for direct model requests. OpenAI API overview
