Unable to access structured output with o1 model - receiving 404 'model not found' error

I’m trying to use the structured output feature with the o1 model but receiving a 404 error. Here’s my code:

class CalendarEvent(BaseModel):
    name: str
    date: str
    participants: list[str]

completion = client.beta.chat.completions.parse(
    model="o1",
    messages=[
        {"role": "system", "content": "Extract the event information."},
        {"role": "user", "content": "Alice and Bob are going to a science fair on Friday."},
    ],
    response_format=CalendarEvent,
)

The error I’m getting is:

openai.NotFoundError: Error code: 404 - {'error': {'message': 'The model `o1` does not exist or you do not have access to it.', 'type': 'invalid_request_error', 'param': None, 'code': 'model_not_found'}}

Is the o1 model currently available for structured output? I am on tier 5 so this should not be a problem?

I also encountered the same problem.

Hello @im.renpei and @earl.potters,

Welcome to the dev forum.

Structured outputs are supported on O1 models, commencing with o1-2024-12-17 as per the documentation here.

The error appears to indicate a lack of access to the specified model.

1 Like

Yes, I know that it’s documented that o1 structured output is supported. But the 404 error still persistent even for model o1-2024-12-17.

My only conclusion is that they have not released it to all users yet. There is no mention of a rollout or tiered permissioning.

I am encountering the same issue. Is it possible that a conflict arises, since structured output requires the beta chat completion to parse, while o1 models are only available via non-beta chat completion?

I am also encountering this issue as a Tier 5 developer

The thing is OpenAI is not giving access to tier 4 or lower devs to o1. Only tier 4

Just to reiterate what has already been said by OpenAI, o1 access is being rolled out, a large number of API users have already gained access but the order is random, so please be pateint.

1 Like

@Foxalabs

Thanks for this insight, is there a good way to check if our account has been auth’d to the latest o1 endpoint?

(aside from checking with a CURL or something)

edit here is the curl:

curl https://api.openai.com/v1/models \
  -H "Authorization: Bearer YOUR_API_KEY"