Nab theme, more professional navigation theme
Ctrl + D Favorites

Wrapping the FLUX Painting API into a Dify Workflow

2024-08-09 772

This article focuses on wrapping the publicly available flux1 drawing API (https://img.kdjingpai.com/) into a Dify workflow.

This is a test address, you can refer to this article to deploy the service yourself:White whoring FLUX1 interface shut down, resulting in a major traffic loss on this site... Well, figuring out how to deploy FLUX1 API for free

Rapid deployment source code: https://github.com/pptt121212/freefluxapi

 

1. Building workflows

Create a new "flux1 Workflow" under "Chat Assistant -> Workflow Organizer":

Wrapping the fux1 drawing API into a Dify workflow-1

In total, 3 nodes are used: start, HTTP request and direct reply. Remember the timeout settings if you timeout while debugging. Of these, the HTTP Request node is set as follows:

Wrapping the fux1 drawing API into a Dify workflow-2

The output of the direct reply node is files:Array[File] (a list of files) in the HTTP request node output variable:

Wrapping the fux1 drawing API into a Dify workflow-3

2. Test workflow

At this point the workflow is constructed, draw a picture to try. Set the prompt to: A whimsical arrangement of pink roses, pastel tulips, and baby's breath in a vintage watering can, ideal for a garden party. (A whimsical arrangement of pink roses, pastel tulips, and baby's breath in a vintage watering can, ideal for a garden party.)

Wrapping the fux1 drawing API into a Dify workflow-4

Wrapping the fux1 drawing API as a Dify workflow-5

Note: When testing, I found that for the Chinese cue word is very crotch pulling, for the English cue word is poor, right.

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

Scan the code to follow

qrcode

Contact Us

Top

en_USEnglish