View Source OpenaiEx.Image (openai_ex v0.5.4)

This module provides an implementation of the OpenAI images API. The API reference can be found at https://platform.openai.com/docs/api-reference/images.

Summary

Functions

Calls the image variation endpoint.

Calls the image edit endpoint.

Calls the image generation endpoint.

Functions

Link to this function

create_variation(openai, image_variation)

View Source

Calls the image variation endpoint.

Arguments

  • openai: The OpenAI configuration to use.
  • image_variation: The image variation request to send.

Returns

A map containing the response from the OpenAI API.

See the OpenAI API Create Image Variation reference for more information.

Link to this function

edit(openai, image_edit)

View Source

Calls the image edit endpoint.

Arguments

  • openai: The OpenAI configuration to use.
  • image_edit: The image edit request to send.

Returns

A map containing the response from the OpenAI API.

See the OpenAI API Create Image Edit reference for more information.

Calls the image generation endpoint.

Arguments

  • openai: The OpenAI configuration to use.
  • image: The image request to send.

Returns

A map containing the response from the OpenAI API.

See the OpenAI API Create Image reference for more information.