Skip to content
Alphahelmstudio is early software: things will change, and some will break.What's newReport an issue

Session events after a cursor — JSON polling, or server-sent events with `Accept text/event-stream`

GET
/v1/studio/sessions/{session_id}/events
curl --request GET \
--url 'http://localhost:8300/v1/studio/sessions/example/events?since=0' \
--header 'Authorization: Bearer <token>' \
--header 'x-api-key: <x-api-key>'

The session, oldest first, each numbered by a per-session seq. JSON: the events with seq > since (at most 500) and last_seq. SSE: replays seq > since (or Last-Event-ID, which wins), then streams new ones; id: = seq, event: = the event’s type, data: = the SessionEvent JSON; : keep-alive comments every 15 s. The stream does not end by itself. An output event whose output is gone (its take deleted, or the attempt that made it retried) is left out, so seqs may skip; last_seq still moves past it.

session_id
required
string

Session UUID (malformed = 404)

since
integer
0

Cursor — the last seq the client has

Last-Event-ID
string

SSE resume: the last id: received (an integer)

Events

object
events
required
Array
One of: discriminator: type
object
seq
required

Per-session cursor

integer
>= 1
type
required
string
Allowed value: status
run_id
required
string format: uuid
ts
required
string format: date-time
data
required
object
status
required
string
Allowed values: queued running succeeded failed cancelled
error
required
string | null
host
required
string | null
resolved

Values the runner chose (a random seed, an auto length), sent with succeeded

object
seed
integer
params

<node>.<param> → the value the runner chose for a param set to "auto" (duration.frames: the predicted length); absent when none

object
key
additional properties
integer
>= 1
texts

<node>.<output> → a Text output the runner made that the user did not write (an enhancer’s prompt); absent when none

object
<= 4 properties
key
additional properties
string
>= 1 characters <= 16384 characters
attempt

The attempt this status belongs to; a queued with attempt 2 means the run is retried after its runner was lost; absent = 1

integer
>= 1 <= 2
last_seq
required

Next since (unchanged when the page is empty)

integer

Example

{
"events": [
{
"type": "status",
"data": {
"status": "queued",
"resolved": {
"params": {
"duration.frames": 89
},
"texts": {
"enhance.text": "A ginger cat asleep on a green velvet sofa, soft window light"
}
}
}
}
]
}

Missing or invalid x-api-key (Kong), or missing/invalid/expired/revoked bearer token

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Not found

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Invalid input

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Retryable

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}