Saltar al contenido principal
POST
/
openai
/
images
/
generations
Openai Images Generations
curl --request POST \
  --url https://api.acedata.cloud/openai/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "A cute baby sea otter",
  "model": "dall-e-3",
  "background": "auto",
  "moderation": "auto",
  "n": 1,
  "output_compression": 100,
  "output_format": "png",
  "partial_images": 0,
  "size": "1024x1024",
  "quality": "auto",
  "response_format": "url",
  "style": "vivid",
  "callback_url": "<string>"
}
'
{
  "data": [
    {
      "url": "<string>",
      "b64_json": "<string>",
      "revised_prompt": "<string>"
    }
  ],
  "created": 123
}

Autorizaciones

Authorization
string
header
requerido

Encabezados

accept
enum<string>

Specifies the format of the response from the server.

Opciones disponibles:
application/json

Cuerpo

application/json
prompt
string
requerido

A text description of the desired image(s). The maximum length is 32000 characters for GPT image models, 1000 characters for dall-e-2, and 4000 characters for dall-e-3.

Ejemplo:

"A cute baby sea otter"

model
enum<string>
requerido

The model to use for image generation. Defaults to dall-e-2 unless a GPT-image-only parameter is supplied.

Opciones disponibles:
dall-e-3,
gpt-image-1,
gpt-image-1.5
background
enum<string>
predeterminado:auto

Set transparency for GPT image models. Must be transparent, opaque, or auto (default). If transparent, choose an output format that supports alpha (png/webp).

Opciones disponibles:
transparent,
opaque,
auto
moderation
enum<string>
predeterminado:auto

Content-moderation level for GPT image models. low relaxes filtering; auto applies the default.

Opciones disponibles:
low,
auto
n
integer
predeterminado:1

How many images to generate. Must be between 1 and 10. For dall-e-3, only 1 is supported.

Rango requerido: 1 <= x <= 10
Ejemplo:

1

output_compression
integer
predeterminado:100

Compression level (0-100%) for GPT image models when using webp or jpeg output formats.

Rango requerido: 0 <= x <= 100
output_format
enum<string>
predeterminado:png

Return format for GPT image models. Must be png, jpeg, or webp.

Opciones disponibles:
png,
jpeg,
webp
partial_images
integer
predeterminado:0

Number of partial images to emit during streaming (0-3). 0 returns the final image in one event.

Rango requerido: 0 <= x <= 3
size
enum<string> | null
predeterminado:auto

The size of the generated images. GPT image models: 1024x1024, 1536x1024 (landscape), 1024x1536 (portrait), or auto (default). dall-e-2: 256x256, 512x512, or 1024x1024. dall-e-3: 1024x1024, 1792x1024, or 1024x1792.

Opciones disponibles:
1024x1024,
1792x1024,
1024x1792,
1536x1024,
1024x1536,
256x256,
512x512,
auto
Ejemplo:

"1024x1024"

quality
enum<string>
predeterminado:auto

Quality of the image. GPT image models: auto (default), high, medium, low. dall-e-3: hd or standard. dall-e-2: standard.

Opciones disponibles:
auto,
high,
medium,
low,
hd,
standard
Ejemplo:

"auto"

response_format
enum<string> | null
predeterminado:url

The format in which dall-e-2/dall-e-3 images are returned: url or b64_json. Not supported for GPT image models (they always return base64).

Opciones disponibles:
url,
b64_json
Ejemplo:

"url"

style
enum<string>
predeterminado:vivid

Style for dall-e-3: vivid (hyper-real/dramatic) or natural (more neutral).

Opciones disponibles:
vivid,
natural
Ejemplo:

"vivid"

callback_url
string

Optional callback URL. When provided, the API returns a task_id immediately and POSTs the result to this URL once image generation completes. The callback payload includes task_id, trace_id, success (boolean), and the full response data or error.

Respuesta

Image generated successfully or operation performed successfully.

data
object[]
requerido
created
number
requerido