# GPT\_IMAGE formula

## Generate images with =GPT\_IMAGE

With GPT\_IMAGE, generate thousands of AI images in one click with the [Dall-E 3 image generation model](https://openai.com/index/dall-e-3/) from OpenAI&#x20;

<figure><img src="https://1096151144-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGl9bWvDp1A2xWk189Yux%2Fuploads%2FQiGwiuGzuZ5n7gWeCUpJ%2FGPT_IMAGE.gif?alt=media&#x26;token=d14db0e4-d4e5-4289-b856-51ae2ac0ce39" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
\=GPT\_IMAGE formula **returns the link** to the image not the image itself.

To **display the image** in Google Sheets, use the **=IMAGE(...)** formula (documented [here](https://support.google.com/docs/answer/3093333?hl=en\&sjid=17638008653091531930-EU#null))

You can **retrieve** the generated image [**in your Google Drive** "Generated images" folder](https://drive.google.com/drive/search?ths=true\&q=gpt%20workspace%20generated%20images%20type:folder)
{% endhint %}

You will need to Allow access to let =IMAGE formula fetch and display the image in your sheet

<figure><img src="https://1096151144-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGl9bWvDp1A2xWk189Yux%2Fuploads%2FwIH3ozVtO1lj6myPuf5r%2FScreenshot%202024-06-13%20at%2020.18.00.png?alt=media&#x26;token=d0a78fd9-6697-45c2-b89e-17fb33444e4d" alt=""><figcaption></figcaption></figure>

To get started, select a cell and input then use the following formula

**`=GPT_IMAGE(prompt, value, temperature, model, cache)`**

<table><thead><tr><th width="191">Parameter</th><th width="396">Description</th><th>Default</th></tr></thead><tbody><tr><td><code>prompt</code></td><td><p>the prompt describing the image you want to generate. (ex: "a cute dog wearing a baseball hat") </p><p><strong>required</strong></p></td><td>""</td></tr><tr><td><code>seed</code></td><td>Repeated requests with the same seed and parameters should return the same result</td><td>null</td></tr><tr><td><code>quality</code></td><td><code>standard</code> , <code>hd</code></td><td><code>standard</code></td></tr><tr><td><code>size</code></td><td><code>1024x1024</code> , <code>1792x1024</code> , <code>1024x1792</code></td><td><code>1024x1024</code></td></tr><tr><td><code>style</code></td><td><code>vivid</code> , <code>natural</code></td><td><code>vivid</code></td></tr><tr><td><code>bypassCache</code></td><td>Bypass the cache and query OpenAI again. The results will be differents than before.</td><td>false</td></tr></tbody></table>
