Skip to main content
POST
/
v1
/
images
/
generations
Text-to-Image Generation
curl --request POST \
  --url https://www.anyfast.ai/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "flux-1-1-pro",
  "prompt": "A cute baby polar bear",
  "n": 1,
  "size": "1024x1024",
  "output_format": "jpeg",
  "seed": 123
}
'
{
  "created": 1774002799,
  "data": [
    {
      "b64_json": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
enum<string>
required

Model ID

Available options:
flux-1-1-pro
Example:

"flux-1-1-pro"

prompt
string
required

Text description of the image to generate.

Example:

"A cute baby polar bear"

n
integer
default:1

Number of images to generate.

Required range: 1 <= x <= 4
size
string

Output image size, e.g. 1024x1024. Recommended: 1024x1024.

Example:

"1024x1024"

output_format
enum<string>

Output image format.

Available options:
jpeg,
png
Example:

"jpeg"

seed
integer

Random seed for reproducible generation.

Response

Image generated successfully

created
integer
Example:

1774002799

data
object[]