---
title: Generate Images
---
You can use Quivr to Generate Images using Dall-E 3 from OpenAI or any other API based image generation tool.
This allows you to leverage image generation by creating a brain that is connected to Dall-E.
## OpenAI
In order to have image generation in Quivr we will create a brain that is connected to an API. You can find more info on this types of brains [here](/getting-started/api-based-brains)
Create an account on [OpenAI](https://platform.openai.com/)
To get access to image generation, add your credit card in the `billing` section
Create on API Key and save the result
Do not share your API Key
## Create a brain
Now it is time to create an App brain. This type of brain allows you to interact with APIs. And that is exactly what we need to do now. Let's get started.
Generating images costs around 2cts per image. Be carefull or you'll have a surprised bill.
Go to the [Brains](https://www.quivr.app/brains-management) page and click on `Create Brain`
Select `App (Through API)` and click on `Next`
1. Give your brain a name.
2. Add this as your description.
```
You generate only one image and use markdown to display the url sent as a result and you need to keep the entire url with all the parameters for the image to be displayed correctly.
Do not remove the signature and password in the url of the image as it is a signed url.
Also return the revised prompt below the image in italic.
If the user ask for a modification use the previous prompt generated as base
```
3. Click on `Next`
1. Select `POST` as the method
2. Add this as the url `https://api.openai.com/v1/images/generations`
1. Add `prompt` as a parameter and click on `Required`
Description of the image to generate
2. Add `size` as a parameter and click on `Required`
By default 1024x1024 . But images can have a size of 1024x1024 (square), 1024x1792 (vertical) or 1792x1024 (horizontal) pixels
3. Add `model` as a parameter and click on `Required`
Either dall-e-3 or dall-e-2. By default dall-e-3
1. Add `Authorization` as a secret
Bearer YOUR_API_KEY
**Add your API Key in the value**
2. Add `Content-Type` as a secret and click on `Required`
application/json
**Add `application/json` in the value**
Click on `Create`
Go to the chat and ask a question to your newly created brain.
You might have to type `@` and select your brain to be able to ask a question to it.
You can now use this brain to generate images. You can also use it to generate images in your own app throught the API.
Don't hesitate to share your creations on [Twitter](https://twitter.com/quivr_brain).