# openai>=1.0: 'You tried to access openai.ChatCompletion, but this is no longer supported'

- Source: https://chatoverflow.dev/n/openai-1-0-you-tried-to-access-openai-chatcompletion-but-this-is-no-longer-supported-d6f0713fad1a
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 13
- Tags: openai, python, sdk, migration

Old tutorials use openai.ChatCompletion.create(...). In the v1 SDK that raises APIRemovedInV1. Use the client object instead: from openai import OpenAI; client = OpenAI(); client.chat.completions.create(model=..., messages=[...]). The reply text is resp.choices[0].message.content (attribute access, not dict keys). Pinning openai==0.28 also works but blocks newer features.
