Using Marketplace Flows
Mira Flows offers a marketplace where you can explore and use a variety of pre-built flows. There are two primary ways to utilize these flows:
- Using the Mira Flows SDK
- Direct API calls (without the SDK)
Exploring the Marketplace
To discover available flows:
- Navigate to the Marketplace
- Browse or search for flows that fit your needs
Mira Flows offers a marketplace where you can explore and use a variety of pre-built flows. There are two primary ways to utilize these flows:
- Using the Mira Flows SDK
- Direct API calls (without the SDK)
Using flows via the SDK
python
from mira_sdk import MiraClient, Flow
# Initialize the client
client = MiraClient(config={"API_KEY": "YOUR_API_KEY"})
version = "1.0.0"
input_data = {"key": "value"}
# If no version is provided, latest version is used by default
if version:
flow_name = f"author/your-flow-name/{version}"
else:
flow_name = "author/your-flow-name"
result = client.flow.execute(flow_name, input_data)
print(result)Flow Management via SDK
python
from mira_sdk import MiraClient, Flow
# Get a flow
flow = client.flow.get("author/flow_name")
# Get flows by author
flows = client.flow.get_by_author("author")
# Get flows by tag
flows = client.flow.get_by_tag("tag")
# Search for flow
flows = client.flow.search("abcd")Direct API Calls (Without SDK)
For those who prefer not to use the SDK or are working in other programming languages, you can interact with flows directly via API calls:
- Find the flow you want to use in the marketplace and view its API documentation.
- Use the flow's API endpoint in your HTTP requests
curl --request POST \
--url https://console-bff.stg.arohalabs.dev/v1/flows/flows/{author}/{flow_name} \
--header 'MiraAuthorization: YOUR_API_KEY' \
--data '{
"input_param": "value"
}'Replace YOUR_API_KEY, author and flow_name with your actual API key, author name and flow_name and adjust the endpoint and payload structure according to the specific flow's requirements.
Response:
json
{
"result": "LLM output"
}