How to play with O1 and O1-Pro model with images using API? And O1 still not available for assistant lol.
https://platform.openai.com/docs/guides/vision
I think I’ve seen someone say that o1 was using gtp-4o-mini or gpt-4-vision… so really, I think you can either feed the vision model output into o1 since it has 200k tokens input and 100k tokens output…
I think every release takes longer to reach the assistants, something about porting it over there
The ChatGPT versions of O1 models and what the API will offer are not equivalent.
ChatGPT Plus users were switched to an “O1”-named model that underperforms the previous “preview” version that was available, now gone.
ChatGPT Pro gives an “O1 Pro” that OpenAI has stated is different than any API “O1”. - regardless of “reasoning_effort
” used with the API “O1” model.
API users will have " o1-preview-2024-09-12
" still, along with " o1-mini-2024-09-12
". It has very limited input parameters. The quality of past documentation is degraded, replaced by o1
usage.
“o1
” also will have just a subset of parameters supported. It does add vision for image input.
“o1
”, though, is deployed to a very limited subset of tier-5 users, a slow rollout to the $1000+ paid club. (I’m still sitting here with no tier-5 access).
The Assistants API implies use of tools. No tool support = no Assistants support.
So you are correct. API developers are not treated equally. Many ChatGPT features, even a “continue” button, or editing a DALL-E image, cannot be replicated on the API.
Looks still not work, I got:
BadRequestError: Error code: 400 - {'error': {'message': 'Invalid content type. image_url is only supported by certain models.', 'type': 'invalid_request_error', 'param': 'messages.[0].content.[1].type', 'code': None}}
And here is my code:
import base64
from openai import OpenAI
client = OpenAI()
# Function to encode the image
def encode_image(image_path):
with open(image_path, "rb") as image_file:
return base64.b64encode(image_file.read()).decode("utf-8")
# Path to your image
image_path = "2025-01-12 08-48-57.png"
# Getting the base64 string
base64_image = encode_image(image_path)
response = client.chat.completions.create(
model="o1-preview-2024-09-12",
messages=[
{
"role": "user",
"content": [
{
"type": "text",
"text": "Do my work"
},
{
"type": "image_url",
"image_url": {"url": f"data:image/png;base64,{base64_image}"},
},
]
}
],
response_format={
"type": "text"
},
)
print(response.choices[0])
The error message is correct, o1-preview does not support image input.
As I said before:
That is referring to the 2024-12 announced version of o1
. Almost nobody has API access yet.
You will need to use gpt-4o
or gpt-4-turbo
for AI computer vision.
Good to know, I was expecting some kind of confirmation about this so I can decide if i stop giving OpenAI 20$ every month.
Big disappointment, confirmed by other Plus users:
I got a lot time o1 just refuse to serve me or answer the question