Skip to main content
POST
/
images
/
generations
Submit an image generation request
curl --request POST \
  --url https://api.maxai.lol/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "model": "<string>",
  "safetyLevel": "low",
  "scanResults": true,
  "input": {
    "positivePrompt": "<string>",
    "negativePrompt": "<string>",
    "seedImage": "<string>",
    "seedImageStrength": 0.5
  },
  "outputQuality": 50,
  "outputType": "url",
  "samples": 10,
  "CFGScale": 25.5,
  "steps": 25,
  "seed": 4611686018427388000,
  "scheduler": "<string>",
  "advancedFeatures": {
    "layerDiffuse": true
  },
  "dimensions": {
    "width": 1088,
    "height": 1088,
    "outpaint": {
      "top": 0,
      "bottom": 0,
      "left": 0,
      "right": 0
    }
  }
}
'
{
  "status": 200,
  "data": {
    "requestId": "42ebbfe9-80ba-4702-8532-8c73813bd0a8"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
requestId
string<uuid> | null

Optional unique UUID v4 for the request. If not provided, a server-generated UUID will be assigned.

model
string | null

The model to use for image generation. Defaults to '[email protected]'.

safetyLevel
enum<string> | null

Level of content moderation applied to the input prompts and images. Defaults to 'medium'.

Available options:
low,
medium,
high
scanResults
boolean | null

If true, generated images are scanned for NSFW content.

input
object
outputQuality
integer | null

Compression quality of the output image. Defaults to 95.

Required range: 1 <= x <= 99
outputType
enum<string> | null

Format returned by the API. Defaults to 'url'.

Available options:
url,
base64,
dataURI
samples
integer | null

Number of images to generate. Defaults to 1.

Required range: 1 <= x <= 20
CFGScale
number | null

Controls how closely the image adheres to the prompt. Defaults to 5.

Required range: 1 <= x <= 50
steps
integer | null

Number of inference steps for generation. Defaults to 25.

Required range: 1 <= x <= 50
seed
integer | null

Random seed for reproducibility. If not provided, a random seed is generated.

Required range: 0 <= x <= 9223372036854776000
scheduler
string | null

Scheduler used during image generation. Defaults to the model's default.

advancedFeatures
object
dimensions
object

Response

Image generation request successfully received and queued.

status
number

HTTP-style status code of the response.

Example:

200

data
object