Recipe Serve
Thepraisonai recipe serve command starts an HTTP server that exposes recipe endpoints for remote invocation.
Quick Start
Command Options
| Option | Description | Default |
|---|---|---|
--port <num> | Server port | 8765 |
--host <addr> | Server host | 127.0.0.1 |
--auth <type> | Auth type: none, api-key, jwt | none |
--api-key <key> | API key for authentication | - |
--reload | Enable hot reload (dev mode) | false |
--preload | Preload all recipes on startup | false |
--recipes <list> | Comma-separated recipe names to serve | all |
--config <path> | Path to serve.yaml config file | - |
Security
Host Binding Safety
By default, the server binds to127.0.0.1 (localhost only). Binding to 0.0.0.0 (all interfaces) requires authentication.
Authentication Modes
API Key Authentication
X-API-Key header:
Configuration File
Create aserve.yaml file for persistent configuration:
Configuration Precedence
- CLI flags (highest priority)
- Environment variables
- Config file
- Defaults (lowest priority)
API Endpoints
Health Check
List Recipes
Describe Recipe
Get Recipe Schema
Run Recipe
Stream Recipe (SSE)
Examples
Development Mode
Production Mode
Using with Docker
Client Examples
curl
Python
JavaScript
Environment Variables
| Variable | Description |
|---|---|
PRAISONAI_API_KEY | API key for authentication |
PRAISONAI_SERVE_HOST | Default host |
PRAISONAI_SERVE_PORT | Default port |

