DeepFellow DOCS

Create Image

Create an image from a prompt.

POST
/v1/images/generations
AuthorizationBearer <token>

In: header

Header Parameters

OpenAI-Organization?Openai-Organization
OpenAI-Project?Openai-Project
promptPrompt

A text description of the desired image(s).

background?Background

Allows to set transparency for the background of the generated image(s). This parameter is supported on a subset of models.Must be one of transparent, opaque or auto (default value). When auto is provided, opaque will be used. If transparent, the output format needs to support transparency, so it should be set to either png (default value) or webp.

Default"auto"
Value in"auto" | "transparent" | "opaque"
model?Model

The model to use for image generation.

Default""
moderation?Moderation

Control the content-moderation level for images generated. Must be either low for less restrictive filtering or auto (default value).

Default"auto"
n?Images number

The number of images to generate. Must be between 1 and 10.

Default1
Range1 <= value <= 4
output_compression?Output Compression

The compression level (0-100%) for the generated images. This parameter is only supported with the webp or jpeg output formats, and defaults to 95.

Default95
Range0 <= value <= 100
output_format?Output Format

The format in which the generated images are returned. Must be one of png, jpeg, or webp.

Default"png"
Value in"png" | "webp" | "jpeg"
quality?Quality

The quality of the image that will be generated. auto (default value) sets quality to medium.

Default"auto"
Value in"low" | "medium" | "high" | "auto"
response_format?Response Format

The format in which generated images are returned. Must be one of url or b64_json. Currently url is not supported.

Default"b64_json"
Value in"url" | "b64_json"
size?Size

The size of the generated images. Default (auto) size is 512x512.

Default"auto"
style?Style

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.

Default"vivid"
user?User

A unique identifier representing your end-user, which can help to monitor and detect abuse.

Default""

Response Body

curl -X POST "https://loading/v1/images/generations" \
  -H "OpenAI-Organization: 5eb7cf5a86d9755df3a6c593" \
  -H "OpenAI-Project: 5eb7cf5a86d9755df3a6c593" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "random",
    "prompt": "Black Swan",
    "size": "1024x1024"
  }'
{
  "created": 1713833628,
  "data": [
    {
      "b64_json": "..."
    }
  ],
  "usage": {
    "input_tokens": 50,
    "input_tokens_details": {
      "image_tokens": 40,
      "text_tokens": 10
    },
    "output_tokens": 50,
    "total_tokens": 100
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

We use cookies on our website. We use them to ensure proper functioning of the site and, if you agree, for purposes such as analytics, marketing, and targeting ads.