---
title: "Create Streaming Session"
method: POST
path: "/v2/streaming/sessions"
tags: ["v2 - Streaming"]
---

# Create Streaming 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)
- URL: `https://api.jubjubapp.com/v2/streaming/sessions`
- Auth: HTTP bearer

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.

## Headers

- `Authorization` string
- `X-JubJub-Service-Key` string
- `X-JubJub-Agent-Key` string
- `X-JubJub-Platform-Key` string
- `Origin` string
- `Referer` string
- `X-JubJub-Trial-Token` string

## Request body

- CreateSessionRequest
  - `content_id` string, required: Content to stream
  - `playback_grant` string, 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_wallet` string, nullable: Viewer wallet address (for external wallets)
  - `viewer_profile_id` string, nullable: Viewer profile ID (if authenticated)
  - `viewer_type` string: Viewer type: 'human' or 'agent'
  - `card_token_id` integer, 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 `201`

Successful Response

- SessionResponse
  - `session_id` string, required
  - `content_id` string, required
  - `on_chain_session_id` string, nullable
  - `rail` string, nullable
  - `amount_settled` integer, required
  - `max_amount` integer, required
  - `segment_count` integer
  - `status` string, required
  - `end_reason` string, nullable
  - `card_token_id` integer, nullable
  - `card_balance_micro` integer, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/jubjubapp/apis/jubjub-api.md) - [All operations](https://skmtc.dev/jubjubapp/apis/jubjub-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jubjubapp/apis/jubjub-api/revisions/353157b296f2?raw)
