# Chat AI & Image Generator (aka Synthi)

**URL:** <https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603>\
**Category:** Questions about Thunkable X\
**Created:** [January 18, 2023, 4:26am UTC](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603 "2023-01-18T04:26:13Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [January 24, 2023, 10:33pm UTC](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603/21 "2023-01-24T22:33:32Z")

</div>

**Update:** added negative prompt (see superhero image in first post above)

Negative prompts are an important aspect of creating more accurate AI-generated images. See this for a brief example of negative prompts: [Guide to negative prompts in Stable Diffusion](https://getimg.ai/guides/guide-to-negative-prompts-in-stable-diffusion)

In case you’re curious, here are the prompts I used to generate the superhero image…

**Prompt:** _Marvel superhero sitting at a desk in an office, coffee mug, laptop, digital art in the style of Todd McFarlane, trending on artstation, comic book, highly detailed, brightly colored, full body_

**Negative prompt:** _Text, writing, weird hands, weird face, weird feet, distorted, fuzzy, blurry, disjointed, mini figures, out of frame, messy, cluttered_

**Update #2:** Added a DEMO button for people who are new to AI image generation. See example in first post, above.

In case you’re curious, here are the prompts I used to generate the DEMO image:

**Prompt:** _scenic photo of a two lane slightly curvy road through redwoods, avenue of the giants, with dappled sunlight In the style of a high resolution photograph, slight crepuscular rays_

**Negative prompt:** _drawing, digital art, blurry, distorted, unclear, ugly_

**Fun fact:** I ran my first marathon a few years ago in my 40s at the Avenue of the Giants which is what the prompt is describing. The road I ran on looks almost identical to the image that was generated.

---

<div class="post-metadata">

**Author:** ![nathanburley21656](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/nathanburley21656/32/150307_2.png) [@nathanburley21656](https://community.thunkable.com/u/nathanburley21656)\
**Post date:** [February 10, 2023, 5:15pm UTC](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603/22 "2023-02-10T17:15:33Z")

</div>

Love this - loads of work in there too! Really impressive 🙂

And, wow what a place to run a marathon. I’ve travelled a lot in the US now and the Redwoods just took my breath away like nothing else.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [February 10, 2023, 5:25pm UTC](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603/23 "2023-02-10T17:25:42Z")

</div>

Thank you! Yes, it was a stunning route.

---

<div class="post-metadata">

**Author:** ![nathanburley21656](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/nathanburley21656/32/150307_2.png) [@nathanburley21656](https://community.thunkable.com/u/nathanburley21656)\
**Post date:** [February 15, 2023, 6:17pm UTC](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603/24 "2023-02-15T18:17:11Z")

</div>

So, since I wasn’t able to figure out why my Realwear AR headset won’t run the in-built Thunkable Text-2-Voice block, I wanted to see if it’ll run an API generated Text-2-Voice output instead.

~~I’ve tried running a few different T2V API’s with no luck (the all seem to output a url which I know you’ve found doesn’t work in Thunkable). So, I’ve come back to Google’s T2V API but I’m struggling with the following:~~

~~- Authentication: I’ve added “Authorization: Bearer ” to the config panel which it isn’t happy with. I’ve also tried adding it in via blocks to set the headers. Still no dice. Did you actually use an API key or did you use an OAuth 2 token?

~~1. 

~~How did you set the block up - was in Set body \> Create JSON from obj \> Create Obj?~~

_Edit: figured those out - will post something for others who follow soon._

Still working on this:  
3) How did you handle the output as it says in the docs that it’s output in base64 which I know Thunkable can’t handle.

Basically, any help in using it would be most appreciated as before! 🙂

---

<div class="post-metadata">

**Author:** ![mike.bird](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mike.bird/32/147294_2.png) [@mike.bird](https://community.thunkable.com/u/mike.bird)\
**Post date:** [February 15, 2023, 6:42pm UTC](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603/25 "2023-02-15T18:42:57Z")

</div>

This is a great implementation of A.I.!

Well done @tatiang!!

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [February 15, 2023, 7:29pm UTC](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603/26 "2023-02-15T19:29:13Z")

</div>

This has to be added to the front of the audioContent property text string:

**data:audio/wav;base64,**

---

<div class="post-metadata">

**Author:** ![nathanburley21656](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/nathanburley21656/32/150307_2.png) [@nathanburley21656](https://community.thunkable.com/u/nathanburley21656)\
**Post date:** [February 15, 2023, 8:30pm UTC](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603/27 "2023-02-15T20:30:37Z")

</div>

Hehe, so prior to your reply I found your previous post and went digging through it. I tried to implement exactly this but weirdly I can’t pull the audio code from the object which is returned from the API.

Here’s what I’m getting:

 ![thunk2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/9/3976f47d582d048d4f0ea3b0a299dd39f3331445.jpeg)  
 ![thunk3](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/9/597499d09b25d971ae89a8441ef601f3fcf98759.jpeg)

Even if I remove the ‘get object from JSON’ block at (1) I still get a null for the property of that object. If I just use the response I get {“audioContent”:“//aodihfqeioeh…”}

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [February 15, 2023, 8:39pm UTC](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603/28 "2023-02-15T20:39:46Z")

</div>

Those blocks worked for me but you need to switch the [get object from JSON] and [get property of object] block positions. The reason for this is that the green [response] block is JSON, not an object. So before you can get an object property from it, you need to convert it to an object:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/e/4eaac4f25faf32539f1778ae7a34fff532489ce9.png)

---

<div class="post-metadata">

**Author:** ![nathanburley21656](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/nathanburley21656/32/150307_2.png) [@nathanburley21656](https://community.thunkable.com/u/nathanburley21656)\
**Post date:** [February 15, 2023, 8:48pm UTC](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603/29 "2023-02-15T20:48:18Z")

</div>

Oh flippin 'eck! That’s the one combination I didn’t check. Thanks man!  
It’s working - hurrah! Interestingly, it doesn’t work via the webapp but does on my phone. I’ll test this on the headset and report back.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 17, 2023, 7:13am UTC](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603/30 "2023-03-17T07:13:55Z")

</div>

**Update:** now using GPT-4. Here’s an example, similar to what OpenAI demoed:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/2/a2759cd3e67ec94f81fe6b73298af1bbcb62d86d.png)

For comparison, here’s GPT 3.5 Turbo:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/5/25a645f6dcf0656607332e68b8cac8a3a7931ffa.png)

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [March 20, 2023, 12:59pm UTC](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603/31 "2023-03-20T12:59:05Z")

</div>

@tatiang Thank you for sharing that  
The new GPT-4 is fantastic.

---

<div class="post-metadata">

**Author:** ![nathanburley21656](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/nathanburley21656/32/150307_2.png) [@nathanburley21656](https://community.thunkable.com/u/nathanburley21656)\
**Post date:** [March 22, 2023, 1:36pm UTC](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603/32 "2023-03-22T13:36:06Z")

</div>

Awesome - do you have GPT-4 access directly of are you using some other service to wangle access?  
Also, have you got plans for it that you’re willing to talk about? I’m currently mulling over how I’m going to use the extra power considering the price increase.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 22, 2023, 6:23pm UTC](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603/33 "2023-03-22T18:23:04Z")

</div>

I have API access from OpenAI. My understanding is that the price went down significantly from GPT-3. Is that not correct?

---

<div class="post-metadata">

**Author:** ![nathanburley21656](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/nathanburley21656/32/150307_2.png) [@nathanburley21656](https://community.thunkable.com/u/nathanburley21656)\
**Post date:** [March 22, 2023, 9:14pm UTC](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603/34 "2023-03-22T21:14:27Z")

</div>

Oh you applied for GPT4 API access and got it? Yeh that’s what I want!

RE: pricing, no:  
GPT-3’s Da-vinci-003 is $0.02 / 1000 tokens. ChatGPT (GPT3.5-Turbo) dropped that to $0.002 / 1000 tokens for roughly the same performance. GPT4 though upped that back to $0.03 / 1000 tokens FOR THE PROMPT, the completion is $0.06 / 1000 tokens. the wider context window of 32k tokens is 6 / 12c respectively. I mean you’re very unlikely to test your wallet any time soon for personal stuff lol.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 22, 2023, 9:23pm UTC](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603/35 "2023-03-22T21:23:05Z")

</div>

Ah, I must have confused ChatGPT 3.5 with 4. I thought 4 was also at $0.002/1000 tokens. Thanks for that. So far, I’m the only user so it’s not a big deal but definitely a consideration if I go public with the app.

---

<div class="post-metadata">

**Author:** ![nathanburley21656](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/nathanburley21656/32/150307_2.png) [@nathanburley21656](https://community.thunkable.com/u/nathanburley21656)\
**Post date:** [March 22, 2023, 9:53pm UTC](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603/36 "2023-03-22T21:53:45Z")

</div>

Yeh, right now it’s cheap as chips!!  
So looking forward to GPT4 though, happy paying 3c / 1000t for the performance upgrade. especially when it means we can feed images in and potentially have the model annotate the images and recursively train from there! Need to take a look at what Stanford just put out too - Alpaca looks v interesting!

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 22, 2023, 11:34pm UTC](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603/37 "2023-03-22T23:34:40Z")

</div>

I can’t wait until I can upload images to GPT-4. It sounds like it won’t be long. I really don’t care about having it figure out a recipe from my fridge ingredients (although, yeah, that’s kind of fun) but being able to provide it data via drawings and existing images sounds fascinating.

---

<div class="post-metadata">

**Author:** ![mikediaz](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mikediaz/32/155764_2.png) [@mikediaz](https://community.thunkable.com/u/mikediaz)\
**Post date:** [June 20, 2023, 3:29pm UTC](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603/38 "2023-06-20T15:29:49Z")

</div>

Do you think you can share a sample template for creating stable diffusion. I have a project started and it’s coming along nicely but Open AI’'s api really sucks for it’s mobile implementation. It would be highly appreciated!

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [June 20, 2023, 7:20pm UTC](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603/39 "2023-06-20T19:20:52Z")

</div>

It’s another one of those things that I’ve spent hours working on and don’t really feel I can share freely. But if you have it set up and it’s not working properly, I (or someone else here) might be able to take a look at your blocks and see if there’s anything obvious that’s not correct.

---

<div class="post-metadata">

**Author:** ![mikediaz](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mikediaz/32/155764_2.png) [@mikediaz](https://community.thunkable.com/u/mikediaz)\
**Post date:** [June 28, 2023, 4:08am UTC](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603/40 "2023-06-28T04:08:25Z")

</div>

Understood. After working countless hours and finally figuring it out, I see why you wouldn’t want to share. It was a good learning experience. Where do you have your application posted? I would love to see the end result. I will post screenshots of mine after I workout a few kinks.

[Previous page](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603.md?page=1)

[Next page](https://community.thunkable.com/t/chat-ai-image-generator-aka-synthi/2227603.md?page=3)
