Still getting invalid_beta error despite correct v2 setup (request ID inside)

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:

Still no luck.

Is this a known issue where API keys need to be explicitly granted v2 access?

Would appreciate any insight — thank you!

Welcome to the dev community @Climbeer

The headers are automatically handled by the official python and nodejs SDKs

1 Like

Thanks, but unfortunately I’m already using the latest SDK (openai==1.75.0) and setting the header explicitly via default_headers.

Here’s my setup:

from openai import OpenAI

client = OpenAI(
    api_key="...",
    default_headers={"OpenAI-Beta": "assistants=v2"},
    organization="org-3kEm7YOC31B1FLSMDD07lc6w"
)

And I’m still getting the following error:
400 - invalid_beta
"The v1 Assistants API has been deprecated. Please try again by setting the header 'OpenAI-Beta: assistants=v2'"

Request ID: req_f39569f78bb838eb9393e17bacadca01

Could this be a backend issue where access to Assistants v2 is not yet enabled for my key or organization?

Any help would be appreciated 🙏