> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mira.network/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Marketplace Flows

> Learn how to discover, integrate, and customize pre-built flows from the Mira Flows Marketplace

## Video Tutorial

<iframe width="560" height="315" src="https://www.youtube.com/embed/9Uqrz-_7Qsw" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen />

<br />

<Tip>Check out this <a href="https://github.com/B-Venkatesh7210/using-marketplace-flows" target="_blank">Github Repository</a> for a quick overview on how to use Marketplace Flows.</Tip>

<br />

**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:

1. 🛠️ **Using the Mira Flows SDK**

2. 🌐 **Direct API calls (without the SDK)**

***

## Exploring the Marketplace

To discover available flows:

1. 🚀 **Navigate to the** [**Marketplace**](https://console.mira.network/)

2. 🔎 **Browse or search for flows that fit your needs**

***

## Using Flows via the SDK

```python Python theme={null}
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 Python theme={null}
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:

1. 🔍 **Find the flow you want to use in the marketplace and view its API documentation.**

2. 📡 **Use the flow's API endpoint in your HTTP requests**

```terminal Terminal theme={null}
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 .json theme={null}
{
  "result": "LLM output"
}
```

### Example

<Card title="Use Marketplace flows" icon="github" href="https://github.com/B-Venkatesh7210/using-marketplace-flows">
  Complete example showcasing how to integrate and use Marketplace flows
  in your applications.
</Card>
