openaiimages demonstrates Tauri version 2's ability to take a React frontend and use it to develop desktop and mobile apps for multiple platforms using only one code base. You can develop for MacOS, Windows, Linux, Android, and iOS.
For prerequisites, see this page: Tauri prerequisites
$ cd openaiimages
$ yarn
$ yarn tauri dev
$ yarn tauri android init
$ yarn tauri android dev
$ yarn tauri ios init
$ yarn tauri ios dev
This sample app requires an OpenAI API key in order to do anything interesting. You can get a free key, with $5 USD of free usage which is enough to generate over 100 images, by signing up here [no credit card required]:
- OpenAI signup OpenAI signup
- Once you login, you can check that you have $5 of free credit Check your $5 free credit
- Then create an API key which requires your phone number to verify Create an API key
In the app, click on the gear in the lower left-hand corner to add your API key. Once you've added your OpenAI API key, simply type a prompt into the text box and click on the "Create Image" button. When the image is loaded, which usually takes about 15 seconds, there are two other features for the desktop app (Windows/Linux/MacOS):
- Rolling over the image will reveal a tooltip containing the "revised prompt" if OpenAI returned one.
iOS Android
Windows 10