v2 - Streaming

Create Streaming Session

Create a streaming session for watching content.

Requires the viewer to have a registered wallet for USDC payments.

Rate-limited per profile AND per IP. This is DoS-critical, not merely abuse control: create_session issues a ~300k-gas OPERATOR transaction, and operator txs serialise on the operator nonce — so flooding this endpoint stalls minting, catalogue deploys and settlement platform-wide, not just streaming. The check must therefore sit BEFORE create_session.

post/v2/streaming/sessions

Request

  • Base URL
    https://api.jubjubapp.com (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Headers

Authorizationstring
X-JubJub-Service-Keystring
X-JubJub-Agent-Keystring
X-JubJub-Platform-Keystring
Originstring
Refererstring
X-JubJub-Trial-Tokenstring

Request body

content_idstring required

Content to stream

playback_grantstring nullable

Signed grant from the playback fetch (K1-2). When present its content id WINS over the body's. Required once STREAMING_REQUIRE_PLAYBACK_GRANT is enabled.

viewer_walletstring nullable

Viewer wallet address (for external wallets)

viewer_profile_idstring nullable

Viewer profile ID (if authenticated)

viewer_typestring

Viewer type: 'human' or 'agent'

card_token_idinteger nullable

Pay from this JubJub card (held by the viewer's wallet). No approval, no $0.50 floor; the card must cover one minute. 409 card_not_accepted when this piece's catalogue does not take cards.

Response

Successful Response

session_idstring required
content_idstring required
on_chain_session_idstring nullable
railstring nullable
amount_settledinteger required
max_amountinteger required
segment_countinteger
statusstring required
end_reasonstring nullable
card_token_idinteger nullable
card_balance_microinteger nullable

Changes

No recorded changes to this operation across all 1 revision of this API.