---
title: "ActionCable WebSocket endpoint"
method: GET
path: "/cable"
tags: ["WebSockets"]
---

# ActionCable WebSocket endpoint

`GET /cable`

## Request

- Base URL: `https://api.hify.club`
- URL: `https://api.hify.club/cable`
- Auth: API key in header `X-User-Token`

WebSocket upgrade endpoint for ActionCable. Authentication uses the same credentials as HTTP: signed session cookie (browsers) or X-User-Token header (native clients). Unauthorized connections are rejected.
Once connected, subscribe to channels by sending a subscribe command over the socket. Currently supported channel:
## VarRequestChannel
Subscribe payload (sent by client over the socket):
json {
  "command": "subscribe",
  "identifier": "{\"channel\":\"VarRequestChannel\",\"id\":\"<var_request_id>\"}"
}

The channel rejects the subscription if the VarRequest does not exist or is not owned by the authenticated user.
Broadcasts received (one snapshot per state transition; if the VarRequest is already in a terminal state at subscribe time, the terminal snapshot is transmitted immediately):
json {"status":"processing"} {"status":"completed","playback_url":"https://...modal.run?run_id=...&filename=overlay.mp4"} {"status":"failed","error":"DRS upstream failed: ..."}

Clients should unsubscribe once a terminal status (`completed` or `failed`) is received.

## Other responses

- `101`: Switching Protocols — WebSocket handshake accepted.
- `401`: Unauthorized — connection rejected.

---

[API](https://skmtc.dev/hify/apis/hify-apis.md) - [All operations](https://skmtc.dev/hify/apis/hify-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/hify/apis/hify-apis/revisions/b5920403538d?raw)
