curl --request GET \
--url https://api.reader.dev/v1/events \
--header 'x-api-key: <api-key>'import requests
url = "https://api.reader.dev/v1/events"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.reader.dev/v1/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.reader.dev/v1/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.reader.dev/v1/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.reader.dev/v1/events")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reader.dev/v1/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body"event: job:progress\ndata: {\"jobId\":\"j_abc\",\"status\":\"processing\",\"completed\":45,\"total\":100}\n\nevent: job:completed\ndata: {\"jobId\":\"j_abc\",\"status\":\"completed\",\"completed\":100,\"total\":100,\"creditsUsed\":100}\n\n"{
"success": false,
"error": {
"code": "unauthenticated",
"message": "Missing or invalid API key",
"docsUrl": "https://reader.dev/docs/home/concepts/errors#unauthenticated"
}
}Events stream (SSE)
Long-lived Server-Sent Events connection that emits real-time progress, completion, and failure events for every job in the workspace. Use this for dashboards and realtime UIs. For a single job, use GET /v1/jobs/{id}/stream instead.
curl --request GET \
--url https://api.reader.dev/v1/events \
--header 'x-api-key: <api-key>'import requests
url = "https://api.reader.dev/v1/events"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.reader.dev/v1/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.reader.dev/v1/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.reader.dev/v1/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.reader.dev/v1/events")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reader.dev/v1/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body"event: job:progress\ndata: {\"jobId\":\"j_abc\",\"status\":\"processing\",\"completed\":45,\"total\":100}\n\nevent: job:completed\ndata: {\"jobId\":\"j_abc\",\"status\":\"completed\",\"completed\":100,\"total\":100,\"creditsUsed\":100}\n\n"{
"success": false,
"error": {
"code": "unauthenticated",
"message": "Missing or invalid API key",
"docsUrl": "https://reader.dev/docs/home/concepts/errors#unauthenticated"
}
}Event types
| Event | Payload |
|---|---|
job:progress | { jobId, status, completed, total } |
job:completed | { jobId, status, completed, total, creditsUsed } |
job:failed | { jobId, error } |
: ping) is sent every 30 seconds so intermediate proxies don’t close the connection as idle. Most SSE clients ignore comment frames automatically.
For a stream scoped to a single job (with progress, page, error, and done events), use GET /v1/jobs/{id}/stream instead.
See Events for the full concept guide.Authorizations
Response
SSE stream that stays open until the client disconnects
Server-Sent Events stream. Each frame is a line-delimited event with an event: line, a data: line (JSON payload), and a trailing blank line. Keep-alive comments (: ping) are sent every 30 seconds. See Events for the full event catalog.
"event: job:progress\ndata: {\"jobId\":\"j_abc\",\"status\":\"processing\",\"completed\":45,\"total\":100}\n\nevent: job:completed\ndata: {\"jobId\":\"j_abc\",\"status\":\"completed\",\"completed\":100,\"total\":100,\"creditsUsed\":100}\n\n"

