Hi everyone,
I’m trying to use the Assistants API v2 via the official OpenAI Python SDK, but I keep getting:
400 - “The v1 Assistants API has been deprecated. Please try again by setting the header ‘OpenAI-Beta: assistants=v2’”
Here’s my setup:
openai==1.75.0
- Using
OpenAI()
client:
client = OpenAI(
api_key="...",
default_headers={"OpenAI-Beta": "assistants=v2"},
organization="org-3kEm7YOC31B1FLSMDD07lc6w"
)
- Making call:
client.beta.threads.create()
- Also confirmed that
.env
is set up properly and keys are valid - Request ID:
req_f39569f78bb838eb9393e17bacadca01
I’ve read through threads like:
- Error: The v1 Assistants API has been deprecated
- Cannot use assistants v2 stuck in v1
- I'm using v2 Assistants, but get "Error 400: Requested model 'gpt-4o' cannot be used with the Assistants API in v1"
Still no luck.
Is this a known issue where API keys need to be explicitly granted v2 access?
Would appreciate any insight — thank you!