Skip to main content
Two Different API Servers: This page documents the Agent.launch() HTTP server, which uses PRAISONAI_LAUNCH_AUTH_TOKEN. For the auto-generated API server created by praisonai deploy run --type api (which uses PRAISONAI_API_TOKEN), see API Server Authentication.
HTTP REST API endpoints for agents deployed via Agent.launch() or Agents.launch().

Base URL

Default port is 8000. The server binds to 127.0.0.1 by default.
If PRAISONAI_LAUNCH_AUTH_TOKEN is set (or your process printed a one-time token because it bound to a non-loopback host), add -H "Authorization: Bearer $PRAISONAI_LAUNCH_AUTH_TOKEN" to every request below. See Authentication.

Endpoints

POST /

Send a query to the agent(s). Request:
Request Body: Response:
Response Fields:

POST //

Call a specific agent in multi-agent setup. Request:
Response:

GET //list

List available agents. Request:
Response:

GET /health

Health check endpoint. Request:
Response:

GET /

Root endpoint with welcome message. Request:
Response:

GET /docs

Swagger UI documentation. Request: Open in browser: http://localhost:8000/docs

Error Responses

Error Format:

Authentication

The Agent.launch() / Agents.launch() server binds to 127.0.0.1 by default and requires a bearer token whenever PRAISONAI_LAUNCH_AUTH_TOKEN is set. On loopback with no token, requests are keyless. Binding to a non-loopback host (0.0.0.0, a LAN IP) with no token auto-generates a one-time token and prints it to stdout. Send the token with either header:
A missing or wrong token when one is required returns:
with HTTP status 401. See Agent API Launch → Authentication for the full three-state model.

Python Client