Openai Text-to-Image fails

Created on 20 November 2024, 29 days ago

Text to image has failed on 2 of my websites, all at the same time. I have only tested Dalle-2 and Dalle-3 text-to-image generation. One of the websites is a test website that is completely clean with only AI modules installed and receives the same error.
Both sites use different keys with different accounts, and have credit available on the accounts.

I have tried using the AI API explorer as well as AI automators. This was working great until this afternoon then stopped on both sites at the same time.

All other functions from openAI seem to work fine, and the API is working outside of Drupal.

-------------------------------
I receive the following error on the AI generation explorer:
An error occurred
The following error occurred while processing your request:

Error invoking model response: cURL error 28: Operation timed out after 30002 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://api.openai.com/v1/images/generations

Of the following exception type:

Drupal\ai\Exception\AiRequestErrorException
--------------------------------
And the same error when using the field automator when creating content:

----------------------------------------------------------------------------------------------------
The API works when testing with cURL:

curl https://api.openai.com/v1/images/generations -u :$OPENAI_API_KEY -H 'Content-Type: application/json' -d '{"prompt": "A happy dog"}'

returns:
{
"created": 1732083143,
"data": [
{
"url": "$validURL"
}
]
}

The real URL works in a browser

🐛 Bug report
Status

Active

Version

1.0

Component

AI Core module

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024