API Input and Output nodes define the interface for your deployed flow API. They specify what data the API accepts and what it returns.
API Input Node
The API Input node defines the parameters your API endpoint will accept when called.
Configuration
Define input fields with names and types:
Field Configuration:
- name: The parameter name (e.g., "text", "url", "productId")
- type: Data type (string, number, boolean, object, array)
- required: Whether the field is mandatory
- description: Help text for API documentationExample Configuration
Input Fields:
[
{
"name": "websiteUrl",
"type": "string",
"required": true,
"description": "The website URL to analyze"
},
{
"name": "maxPages",
"type": "number",
"required": false,
"description": "Maximum pages to crawl (default: 10)"
}
]Output Structure
API Input exposes each field as an output variable:
Outputs:
out.websiteUrl → Can be mapped to downstream nodes
out.maxPages → Can be used in node configurations
out → Full input objectAPI Output Node
The API Output node defines what data is returned in the API response.
Configuration
Map data from your flow to output fields:
Output Mapping:
- Map flow results to named response fields
- Transform data before returning
- Include metadata like execution time, status
- Format as JSON responseExample Mapping
Output Fields:
{
"summary": <- Prompt.out.summary
"pageCount": <- WebsiteMapper.out.totalPages
"processedAt": <- System.timestamp
"success": true
}Tip
API Input/Output nodes are only needed when deploying flows as APIs. For internal flow execution, use Dataset Source/Sink instead.
Complete API Flow Example
API Input (define parameters)
↓
Website Mapper (use input.websiteUrl)
↓
Array Splitter (split URLs)
↓
Page Scraper (scrape each page)
↓
Prompt (analyze content)
↓
Array Flatten (collect results)
↓
API Output (return formatted response)API Request/Response
Request Example
curl -X POST https://api.evaligo.com/flows/your-flow-id/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"websiteUrl": "https://example.com",
"maxPages": 5
}'Response Example
{
"summary": "Analyzed 5 pages. Main topics: Product features, Pricing, Documentation",
"pageCount": 5,
"processedAt": "2024-01-15T10:30:00Z",
"success": true,
"executionTime": "12.3s"
}Best Practices
Input Validation
- Mark required fields appropriately
- Provide clear descriptions for each parameter
- Use appropriate data types
- Set reasonable defaults for optional fields
Output Structure
- Return consistent JSON structure
- Include success/error status
- Add helpful metadata (timestamp, execution time)
- Document the response schema
Error Handling
// Success Response
{
"success": true,
"data": { ... }
}
// Error Response
{
"success": false,
"error": "Invalid URL provided",
"code": "INVALID_INPUT"
}Warning
Always validate inputs in your flow logic. API Input node defines the interface but doesn't enforce validation rules.
Advanced Patterns
Nested Input Objects
Input:
{
"config": {
"url": "https://example.com",
"options": {
"maxDepth": 2,
"timeout": 30
}
}
}
Access: input.config.url, input.config.options.maxDepthArray Inputs
Input:
{
"urls": [
"https://example1.com",
"https://example2.com"
]
}
Use with Array Splitter to process each URLConditional Processing
API Input (accepts "mode" parameter)
→ Branch based on mode value
→ Different processing paths
→ API Output (return mode-specific results)Webhook Integration
Use API nodes to create webhook endpoints:
External System → Webhook (API Input)
→ Process data in flow
→ API Output (acknowledge receipt)
→ Continue processing asynchronouslyTesting Your API
Using cURL
# Test with minimal input
curl -X POST https://api.evaligo.com/flows/flow-id/execute \
-H "Authorization: Bearer KEY" \
-d '{"url": "https://example.com"}'
# Test with all parameters
curl -X POST https://api.evaligo.com/flows/flow-id/execute \
-H "Authorization: Bearer KEY" \
-d '{
"url": "https://example.com",
"maxPages": 10,
"includeImages": true
}'Using Postman
- Import API documentation from Evaligo
- Set Authorization header with your API key
- Configure request body with test inputs
- Send request and verify response
Automated Testing
import requests
def test_api():
response = requests.post(
"https://api.evaligo.com/flows/flow-id/execute",
headers={"Authorization": f"Bearer {api_key}"},
json={"url": "https://example.com"}
)
assert response.status_code == 200
assert response.json()["success"] == TrueAPI Documentation Generation
Evaligo automatically generates OpenAPI/Swagger documentation from your API Input/Output nodes:
- Request schema from API Input configuration
- Response schema from API Output structure
- Interactive docs at
/flows/flow-id/docs - Code examples in multiple languages
Tip
Use clear, descriptive field names in API Input. They become the parameter names in your API documentation and client code.