Skip to main content

The official Python library for the Black Forest Labs API

Project description

BFL Client - Black Forest Labs API Client

A Python client for interacting with the Black Forest Labs API.

Installation

You can install the package using either name:

pip install blackforest

Quick Start

# You can import using either name
from blackforest import BFLClient
# or
from blackforestlabs import BFLClient

# Initialize the client
client = BFLClient(api_key="your-api-key")

# Use the client to make API calls
inputs = {
        "prompt": "a beautiful sunset over mountains, digital art style",
        "width": 1024,
        "height": 768,
        "output_format": "jpeg"
    }
response = client.generate("flux-pro-1.1", inputs)

Features

  • Official Python interface for Black Forest Labs API
  • Automatic request handling and response parsing
  • Type hints for better IDE support

Requirements

  • Python 3.7+
  • requests>=2.31.0
  • pydantic>=2.0.0,
  • pillow==10.4.0,

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blackforest-0.1.1a1.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blackforest-0.1.1a1-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file blackforest-0.1.1a1.tar.gz.

File metadata

  • Download URL: blackforest-0.1.1a1.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for blackforest-0.1.1a1.tar.gz
Algorithm Hash digest
SHA256 fa415ada2655f31b7543aa32dd82b13727e066a62a921d9182325d791fdc7476
MD5 45c897165085bd1a925521743826a6e7
BLAKE2b-256 e27cbde8c3421b41362ae0e37e5d2324a4ebc1dbe4081d2fff23abe2d723ec18

See more details on using hashes here.

File details

Details for the file blackforest-0.1.1a1-py3-none-any.whl.

File metadata

  • Download URL: blackforest-0.1.1a1-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for blackforest-0.1.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 0199cb0bb5ce27e2701af47929b518e2256cc5438c0a9b0d1fd614a89bf351c9
MD5 da6cc030d6f5371ed48b97cbf2149280
BLAKE2b-256 f301ffe572850b5ebeb40e5d276e66ffe0b2cd5f28a2a7131d01cce7d07d9979

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page