DALL·E 2 is a new AI system by OpenAI that can create realistic images and art from a description in natural language.
On 04-Nov-22, DALL·E opened up their APIs. Using Intuiface API Explorer, you can now leverage the front end capabilities of Intuiface to talk to DALL·E servers and generate artistic / photorealistic images using text descriptions or “prompts”.
How it works
- Users must register with OpenAI and be given a private API key for DALL·E access (you’ll need a credit card to register)
- The API allows Intuiface to feed the image prompt into DALL·E over the internet
- The image is then generated on OpenAI’s servers and returned to the Intuiface experience
- The API key is used in Intuiface API Explorer to connect the two applications as per OpenAI API documentation
- The cost is $0.02 for each 1024x1024 image generated. Other sizes have different costs
- Each image generation takes about 15 seconds
How to create your own images through Intuiface
Today’s AI developments are mind-blowing and the work of the devil. And now, Paolo, you are teaching people how to harness this evil. What’s your plan!?! Thanks as usual for your intellectual generosity and for illustrating the power of Intuiface’s support for Web APIs. Coincidentally, we just published a landing page dedicated to API Explorer. The product has been on our minds as well…
Thanks @geoff. I’m thinking of potential use cases in museums, where an Intuiface XP can delight visitors beyond the originally planned content.
Thank you Paolo, as always, for sharing.
You are creating the coolest stuff and pushing the boundaries of possibility with Intuiface. I am inspired.
@shpeterson Glad you’re enjoying these experiments
I was playing around and decided to try out Stable Diffusion in Composer. Their API is quite simple and can be accessed via curl statement, which API Explorer supports in addition to Web APIs. However, the text-based query is submitted using the ‘form’ parameter, a curl nuance that is NOT supported by API Explorer.
Thanks entirely to @Seb’s help, he figured out a workaround that is API Explorer-friendly. So here is the curl statement you can give to API Explorer in order to work with Stable Diffusion:
curl -X POST ‘https://api.deepai.org/api/stable-diffusion’ -H ‘api-key: quickstart-QUdJIGlzIGNvbWluZy4uLi4K’ -H ‘Content-Type: application/x-www-form-urlencoded’ --data-urlencode ‘text=YOUR-TEXT-STATEMENT-HERE’
That API key works but 1) appears to force a long wait for image generation, 2) always generates four images, and 3) has a very small daily call limit. You can get your own Stable Diffusion API key for free - but it costs $5 minimum to generate images. Alternatively, you can install Stable Diffusion locally, on your own PC, and use it for free.
Side note: Seems the Stable Diffusion syntax for curl statements is written incorrectly. It’s written as a GET, but it needs to be a POST - which we specify above.
Good R&D here @geoff and @Seb. Thanks for sharing how to connect Intuiface to Stable Diffusion.