Skip to content

New gpt-image-1 model for openai_conversation.generate_image action #38826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions source/_integrations/openai_conversation.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,10 @@ with the requested image.
| ---------------------- | -------- | ------------------------------------------------------ | ---------------- |
| `config_entry` | no | Integration entry ID to use. | |
| `prompt` | no | The text to turn into an image. | Picture of a dog |
| `size` | yes | Size of the returned image in pixels. Must be one of `1024x1024`, `1792x1024`, or `1024x1792`, defaults to `1024x1024`. | 1024x1024 |
| `quality` | yes | The quality of the image that will be generated. `hd` creates images with finer details and greater consistency across the image. | standard |
| `style` | yes | The style of the generated images. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. | vivid |
| `size` | yes | Size of the returned image in pixels. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value). | 1024x1024 |
| `quality` | yes | The quality of the image that will be generated. Supported values are `high`, `medium`, `low`, and `auto` (default value). | medium |
| `background` | yes | Allows to set transparency for the background of the generated image. Must be one of `transparent`, `opaque` or `auto` (default value). When `auto` is used, the model will automatically determine the best background for the image. | transparent |
| `moderation` | yes | Control the content-moderation level for the generated image. Must be either `low` for less restrictive filtering or `auto` (default value). | auto |

{% raw %}
```yaml
Expand All @@ -99,13 +100,18 @@ data:
config_entry: abce6b8696a15e107b4bd843de722249
prompt: "Cute picture of a dog chasing a herd of cats"
size: 1024x1024
quality: standard
style: vivid
quality: high
background: opaque
moderation: auto
response_variable: generated_image
```
{% endraw %}

The response data field `url` will contain a URL to the generated image and `revised_prompt` will contain the updated prompt used.
The response data field `url` will contain a URL to the generated image. Also, the image is saved into local media files and can be used as a [media source](/integrations/media_source/).

#### Organization verification

[According to OpenAI](https://openai.com/index/image-generation-api/#get-started), some developers may need to verify their organization before being able to use the `gpt-image-1` model. You can do that in your [organization settings](https://platform.openai.com/settings/organization/general). If you don't have access to the model, the `generate_image` action will fall back to the previous `dall-e-3` model and a [repair issue](/integrations/repairs/) will be raised.

#### Example using a generated image entity

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.