MixtrainDocs

Access fast image generation models through the Fal integration.

Setup

Add Provider

mixtrain provider add fal

Or via SDK:

from mixtrain import MixClient

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

Once added, Fal models are available via mixtrain model catalog.

Usage

from mixtrain import get_model

model = get_model("flux")
result = model.run({
    "prompt": "A futuristic city at sunset",
    "image_size": "landscape_16_9"
})

Available Models

Model IDDescription
fal-ai/flux/devFlux development model
fal-ai/flux-proFlux professional model
fal-ai/flux/schnellFast Flux model

Configuration Options

ParameterDescription
promptText description of the image
image_sizeOutput size (square, landscape_16_9, portrait_9_16)
num_inference_stepsQuality vs speed tradeoff
seedRandom seed for reproducibility

Getting an API Key

  1. Sign up at fal.ai
  2. Navigate to your dashboard
  3. Create an API key
  4. Add it to Mixtrain using the setup steps above

On this page