taikutaiku
User GuidePluginsAPI Reference
GET/v1/sessions/{session_id}/file/stream

CLI-backed binary-file route. Available to session viewers with challenge-based session auth; writer or admin access is not required. Direct session callers first fetch /api/s/{session_id}/auth-challenge, then send X-Taiku-Session-Nonce and X-Taiku-Session-Key. The plugin SDK and host bridge handle this automatically. Requests a file from the connected CLI, stages it on the server, and returns a tab-separated response of download URL and byte size. Use this for PDFs, media, and other binary files that need browser streaming or seeking support.

Authorization

sessionChallengeHeader sessionViewerProofHeader
X-Taiku-Session-Nonce<token>

One-time session auth challenge returned by /api/s/{session_id}/auth-challenge.

In: header

X-Taiku-Session-Key<token>

Base64-encoded proof of the one-time challenge, derived from the session secret.

In: header

Path Parameters

session_id*string

Current session identifier.

Query Parameters

path*string

File path to stage for streaming.

Header Parameters

X-Taiku-Session-Nonce?string

Fresh one-time challenge/nonce returned by /api/s/{session_id}/auth-challenge. Must match the nonce used to derive the session proof headers.

X-Taiku-Session-Key?string

Base64-encoded proof of the server-provided challenge, derived from the session secret for viewer access.

Response Body

text/plain

text/plain

text/plain

text/plain

text/plain

text/plain

text/plain

text/plain

curl -X GET "/api/v1/sessions/string/file/stream?path=string"
"/api/s/demo/download/abc123def456\t1048576"
"path query parameter required"

"missing session auth challenge"

"Session not found"
"No such file or directory"
"CLI not connected"

"Too many file reads in progress for this user"

"CLI did not respond"