Realtime WebSocket
Endpoints, request fields and response schemas for calling NeonAPI.
GET /v1/realtime
Authentication
Use your NeonAPI API key in Authorization: Bearer YOUR_API_KEY. Keep the key in a trusted application environment.
Availability and compatibility
Check the selected model’s protocol, permissions, price and supported parameters before calling. Unsupported parameters may be rejected. Request examples use placeholders.
Path and query parameters
| Field | In | Type | Required |
|---|---|---|---|
model | query | string | No |
Request fields
No request body.
Request example
Connect from a trusted server using wss://neon-api.com/v1/realtime?model=YOUR_MODEL_ID with the Authorization header. This is a WebSocket upgrade, not an HTTP JSON or SSE request. Use a compatible Realtime client and the event protocol supported by the model. Do not embed a persistent API key in browser code.
Responses
Fields vary by model and protocol. The schema below describes the documented successful response; streams use protocol-specific events.
| Status | Meaning |
|---|---|
| 101 | WebSocket upgrade |
| 400 | Invalid request |
Download the user API OpenAPI specification
See errors and streaming & tasks.