Skip to content

FLUX.1 [schnell]

IMAGEFeaturedbfl-flux-1-schnell

Engineered for speed, FLUX.1 [schnell] is an ultra-fast, step-distilled text-to-image model from Black Forest Labs. It can generate high-quality images in as few as 1 to 4 steps, making it ideal for rapid prototyping, local development, and personal projects. Released under a permissive Apache 2.0 license, it empowers developers and hobbyists in the AI art community to experiment and create without compromising on performance.

POST
/v2/workspaces/{workspace_id}/base-models/bfl-flux-1-schnell/inferences
curl --request POST \
--url https://api.app.layer.ai/api/v2/workspaces/:workspace_id/base-models/bfl-flux-1-schnell/inferences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "a knight standing in a snowy forest",
"aspect_ratio": "SQUARE_1K",
"quality": "HIGH",
"transparency": false
}'
workspace_id
required
Workspace Id

Id of the workspace that owns the resource.

string format: uuid

Id of the workspace that owns the resource.

session_name
Any of:
string

Organize this run under a named session. A new session is created if none matches.

Media typeapplication/json
FLUX.1 [schnell]
object
prompt
Prompt
string
""
aspect_ratio
Aspect Ratio
string
default: SQUARE_1K
Allowed values: SQUARE_1K PORTRAIT_2_3_1K PORTRAIT_3_4_1K PORTRAIT_9_16_1K LANDSCAPE_3_2_1K LANDSCAPE_4_3_1K LANDSCAPE_16_9_1K SQUARE_2K PORTRAIT_2_3_2K PORTRAIT_3_4_2K PORTRAIT_9_16_2K LANDSCAPE_3_2_2K LANDSCAPE_4_3_2K LANDSCAPE_16_9_2K
quality
Quality
string
default: HIGH
Allowed values: LOW MEDIUM HIGH
seed
Seed

Advanced field.

integer
nullable
guidance_scale
Guidance Scale

Advanced field.

number
default: 3.5 >= 1 <= 20 multiple of 0.5
inference_steps
Inference Steps

Advanced field.

integer
default: 4 >= 1 <= 12 multiple of 1
transparency
Transparent Background
boolean
prompt_language
Prompt Language

Advanced field.

string
nullable
Example
{
"prompt": "a knight standing in a snowy forest",
"aspect_ratio": "SQUARE_1K",
"quality": "HIGH",
"transparency": false
}

Successful Response

Media typeapplication/json
ExecuteForgeOutput
object
inference_id
required
Inference Id

Unique identifier for this forge run.

string format: uuid
status
required
InferenceStatus

Current status: IN_PROGRESS.

string
Allowed values: in_progress complete failed cancelled deleted
estimated_price_creative_units
Any of:
number
poll_interval_seconds
required
Poll Interval Seconds

Suggested polling interval in seconds.

integer
created_at
required
Created At

Timestamp of when the run was created.

string format: date-time
session_id
Any of:
string format: uuid
normalized_parameters
Any of:
NormalizedInferenceParameters

Inference parameters after model-specific normalization.

These reflect the actual values used for generation, including model defaults applied for any parameters not explicitly set.

object
width
Any of:
integer
height
Any of:
integer
batch_size
Any of:
integer
num_inference_steps
Any of:
integer
guidance_scale
Any of:
number
duration_seconds
Any of:
number
fps
Any of:
integer
Example
{
"status": "in_progress"
}

Unauthenticated — missing or invalid Bearer token.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Forbidden — insufficient permissions.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Resource not found.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Invalid input parameters.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Rate limited — too many concurrent requests.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Internal server error.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}