# OpenAI image generation fails

**URL:** <https://community.glideapps.com/t/openai-image-generation-fails/74633>\
**Category:** Report a Bug\
**Created:** [July 4, 2024, 8:58pm UTC](https://community.glideapps.com/t/openai-image-generation-fails/74633 "2024-07-04T20:58:09Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![fraser](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/fraser/32/68111_2.png) [@fraser](https://community.glideapps.com/u/fraser)\
**Post date:** [July 4, 2024, 8:58pm UTC](https://community.glideapps.com/t/openai-image-generation-fails/74633/1 "2024-07-04T20:58:09Z")

</div>

**Team ID:**  
PH3L89RVIsCkbTPRJRBb

**App ID:**  
[- In the Glide builder URL, e.g.  
 `https://go.glideapps.com/app/your-app-id-here/layout`](https://go.glideapps.com/app/2unigayZn3LTa4XBR0ws/layout)

**Description**  
When I use the OpenAI text to image integration it fails, I get an error  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/e/ae049bf67604210d23d75b0b74bd27be88f59974.png)  
the integration is set up correctly as it works as expected in other apps in the same team

**How to replicate**

- Create a button
- add openai integration
- add details
- 

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/1/2160dccca524f500ef4c1fd6fec64f0b58bae670.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/f/bf74e5a18f1225bef81555213a12e4d15452ec51.png)  
click button  
get failure message

i have a credit card on file with open AI - the integration works with a different app in the same team

it could be because the integration button is on an edit page?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 5, 2024, 12:01am UTC](https://community.glideapps.com/t/openai-image-generation-fails/74633/2 "2024-07-05T00:01:01Z")

</div>

> [@fraser](#):
>
> it could be because the integration button is on an edit page?

Have you tried it outside of the edit form?

---

<div class="post-metadata">

**Author:** ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)\
**Post date:** [July 5, 2024, 10:33am UTC](https://community.glideapps.com/t/openai-image-generation-fails/74633/3 "2024-07-05T10:33:00Z")

</div>

I don’t believe 300x300 is a supported dalle-3 size. When using DALL·E 3, images can have a size of 1024x1024, 1024x1792 or 1792x1024 pixels.

[https://platform.openai.com/docs/guides/images/usage](https://platform.openai.com/docs/guides/images/usage)

---

<div class="post-metadata">

**Author:** ![fraser](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/fraser/32/68111_2.png) [@fraser](https://community.glideapps.com/u/fraser)\
**Post date:** [July 5, 2024, 7:14pm UTC](https://community.glideapps.com/t/openai-image-generation-fails/74633/4 "2024-07-05T19:14:22Z")

</div>

This seems to be very inconsistent and oddly (but thanks) both of these points help I think

The AI image never generates inside an input form - a shame as an ‘add image’ or ‘add summary’ button is a great use case.

On the item rather than edit page it works occasionally. Removing the resolution input seems to improve this I think - perhaps fails 1 in 3.

A shame - could be a great feature but too buggy to release to my users

---

<div class="post-metadata">

**Author:** ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)\
**Post date:** [July 6, 2024, 12:41am UTC](https://community.glideapps.com/t/openai-image-generation-fails/74633/5 "2024-07-06T00:41:02Z")

</div>

I have a form where on submit an image is generated and added to the newly added row. Works for me, but had issues where an query json column was used in the prompt. I had to add the query json into my action and use the result in my prompt.

---

<div class="post-metadata">

**Author:** ![fraser](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/fraser/32/68111_2.png) [@fraser](https://community.glideapps.com/u/fraser)\
**Post date:** [July 6, 2024, 9:34am UTC](https://community.glideapps.com/t/openai-image-generation-fails/74633/6 "2024-07-06T09:34:25Z")

</div>

aah interesting, so on submit works. Will try that

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 6, 2024, 10:47am UTC](https://community.glideapps.com/t/openai-image-generation-fails/74633/7 "2024-07-06T10:47:37Z")

</div>

Wouldn’t you want the users to be able to preview the image though? What about pointing the image picker and the generate image action to a column in the user profiles? That way I think you can still use a native add form, not sure about edit forms though.

---

<div class="post-metadata">

**Author:** ![fraser](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/fraser/32/68111_2.png) [@fraser](https://community.glideapps.com/u/fraser)\
**Post date:** [July 6, 2024, 11:18am UTC](https://community.glideapps.com/t/openai-image-generation-fails/74633/8 "2024-07-06T11:18:44Z")

</div>

Interesting. Do you mean saving a ‘draft’ image effectively in the user column? And then moving to the item field on submit?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 6, 2024, 11:18am UTC](https://community.glideapps.com/t/openai-image-generation-fails/74633/9 "2024-07-06T11:18:55Z")

</div>

Yes, that’s correct. I recall someone here doing it a while ago, I haven’t tried it myself (writing to user profiles columns in forms).

---

<div class="post-metadata">

**Author:** ![fraser](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/fraser/32/68111_2.png) [@fraser](https://community.glideapps.com/u/fraser)\
**Post date:** [July 28, 2024, 1:09pm UTC](https://community.glideapps.com/t/openai-image-generation-fails/74633/10 "2024-07-28T13:09:39Z")

</div>

solved this in the end by having one button which saves the text and then another which does the image which seems to work. the user profile worked too but becames a little complex. thanks!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [January 24, 2025, 1:10pm UTC](https://community.glideapps.com/t/openai-image-generation-fails/74633/11 "2025-01-24T13:10:24Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
