Workflow to API
Once the users have created a workflow of their choice, they can publish the entire workflow into a single API, using workflow to API feature. Users will be able to publish and test the API in the console itself. Here is how you can publish your workflow to an API:
How to publish workflows as an API?
Define Input Parameters: In the advanced tab of the input nodes, check the ‘Use as API input name’ option for each input parameter. Enter the API input parameter name. Repeat this step for each input node if you have multiple inputs.
Define Output Parameters: Similarly, for the output nodes, check the ‘Use as API output name’ option. Enter the API output parameter name.
Publish Workflow: After defining your input and output parameters, publish your workflow.You can see ‘API live” indicating your API available is ready for use.
Test Your API: You can test your API and view the ready-to-use API documentation.
Working with Image Arrays
If an image input node is connected to a parameter that accepts an array, you can also pass an array of image URLs directly in your API call. This allows you to process multiple images at once.
For example, if your input node has a key called image_urls
, you can send multiple images like this:
{
"image_urls": [
"https://example.com/image1.png",
"https://example.com/image2.png",
"https://example.com/image3.png"
]
}

Last updated