REST API
The Chucky service provides a REST endpoint for one-shot prompts. This is useful when you don’t need a persistent WebSocket session.For multi-turn conversations or streaming with tools, use the WebSocket API instead.
Endpoint
Request
Headers
Body
Options
Response Formats
JSON Response (Default)
WhenAccept: application/json or no Accept header:
SSE Response (Streaming)
WhenAccept: text/event-stream:
Error Responses
Authentication Errors
401 Unauthorized
Budget Exceeded
429 Too Many Requests
Concurrency Limit
429 Too Many Requests
Developer Budget Exceeded
402 Payment Required
Examples
cURL - JSON Response
cURL - SSE Streaming
JavaScript - Fetch with JSON
JavaScript - SSE Streaming
Python - Requests
Usage API
Check current token usage against budget limits.Endpoint
Request
Headers
Response
Response Fields
AI cost is tracked in microdollars (1 USD = 1,000,000 microdollars).
Compute time is tracked in seconds.