# How to access and integrate a Flow?

The ‘Use’ tab within ZBrain Flow enables you to integrate your carefully crafted Flows into your actual product. This enables you to leverage the power of AI directly within your application.

<figure><img src="/files/N6X1RhsdnC3UbRFDfQbH" alt=""><figcaption></figcaption></figure>

Here's a breakdown of the key elements within the ‘Use’ tab:

#### **Flow URL** <a href="#flow-url" id="flow-url"></a>

In the ‘Use’ tab of Flow, you can find the unique URL for your Flow, which serves as the endpoint you need to POST in order to use the Flow.

#### **API key (Authorization Token)** <a href="#api-key-authorization-token" id="api-key-authorization-token"></a>

* You must include your API key in the authorization header using the bearer scheme.
* You can obtain your API key from `Settings -> My Account`

#### **Sample Curl, Javascript, and Python** <a href="#sample-curl-javascript-and-python" id="sample-curl-javascript-and-python"></a>

Use the below code snippets written in Curl, Javascript, and Python, respectively, to trigger your Flow using the Flow URL and your API key.

**Sample Curl**

```
curl --location '<Flow URL>' \ # Replace '<Flow URL>' with the actual URL of your Flow.
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 'API_KEY'' \
--data '{}
```

**Sample** **Javascript**

```
const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "Bearer 'API_KEY'");
const raw = JSON.stringify({});
const requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch('<Flow URL>', requestOptions) // Replace '<Flow URL>' with the actual URL of your Flow.
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
```

**Sample** **Python**

```
import requests
import json
url = '<Flow URL>'  # Replace '<Flow URL>' with the actual URL of your Flow.
payload = json.dumps({})
headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer 'API_KEY''
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
```

**Note**: In all code samples, replace `'<Flow URL>'` with the actual URL of your Flow and `'API_KEY'` with your actual API key.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zbrain.ai/zbrain-documentation/zbrain-builder/flows/how-to-access-and-integrate-a-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
