Deployment of Flows
Deploy your flows and integrate them into applications using API endpoints
Overview
Deploy your flows to make them accessible via API endpoints. Once deployed, you can integrate your flows into your own applications, services, or trigger them from external systems.
Deployment Steps
1. Navigate to Your Flow
Navigate to Flows and select the flow you want to deploy. Open the flow editor and switch to the rocket (deployment) section.
If you are unsure about the icon, hover over it to see the description.


2. Create Deployment
Click Create Deployment and confirm. You might need to scroll down to see the confirm button.


3. Save Your API Key
An API key will be generated. Make sure to save it immediately - you won't be able to see it again.
The API key starts with sk (secret key). Do not share it with anyone.
4. Get Example Code
After deployment, click on the created deployment to view example code.


You can use this code to integrate the flow API into your own application or service.
Testing with Postman
Before integrating into your application, it's recommended to test the API using Postman.
1. Create a Collection
Create a new collection or use an existing one. For example, name it "Test Flow API", then add a new HTTP request by clicking on New.


2. Paste the cURL Command
Simply paste the complete cURL command in the URL section of Postman (highlighted in blue below).


Postman will automatically fill in all the request details from the cURL command.
3. Add Your API Key
Click on the Headers tab, where you'll find x-API-Key. Paste your full API key that you saved earlier, replacing the masked version (the one with stars).


4. Configure Request Body
If your flow accepts input data, you can modify the data under the Body tab. The default structure is:
{
"input_data": {
"param1": "value1"
}
}Replace the parameters with your actual data. If your flow doesn't require input data, you can delete this or leave it as default.
5. Send the Request
Click Send to test your deployed flow. You should receive a response with your flow's output.
Integration Examples
cURL
curl -X POST https://backend.aicuflow.com/node/deployment-trigger/af86a8a6-40f2-4b92-9f83-c9b3bafb2ccb/ \
-H "X-API-Key: sk-EuT64********oyU_O" \
-H "Content-Type: application/json" \
-d '{
"input_data": {
"param1": "value1"
}
}'Python
import requests
API_KEY = "sk-EuT64********oyU_O"
API_URL = "https://backend.aicuflow.com/node/deployment-trigger/af86a8a6-40f2-4b92-9f83-c9b3bafb2ccb/"
def trigger_deployment(input_data=None):
"""Trigger Chat Workflow Deployment - waits for completion and returns results"""
response = requests.post(
API_URL,
headers={
"X-API-Key": API_KEY,
"Content-Type": "application/json"
},
json={
"input_data": input_data or {},
}
)
if response.ok:
result = response.json()
return result["data"]
else:
raise Exception(f"API Error: {response.text}")
# Usage example with test data
result = trigger_deployment({'param1': 'value1'})
print(f"Status: {result['status']}")
print(f"Output: {result['output_data']}")
print(f"Duration: {result.get('duration_seconds')} seconds")JavaScript
const API_KEY = "sk-EuT64********oyU_O";
const API_URL =
"https://backend.aicuflow.com/node/deployment-trigger/af86a8a6-40f2-4b92-9f83-c9b3bafb2ccb/";
async function triggerDeployment(inputData = {}) {
// Waits for completion and returns results
const response = await fetch(API_URL, {
method: "POST",
headers: {
"X-API-Key": API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({ input_data: inputData }),
});
const result = await response.json();
if (result.status === "success") {
return result.data;
} else {
throw new Error(`API Error: ${result.message}`);
}
}
// Usage example with test data
const result = await triggerDeployment({
param1: "value1",
});
console.log("Status:", result.status);
console.log("Output:", result.output_data);
console.log("Duration:", result.duration_seconds, "seconds");Best Practices
Security
- Never commit API keys to version control
- Store API keys in environment variables
- Rotate API keys periodically
- Use different API keys for development and production
Error Handling
- Always handle API errors gracefully
- Check response status codes
- Implement retry logic for transient failures
- Log errors for debugging
Performance
- Cache responses when appropriate
- Use batch requests if available
- Monitor API usage and latency
- Set appropriate timeout values
Managing Deployments
- View Deployments: See all active deployments in the deployment section
- Update Deployment: Redeploy to push changes to your flow
- Delete Deployment: Remove deployments you no longer need
- Monitor Usage: Track API calls and performance metrics