API Server Introduction
The Voiceflow CLI now includes an HTTP API server that exposes test execution functionality as REST endpoints with auto-generated OpenAPI/Swagger documentation.Features
- HTTP API: Execute test suites via REST endpoints
- Real-time Logging: Capture and return test execution logs in API responses
- OpenAPI/Swagger: Auto-generated API documentation at
/swagger/index.html - Asynchronous Execution: Non-blocking test execution with status tracking
- CORS Support: Enable cross-origin requests for web frontends
- Health Checks: Built-in health check endpoints
OpenAPI Specifications
The server provides OpenAPI specifications in both YAML and JSON formats:- YAML Format: Available at
/static/swagger.yaml - JSON Format: Available at
/static/swagger.json
Starting the Server
Basic Usage
Command Line Options
Configuration
Environment Variables
The server respects all existing Voiceflow CLI environment variables:VF_API_KEY: Voiceflow API Key (from the Settings tab)OPENAI_API_KEY: OpenAI API Key (for similarity validations)