Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Roadmap] Request for adding FLUX API #657

Open
1 task
darthalex2014 opened this issue Oct 4, 2024 · 0 comments
Open
1 task

[Roadmap] Request for adding FLUX API #657

darthalex2014 opened this issue Oct 4, 2024 · 0 comments

Comments

@darthalex2014
Copy link

Why
Users will be able to generate images using the FLUX model through the API, which opens up wide opportunities for creativity and automation.

Description
Adding an API for generating images using the FLUX model, including FLUX.1 [schnell], FLUX1.1 [pro], and FLUX.1 [pro].
https://www.together.ai/blog/flux-api-is-now-available-on-together-ai-new-pro-free-access-to-flux-schnell
Use our Python SDK to quickly integrate FLUX models into your applications:


import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ.get("TOGETHER_API_KEY"), base_url="https://api.together.xyz/v1"
)

response = client.images.generate(
    prompt="A cat holding a sign that says hello world"",
    model="black-forest-labs/FLUX.1-schnell",
    n=1,
)

print(response.data[0].url)

Requirements

  • Adding FLUX API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant