recipe.run or HTTP returns structured output or streaming progress.
How It Works
Quick Start
HTTP Client
Use the REST API from any language when the endpoint server is running (praisonai serve).
- curl
- JavaScript
Response Models
| Field | Type | Description |
|---|---|---|
ok | bool | Success status |
run_id | str | Unique run identifier |
output | Any | Recipe output |
error | str | None | Error message when failed |
trace | dict | run_id, session_id, trace_id for observability |
event_type: started, progress, completed, or error.
Best Practices
Always set timeouts
Always set timeouts
Pass
options={"timeout_sec": 30} (or higher) so long-running recipes fail predictably instead of hanging.Use session IDs for stateful workflows
Use session IDs for stateful workflows
Reuse
session_id across calls so conversation recipes retain context between requests.Read trace IDs from results
Read trace IDs from results
Log
result.trace["trace_id"] for debugging and observability correlation.Prefer the Python SDK in-process
Prefer the Python SDK in-process
Use
from praisonai import recipe when running in the same environment; use HTTP for remote or polyglot clients.Related
Endpoint Provider Registry
Register custom endpoint providers for serve and discovery
CLI Endpoints
Run and manage endpoints from the command line

