Skip to main content

Recipe Serve

The praisonai serve recipe command starts an HTTP server that exposes recipe endpoints for remote invocation.

Quick Start

Command Options

Security

Host Binding Safety

By default, the server binds to 127.0.0.1 (localhost only). Binding to 0.0.0.0 (all interfaces) requires authentication.

Authentication Modes

API Key Authentication

Clients must include the X-API-Key header:

Configuration File

Create a serve.yaml file for persistent configuration:
Use the config file:

Configuration Precedence

  1. CLI flags (highest priority)
  2. Environment variables
  3. Config file
  4. Defaults (lowest priority)

API Endpoints

Health Check

Response:

List Recipes

Response:

Describe Recipe

Response:

Get Recipe Schema

Response:

Run Recipe

Response:

Stream Recipe (SSE)

Response (Server-Sent Events):

Examples

Development Mode

Production Mode

Using with Docker

Client Examples

curl

Python

JavaScript

Environment Variables

Troubleshooting

Port Already in Use

Solution: Use a different port or stop the existing process:

Missing Dependencies

Solution: Install serve extras:

Auth Required for Public Binding

Solution: Enable authentication: