PROTOCOLS
Server-Sent Events
Real-time streaming over HTTP — auto-detected, with a live event viewer, mid-stream cancellation, and full history persistence.
Auto-Detection
SSE is not a separate protocol mode — it works with regular HTTP requests. No protocol selector change needed.
Auto-detected when the response
Content-Type is text/event-streamThe Send button changes to Stop while streaming
Can also be forced via the
isSSE flag on a saved requestWorks with any HTTP method — GET or POST (e.g. OpenAI streaming uses POST)
Protocol selector stays on HTTP — no change needed
Key point: Unlike WebSocket or gRPC which require a protocol switch, SSE is just a regular HTTP response with a streaming body. You build your request exactly like any other HTTP request.
Stream Tab
A Stream tab appears in the response viewer when SSE is detected. Events render live as they arrive — no waiting for the stream to end.
Each event shows: event type (if specified), data payload, timestamp, and optional id
Events are numbered sequentially (1, 2, 3…)
Total event count and stream duration shown in the tab header
The Body tab shows the accumulated raw text (all events concatenated)
JSON pretty-printing: If an event's data payload is valid JSON, it is automatically pretty-printed in the Stream tab for readability.
Event Format
API Studio supports the standard SSE wire format:
event: message
data: {"text": "Hello"}
id: 1
event: message
data: {"text": "World"}
id: 2
| Field | Description |
|---|---|
| event: | Optional event type name (defaults to "message") |
| data: | The payload — can be multi-line (multiple data: lines are joined) |
| id: | Optional event ID for reconnection tracking |
| \n\n | Double newline separates events |
Multi-line data: fields are automatically joined into a single payload in the Stream tab display.
Cancelling Mid-Stream
Click the Stop button to cancel the stream at any time.
Events received so far are preserved in the Stream tab
Response time shows as stream duration (total time connected)
History entry saves all events received up to cancellation
Common Use Cases
OpenAI / Anthropic chat completions with
"stream": trueReal-time notifications and feeds
Log streaming and monitoring
CI/CD build status updates
Examples
OpenAI streaming
POST https://api.openai.com/v1/chat/completions
{
"model": "gpt-4",
"messages": [{"role": "user", "content": "Hello"}],
"stream": true
}
Public test endpoint
GET https://sse.dev/test
Tips
SSE responses can be large — the Body tab accumulates all data
For very long streams, consider cancelling periodically to free memory
SSE works through proxies that support chunked transfer encoding
If auto-detection doesn't trigger, set
isSSE: true on the saved requestAuth headers work normally — SSE is just HTTP with a streaming response
History saves an
events[] array with id, event, data, and timestamp per event