الانتقال إلى المحتوى الرئيسي
POST
/
flux
/
images
Flux Images
curl --request POST \
  --url https://api.acedata.cloud/flux/images \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "action": "generate",
  "prompt": "a white siamese cat",
  "size": "1024x1024",
  "count": 123,
  "model": "generate",
  "image_url": "<string>",
  "callback_url": "<string>"
}
'
{
  "data": [
    {
      "seed": "pop upbeat",
      "prompt": "a christmas song",
      "image_url": "https://cdn1.suno.ai/image_75d8e08f-b25f-450e-9496-7b52e393098b.png"
    }
  ],
  "success": true
}

التفويضات

Authorization
string
header
مطلوب

الترويسات

accept
enum<string>

Specifies the format of the response from the server. If not specified, the default format is application/json. If application/x-ndjson is specified, the response will be in newline-delimited JSON format, streaming the response chunk by chunk

الخيارات المتاحة:
application/json,
application/x-ndjson

الجسم

application/json
action
enum<string>
مطلوب

The action to generate the images. If generate, the images will be generated from the prompt. If edit, the images will be edited from the prompt and the image_urls.

الخيارات المتاحة:
generate,
edit
مثال:

"generate"

prompt
string
مطلوب

The prompt which used to generate the images.

مثال:

"a white siamese cat"

size
string

Generate the size of the picture.

مثال:

"1024x1024"

count
number

Generate the number of the picture.

model
enum<string>

The model used to generate the images.

الخيارات المتاحة:
flux-dev,
flux-pro,
flux-pro-1.1,
flux-pro-1.1-ultra,
flux-kontext-pro,
flux-kontext-max
مثال:

"generate"

image_url
string

Link to the picture that needs to be edited.

callback_url
string

The callback URL which will be called when the images is generated

الاستجابة

OK, the request is successful.

data
object

The output music items generated from the prompt

success
boolean

The flag indicates the request is successful or not