Skip to content

Generate Image

POST
/api/image/generate
curl --request POST \
--url https://example.com/api/image/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "workflow": "flux_gguf_q4_1024", "character": "example", "characters": [ { "id": "example", "role": "example", "reference_image": "example", "lora_strength": 1 } ], "lora_checkpoint": "latest", "prompt": "portrait of a woman, natural window light, sharp focus", "negative": "blurry, low quality, watermark", "description": "The ridge at dusk, second pass", "width": 1, "height": 1, "seed": 1, "filename_prefix": "images/character_portrait", "steps": 1, "cfg": 1, "sampler": "example", "scheduler": "example", "guidance": 4, "unet": "example", "clip": "example", "vae": "example", "lora_strength": 1, "image": "images/source.png", "denoise": 1, "checkpoint": "sd_xl_base_1.0.safetensors", "workflow_params": {}, "provider": "local-gpu-1", "submit": true }'

Submit a single image generation job.

Media typeapplication/json
ImageGenerateRequest
object
workflow
required
Workflow

Workflow id to run (e.g. from GET /api/workflows)

string
>= 1 characters
character
Any of:
string
characters
Characters

Optional explicit character bindings

Array<object>
CharacterBinding
object
id
required
Id
string
>= 1 characters
role
Any of:
string
reference_image
Any of:
string
lora_strength
Any of:
number
lora_checkpoint
Any of:
string
prompt
required
Prompt

Positive prompt. Character triggers are auto-injected if missing.

string
>= 1 characters
negative
Any of:
string
description
Any of:
string
width
Any of:
integer
height
Any of:
integer
seed
Any of:
integer
filename_prefix
Any of:
string
steps
Any of:
integer
cfg
Any of:
number
sampler
Any of:
string
scheduler
Any of:
string
guidance
Guidance
number
default: 4
unet
Any of:
string
clip
Any of:
string
vae
Any of:
string
lora_strength
Lora Strength
number
default: 1
image
Any of:
string
denoise
Any of:
number
checkpoint
Any of:
string
workflow_params
Any of:
object
key
additional properties
any
provider
required
Provider

Provider id (see GET /api/providers)

string
submit
Submit

False returns workflow JSON without queueing

boolean
default: true

Successful Response

Media typeapplication/json
ImageGenerateResponse
object
ok
required
Ok
boolean
workflow
required
Workflow
string
checkpoint
Any of:
string
lora_name
Any of:
string
prompt_id
Any of:
string
number
Any of:
integer
node_errors
Any of:
object
key
additional properties
any
graph
Any of:
object
key
additional properties
any
Examplegenerated
{
"ok": true,
"workflow": "example",
"checkpoint": "example",
"lora_name": "example",
"prompt_id": "example",
"number": 1,
"node_errors": {},
"graph": {}
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}