MixtrainDocs

Access FLUX image generation models through the Black Forest Labs integration.

Setup

Add Provider

mixtrain provider add blackforestlabs

Or via SDK:

from mixtrain import MixClient

client = MixClient()
client.create_model_provider(
    provider_type="blackforestlabs",
    secrets={"api_key": "..."}
)

Once added, Black Forest Labs models are available via mixtrain model catalog.

Usage

from mixtrain import get_model

model = get_model("flux-pro")
result = model.run({
    "prompt": "A photorealistic portrait of a robot artist",
    "width": 1024,
    "height": 1024
})

Available Models

Model IDDescription
flux-pro-1.1Professional quality model
flux-devDevelopment/testing model
flux-schnellFast generation model

Configuration Options

ParameterDescription
promptText description of the image
widthOutput width in pixels
heightOutput height in pixels
stepsNumber of inference steps
seedRandom seed for reproducibility

Getting an API Key

  1. Sign up at blackforestlabs.ai
  2. Navigate to API settings
  3. Generate an API key
  4. Add it to Mixtrain using the setup steps above

On this page