OpenAI.Images (openai_client v0.5.3)

Given a prompt and/or an input image, the model will generate a new image.

Related guide: Image generation

https://platform.openai.com/docs/api-reference/images

Link to this section Summary

Functions

Creates an image given a prompt.

Creates an edited or extended image given an original image and a prompt.

Creates a variation of a given image.

Link to this section Types

Link to this type

create_edit_params()

@type create_edit_params() :: %{
  :image => String.t(),
  optional(:mask) => String.t(),
  :prompt => String.t(),
  optional(:n) => integer(),
  optional(:size) => String.t(),
  optional(:response_format) => String.t(),
  optional(:user) => String.t()
}
Link to this type

create_params()

@type create_params() :: %{
  :prompt => String.t(),
  optional(:n) => integer(),
  optional(:size) => String.t(),
  optional(:response_format) => String.t(),
  optional(:user) => String.t()
}
Link to this type

create_variation_params()

@type create_variation_params() :: %{
  :image => String.t(),
  optional(:n) => integer(),
  optional(:size) => String.t(),
  optional(:response_format) => String.t(),
  optional(:user) => String.t()
}

Link to this section Functions

Link to this function

create(client, params, opts \\ [])

Creates an image given a prompt.

Link to this function

create_edit(client, params, opts \\ [])

Creates an edited or extended image given an original image and a prompt.

Link to this function

create_variation(client, params, opts \\ [])

Creates a variation of a given image.