GPT-4-Vision-Preview changed API?

Hi, could it be that there has been some kind of change to the GPT-4-Vision-Preview API? It now throws an error: Analysis: {“error”:{“code”:null,“message”:“2 validation errors for Request\nbody → prompt\n field required (type=value_error.missing)\nbody → messages\n extra fields not permitted (type=value_error.extra)”,“param”:null,“type”:“invalid_request_error”}}

Suggesting that a needs a “prompt” field and no longer accepts “messages”.

I have not been able to find any docs on this.

My code used is:

headers = {
“Content-Type”: “application/json”,
“Authorization”: f"Bearer {ahead_openai_api_key}"
}

        payload = {
            "model": "gpt-4-vision-preview",
            "messages": [
                {
                    "role": "user",
                    "content": [
                        {
                            "type":"text",
                            "text":"Please describe this picture."
                        },
                        {
                            "type": "image",
                            "data": image_data
                        }
                    ]
                }
            ],
            "max_tokens": 300
        }

        analysis_response = requests.post("https://api.openai.com/v1/completions", headers=headers, json=payload)

Are you still having the same issue? I’m geting a 429 error from this API with all my requests. This used to work, of course, and my requests haven’t changed.

The original poster likely realized the error of sending to the wrong URL, the one for completions models that would take a prompt.

429 usually means you have no prepaid credits available to fund your API call, which also may be the type of error you get if you were just automatically moved off of monthly billing.

Indeed I have - I should have stuck closer to the documentation, sorry.