Skip to content

Add support for generating images using models hosted on Together AI - #976

Merged
iamdharmesh merged 10 commits into
developfrom
feature/together-ai-image-gen
Aug 18, 2025
Merged

iamdharmesh merged 10 commits into
developfrom
feature/together-ai-image-gen

Conversation

@dkotter

@dkotter dkotter commented Aug 15, 2025 •

Copy link
Copy Markdown
Collaborator

Description of the Change

This PR brings support for the Together AI platform within the Image Generation Feature. Together AI allows you to easily make API requests to lots of different models that they host, with many of these models being open source.

For image generation, they currently have 13 different models you can choose from, with one of those (FLUX.1 [schnell] Free) being completely free, though limited to I think 3 requests per minute and only a single image generated at a time. Other models will provide better quality results with fairly reasonable pricing (typically around 5 cents per image).

I envision this being the first step to integrating Together AI across all of our other Features, as they have multiple models for text generation, transcription, text to speech, moderation and embeddings. By adding this as a Provider for all of those, someone can more easily use various open source models and have better control over where their data is sent. I see this as a middle ground between someone going the completely self-hosted route (which we support using Ollama) and someone using a non-open-source solution like OpenAI.

How to test the Change

  1. You'll need to create a Together AI account first. This was pretty easy and did not require any payment information to be entered. In fact, I was prompted after to add some additional business details and in return, was given a $1 credit to try things
  2. Once your account is created, generate an API key
  3. Configure the Image Generation Feature to use Together AI, pasting in your API key
  4. Save settings and if valid, the model dropdown will be populated with all available image models
  5. Recommend choosing the FLUX.1 [schnell] Free model to avoid any costs
  6. Try generating an image and ensure that works

Changelog Entry

Added - Support for Together AI as a Provider for Image Generation, allowing the generation of images using open source models hosted by Together AI

Credits

Props @dkotter

Checklist:

@dkotter dkotter added this to the 3.6.0 milestone Aug 15, 2025
@dkotter dkotter self-assigned this Aug 15, 2025
@dkotter
dkotter requested review from a team and jeffpaul as code owners August 15, 2025 15:28
@github-actions github-actions Bot added the needs:code-review This requires code review. label Aug 15, 2025
iamdharmesh
iamdharmesh previously approved these changes Aug 18, 2025

@iamdharmesh iamdharmesh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good and I have tested it using FLUX.1 [schnell] Free model and it works well. Add minor note to discuss otherwise we are good to go here.

Comment thread src/js/settings/components/provider-settings/together-ai-images.js Outdated
@github-project-automation github-project-automation Bot moved this from Code Review to QA Testing in Open Source Practice Aug 18, 2025
…s.js

Co-authored-by: Dharmesh Patel <dspatel44@gmail.com>
@iamdharmesh
iamdharmesh merged commit 66bba98 into develop Aug 18, 2025
@iamdharmesh
iamdharmesh deleted the feature/together-ai-image-gen branch August 18, 2025 16:30
@github-project-automation github-project-automation Bot moved this from QA Testing to Done in Open Source Practice Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:code-review This requires code review.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants