Skip to content

    FLUX.1 [schnell]

    Image

    FLUX.1-schnell

    FLUX.1 [schnell] on FlexAI: Black Forest Labs Image Gen, Apache 2.0 license, served via the OpenAI-compatible Token Factory at the live market-tracked rate.

    Pricing

    Price

    $0.00045 / image

    Pricing source

    API endpoint

    /v1/images/generations

    Compatibility

    OpenAI

    Parameters

    12B

    License

    Apache 2.0

    Hardware

    H100

    Quantization

    BF16

    Estimate your monthly cost

    images
    1,000 × $0.00045/image$0.45
    Estimated monthly cost$0.45

    Estimate only, at the current market-tracked rate. Usage-based; no minimums.

    Get an API key

    Quick Start

    import base64
    from openai import OpenAI
    
    client = OpenAI(base_url="https://tokens.flex.ai/v1", api_key="your-api-key")
    
    response = client.images.generate(
        model="FLUX.1-schnell",
        prompt="A serene mountain landscape at sunset",
        size="1024x1024",
        n=1,
    )
    
    # The API returns base64-encoded bytes in b64_json (not a URL).
    image_bytes = base64.b64decode(response.data[0].b64_json)
    with open("out.png", "wb") as f:
        f.write(image_bytes)
    
    print("Saved out.png")