Overview
The Playground API provides endpoints for managing chat sessions, sending messages, and retrieving observability data. All endpoints (except health) require JWT authentication.Base URL
Authentication
All endpoints except/api/playground/health require JWT authentication:
Health Endpoints
GET /api/playground/health
Health check endpoint (no authentication required). Response:Session Endpoints
POST /api/playground/sessions
Create a new chat session. Request:GET /api/playground/sessions
List all sessions for the authenticated user. Request:GET /api/playground/sessions/
Get details for a specific session including message history. Path Parameters: Request:DELETE /api/playground/sessions/
Delete a session and all its messages. Request:Chat Endpoints
POST /api/playground/chat
Send a message and receive a response. Request (Non-Streaming):Observability Endpoints
GET /api/playground/observability/traces
Get OpenTelemetry traces for a session. Request:GET /api/playground/observability/logs
Get structured logs for a session. Request:GET /api/playground/observability/metrics
Get metrics for a session. Request:WebSocket API
WS /ws/playground/
Real-time bidirectional chat using WebSocket. Connection:- Client Messages
- Server Messages
Error Responses
All endpoints may return the following errors:401 Unauthorized
403 Forbidden
404 Not Found
429 Too Many Requests
500 Internal Server Error
SDK Examples
Python
JavaScript/TypeScript
Related Documentation
Playground Guide
Learn how to use the playground
Authentication API
Authentication endpoints
MCP Protocol
MCP message format
Observability
Set up monitoring
Full API access! Use these endpoints to build custom integrations with the Interactive Playground.