Skip to main content

Image Generation

POST 

/v1/images/generations

Generates images based on the prompt using OpenAI's image generation API.

Request

Body

Image generation query with text prompt

    prompt stringrequired

    Text description of the desired image(s)

    model string

    The model to use for image generation

    n integer

    Possible values: >= 1 and <= 1

    The number of images to generate, we currently only support one at a time

    size string

    The size of the generated images

    quality string

    The quality of the image that will be generated

    response_format string

    The format in which the generated images are returned, we only support "url"

    style string

    The style of the generated images the options are vivid and natural and does not apply to all providers

    image string

    The URL to an image you want the image model to update (Not supported by Dall-e-3)

Responses

Result of the Image Generation

Schema
    created integerrequired

    UTC timestamp of when the image was created

    data object[]required
  • Array [
  • url string

    URL of the generated image

    revised_prompt string

    If exists, the actual prompt that was processed as some providers automatically enhance them

  • ]
Loading...