Skip to main content
POST
/
generate
/
image
/
bfl
/
flux-1-dev
Flux
curl --request POST \
  --url https://api.krea.ai/generate/image/bfl/flux-1-dev \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "Swiss chalets, balconies embroidered with Edelweiss."
}
'
{
  "job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "backlogged",
  "created_at": "2023-11-07T05:31:56Z",
  "completed_at": null,
  "result": null
}

Authorizations

Authorization
string
header
required

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

Headers

X-Webhook-URL
string<uri>

URL to receive a POST request when the job completes. The webhook will receive the job data including results.

Body

application/json
prompt
string
required
Maximum string length: 1800
strength
number
default:1
seed
number
default:455043603
steps
integer
default:25
Required range: 1 <= x <= 100
styleImages
object[]

Image prompts to use for the generation

imageStyleRefs
object[]

Style references to use for the generation

width
number
default:1024
Required range: 512 <= x <= 2368
height
number
default:1024
Required range: 512 <= x <= 2368
guidance_scale_flux
number
default:3
Required range: 0 <= x <= 24
imageUrl
string<uri>
relaxedModeAccess
boolean
styles
object[]

Styles (typically LoRAs) to use for the generation.

Note: The style must be public, trained by this API user, or shared with your workspace. Styles trained in the Krea app are owned by your user account — to use them via the API, first share them with your workspace via the app UI or POST /styles/{id}/share/workspace.

Response

The resulting job data. This will be returned in a pending state until the job is completed. See /jobs/{id} for retrieving the results.

job_id
string<uuid>
required
status
enum<string>
required
Available options:
backlogged,
queued,
scheduled,
processing,
sampling,
intermediate-complete,
completed,
failed,
cancelled
created_at
string<date-time>
required
completed_at
null
required
result
null
required